in reply to Re: Re: Re: Re: Re: OR operator
in thread OR operator
I think we're actually on the same page here. In my mind, $color is "this thing" and $_ is e.g. "blue".
But "for" topicalizes. $_ is the topic. $_ is more variable than $color, $_ is the thing.
for (qw/green blue red/) { if ($color eq $_) { ... } } for each of green, blue and red: if the color is it, do something
for (qw/green blue red/) { if ($_ eq $color) { ... } } for each of green, blue and red: if it is the color, do something
I read $_ as "the thing" or "it". How do you read $_?
Juerd
- http://juerd.nl/
- spamcollector_perlmonks@juerd.nl (do not use).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Re: Re: OR operator
by DrManhattan (Chaplain) on Apr 11, 2003 at 09:50 UTC |