[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Re: $_ global (fwd)



According to Chris Nandor:
> 
> At 11.28 97/2/14, Mark Manning/Metrica wrote:
> The Perl book
> >clearly states that the value of $_ is replaced in loops
> >such as the one you had.
> 
> Clarification: the value of VAR in:
> 
>         foreach VAR (EXPR) {}
> 
> is local to the loop.  When VAR is omitted, it defaults to $_, as in the
> example.

You are indeed correct!  :-)  Sorry.  :-)

As an aside to Matthias: There is a line missing in the
perlvar.pod file.  I was looking for the $OSNAME info and
noticed that the line which should have been:

$OSNAME
$^O

was instead:

$OSNAME =item $^O

Not a biggie.  Just noticed it.  :-)