|
|||||||||||||||||||||||||||
Daniel Udsen <sslug@sslug> writes:
> egentligt er mit problem at jeg ikke fatter $#Array.
Jep.
manualsiden perldata giver dig svaret:
$days # the simple scalar value "days"
$days[28] # the 29th element of array @days
$days{'Feb'} # the 'Feb' value from hash %days
$#days # the last index of array @days
for $i (0 .. $#arr) {...}
lader altså $i løbe fra 0 til det sidste, brugte index i @arr.
--
Peter Makholm | Emacs is the only modern general-purpose
sslug@sslug | operating system that doesn't multitask
http://hacking.dk |
|
||||||||||||||
|
||||||||||||||