SPUG: Re: spug-list Digest, Vol 18, Issue 12

Umar Cheema umar at drizzle.com
Wed Dec 29 11:17:42 CST 2004


I think he just meant he's using a Perl module in his perl script.

#!/usr/bin/perl

use SomeModule;
my $module = SomeModule->new;

$module->execute_methods();
....

Sachin, correct me if I am wrong.

Umar

On Wed, 29 Dec 2004 bergeron at stu.beloit.edu wrote:

> I would just point out that %ENV is a builtin hash, not an
> array, although they're sort of interchangable in perl.
> 
> I'm also not sure what Sachin means when he says "> i am
> using path /usr/bin/perl for executing a perl .pm file from
> within the file".  Sachin, are you trying to include a
> perlmod here, or actually execute another perl script?
> 
> Nick
> 
> You're probably doing something like using ENV() (with
> parentheses) instead
> of ENV{} (with curly brackets). ENV{} is a builtin array
> that holds your
> environment variables. ENV() is a function you would have to
> define.
> 
> On Wed, Dec 29, 2004 at 06:14:05PM +0550, Sachin Chaturvedi
> wrote:
> > i am working in linux platform with a perl script.
> >
> > i am using path /usr/bin/perl for executing a perl .pm
> file from within the file
> .
> >
> > but i am facing a problem that it gives message like
> >
> > Can't call method "ENV" without a package or object
> reference at ....
> >
> > when there is a reference to ENV .
> >
> > Is this problem with perl version as this script has been
> written for perl5plus
> and i am using /bin/perl OR
> >
> > i have to include some package for getting this work
> >
> > Thanks
> >
> > Sachin
> _____________________________________________________________
> Seattle Perl Users Group Mailing List  
>      POST TO: spug-list at mail.pm.org
> SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
>     MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med
>     WEB PAGE: http://seattleperl.org/
> 





More information about the spug-list mailing list