I tried that, same error. "$perlversion requires explicit package name"


>From: Jeff 'japhy' Pinyan <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: Nick Transier <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: method calls outside the package
>Date: Wed, 20 Jun 2001 15:53:50 -0400 (EDT)
>
>On Jun 20, Nick Transier said:
>
> >package blah;
> >{
> >sub foo {
> >       print "I do not understand perl"
>
>Missing a semicolon above...
>
> >       return 5;
> >}
> >}
> >
> >Now, how do I call this function from outside the package?
>
>blah::foo() will work.
>
> >$perlversion = blah::->foo;
>
>That works too, but kinda kruftily.
>
> >but it doesn't work, it asks for explicit package name.
>
>That's on your variable.  You need to declare it.
>
>   my $version = blah::foo();
>
>--
>Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
>I am Marillion, the wielder of Ringril, known as Hesinaur, the Winter-Sun.
>Are you a Monk?  http://www.perlmonks.com/     http://forums.perlguru.com/
>Perl Programmer at RiskMetrics Group, Inc.     http://www.riskmetrics.com/
>Acacia Fraternity, Rensselaer Chapter.         Brother #734
>**      Manning Publications, Co, is publishing my Perl Regex book      **
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Reply via email to