[vienna.pm] Push (@array,@array2)

Michael Bauer mihi at gmx.at
Thu Jun 7 15:03:37 CDT 2001


* * * vienna-pm-list * * *


hallo du trottel ;)


On 07-Jun-2001 Michael Bauer wrote:
> for ($w=0;$w<$#messages;$w++) {
> @splitted = split " " , $messages[$w];
> push (@entry, at splitted);
> 
> 
> sollte so wie ich das verstehe ein mehrdimensionales array geben. mit
> $entry[0][0]=$splitted[0] nicht?
> 
> gibts aber irgendwie nicht.

perldoc -f gibt die antwort: 
       push ARRAY,LIST
               Treats ARRAY as a stack, and pushes the values of
               LIST onto the end of ARRAY.  The length of ARRAY
               increases by the length of LIST.  Has the same
               effect as

                   for $value (LIST) {
                       $ARRAY[++$#ARRAY] = $value;
                   }

wobei @splitted LIST entspricht.

> -- 
> Programmers don't read documentation
>                                      Alan Cox

wie wahr

gruss mihi

ps.: jetzt brauch ich nur noch die möglichkeit das richtig zu machen *g*

-- 
Linux is like a tippy, no windows, no gates and an apache inside

PGP/GPG key @ http://unet.univie.ac.at/~a9900470/mihi.asc

###
You are subscribed to vienna-pm-list as Michael Bauer <mihi at gmx.at>
http://www.fff.at/fff/vienna.pm/



More information about the Vienna-pm mailing list