[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] perl, array, flytning af elementer



Peter Makholm wrote:
Kristian Kallenberg <sslug@sslug> writes:


Ok så langt så godt, men i virkeligheden er det et flerdiminsionelt array:

$element[4][3] = 5;


I virkeligheden findes der ikke flerdimensionelle arrays i perl. I
virkeligheden er $element[3] bare en arrayreference. Det du har brug
for at er kunne tilgå det array $element[3] peger på. Dette gøres med:

@{$element[3]}

De krøllede parenteser kan vist undlades.

Hvis du skal lege med flerdimensionelle arrays elelr andre sammensatte
datastrukture i perl kan jeg anbefale at du læser perlreftut(1) og
perllol(1).

Mange tak for hjælpen. Jeg prøvede flere kombinationer med @ og $, men ramte ikke denne.


/kallenberg



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *