Consider this:
while (<FD>) {
@_ = split /\s*:\s*/;
if (/something/) {
$found = $_[$#_];
...
My interpretation based on what is happening:
$_ is set to whatever current line is read-in via the while loop. That
line is split and stored into the current argument stack. If 'something'
is found in (the unchanged) $_, then $found is set to the last value from
the split command.
My question is, why? What is ``$#_''? Is it simply considering _ to be
the array @_ and simply giving the index of the last element? If so, then
why would $_ have elements from which to pick, if $_ is the whole line?
--
Jon Earle
SAVE FARSCAPE http://www.savefarscape.com/
Vegetarian - an old Indian word meaning 'lousy hunter'.
_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs