$ 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
SINGAPORE
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
related issues, try here,
http://www.dslreports.com/forum/unixdsl
It's an all unix related forum.
HTH. 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
, are there any books written specifically with Unix/Linux
admin in mind.? 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
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
with respect to the name of an
associative array as a whole. Am I to assume that either is fine, when
defining associative arrays.? Cheers.
Mark Sargent.
%name{}
/associative array/ ; a special, 2-dimensional array, ideal for
handling attribute/value pairs. The first element in each row