[Edinburgh-pm] variable scope
asmith9983 at gmail.com
asmith9983 at gmail.com
Fri Apr 25 11:39:50 PDT 2008
I've been trying to hone up today on variable scoping after using
chomp(my @lst=<>); return @lst; I know slurping big style is not good
practice
but the file I'm slurping has less than 30 lines. I found a www page
that foreach my $i (@list?) { confined $i to the scope of the loop. However I
wanted to verify this in the perldoc pages but couldn't locate the definitive
words on how this worked. I'm not satisfied with just using code because it
does what I want. I want to understand why, so it doesn't bite me when I use
it slightly differently. I guess this is why I have a love/hate relationship
with Perl. Most of the time it works just fine but sometimes because of my
lack of knowledge its silently temperamental.
I like the perldoc docs but often find it difficult to locate the paragraphs
I really need.
--
Andrew
More information about the Edinburgh-pm
mailing list