P is for Practical | |
PerlMonks |
Re: (elbie) When does $_ get used?by elbie (Curate) |
on Jul 26, 2001 at 22:01 UTC ( [id://100070]=note: print w/replies, xml ) | Need Help?? |
I'm sorry I confused the issue. My question wasn't "why
doesn't while assign a value to $_"
but "why doesn't shift?"
Certainly while( <> ) { ... } works as I expected it to. While talking it over with other helpful monks via the Chatterbox, I found that the individual functions will say if they use $_ in their descriptions. That being said, is there a good reason why shift (for example) doesn't assign a value to $_ unless another variable is explicitly used?
In Section
Seekers of Perl Wisdom
|
|