LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-15-2003, 12:56 PM   #1
rajatgarg
Member
 
Registered: Oct 2003
Posts: 41

Rep: Reputation: 15
Module usage :Global symbol "$ref" requires explicit package name


Hi,

I have package Filesys:f installed and visible through
/usr/local/bin/perldoc Filesys:f.
It has supported functions df();

When I write a simple program to use the function:

#!/usr/local/bin/perl -w
use Filesys:f;
use strict;
use POSIX;

$ref = df("/tmp");
print "\/tmp $ref->{used}";

It gives an error
Global symbol "$ref" requires explicit package name at ./test.pl at line 6
Global symbol "$ref" requires explicit package name at ./test.pl at line 7

Kindly help.

Regards,
Rajat Garg
 
Old 12-15-2003, 02:52 PM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
Try

use Filesys;

without the module name.
 
Old 12-17-2003, 02:55 AM   #3
Berng
Member
 
Registered: Dec 2003
Location: Siberia,Russia
Distribution: Basically RedHat
Posts: 34

Rep: Reputation: 15
Add
my $ref;
before the first
$ref=...
call or comment line use strict:
#use strict;
Best Regards,
Oleg.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Symbol not found" when loading ath_pci module kf8rd Linux - Networking 3 06-29-2005 03:27 PM
Several USB ports: explicit mounting or "hotplug"? SuSE_Lamer SUSE / openSUSE 7 05-12-2005 11:21 AM
"Failed to load module "i915"" Kane635 Linux - Software 0 11-22-2004 09:17 PM
gnome global settings "Help Me!!" or "URGENT" Fascistchicken Linux - Software 3 01-26-2004 07:27 PM
Can't locate object method "splitpath" via package "File::Spec" RobJohnston Linux - General 2 06-28-2003 10:59 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration