I am also a newbie, and I'm also currently on Chapter four of O'Reilly's
Learning Perl. I just have a simple question about something I just read
which confused me...

In CH4, in the section on foreach loops, the book says, "If the list you are
iterating over is made of real variables rather than some function returning
a list value, then the variable being used for iteration is in fact an alias
for each variable in the list instead of being merely a copy of the values".

What I don't understand is - what do they mean by "some function returning a
list value"? I'm sure I've seen an example of this before, but I just can't
seem to visualize it. Could someone please provide a small example to
demonstrate this? I mean if it's not:

foreach $word (@somearray)      {

        print $word;

}

then what else could the loop be iterating over?

Confused in Florida,
Tom


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to