$ perl -e '
@arr = qw (a b c);
foreach(1 .. $#arr)
{
 print "$arr[$_]\n";
}'

prints:
b
c

Is that what you want?


--
Regards,
Edward WIJAYA
SINGAPORE
Hi All,

Edward, for a beginner, would you mind explaining what the (1 .. $#arr) and qw actually do in this code.? Cheers

Mark Sargent.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to