> If var is a hash type, i.e. %var, then what is
> the meaning of $_, and $var{$_}?
__DESCRIPTION__
$_ is the default variable, used when you are too lazy to
create one of your own and like clean looking code.
__EXAMPLE__
foreach (1..5) {
print "$_\n";
}
Is the same as:
foreach $_ (1..5) {
print "$_\n";
}
__FURTHER EXAMPLE__
Which incidentally is the same as these two:
print "$_\n" foreach (1..5);
print "$_\n" for (1..5);
---
I love Perl... TIMTOWTOI...
Jonathan Paton
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]