[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: perl question



On Sat, Dec 19, 2009 at 11:00:07AM -0500, Chris Dale wrote:
> On Sat, 19 Dec 2009, Alex Samad wrote:
> > I have a set of constants setup in my script
> > 
> > RC_OK
> > ...
> > ...
> > 
> > I use LWP::Simple  which also uses RC_OK, and I get a main::RC_OK
> > redifinition 
> > 
> > is there some way around this with out renaming my constants. 
> 
> You can suppress symbol importing, and then call methods the long way:
> 
>   use LWP::Simple qw();
>   my $html = LWP::Simple::get("http://...";);
> 
> Or just import what you want:
> 
>   use LWP::Simple qw(get);
>   my $html = get("http://...";);
> 
> See http://perldoc.perl.org/Exporter.html.

thanks for that.  Did some more reading and it seems constants don't
really have a scope which is why I was having the problem.

> 
> cd
> 
> 

-- 
"More and more of our imports are coming from overseas."

	- George W. Bush
09/26/2005
On NPR's Morning Edition

Attachment: signature.asc
Description: Digital signature


Reply to: