Re: Store contents of array in a variable?

2007-05-18 Thread Dr.Ruud
"Romeo Theriault" schreef: > is it possible to store the > contents of an array into a variable? To present the data, or to reuse it later? my $tmp; for my $i (0 .. $#array) { $tmp .= sprintf "%2d: %s\n", $i, $array[$i]; } print $tmp; or:

Re: Store contents of array in a variable?

2007-05-17 Thread yaron
t;[EMAIL PROTECTED]> To: beginners@perl.org Sent: 23:39:22 (GMT+0200) Asia/Jerusalem יום חמישי 17 מאי 2007 Subject: Store contents of array in a variable? This is probably a dumb question but is it possible to store the contents of an array into a variable? Something like this: $vari

Re: Store contents of array in a variable?

2007-05-17 Thread yaron
ent: 23:39:22 (GMT+0200) Asia/Jerusalem יום חמישי 17 מאי 2007 Subject: Store contents of array in a variable? This is probably a dumb question but is it possible to store the contents of an array into a variable? Something like this: $variable = foreach $array_ref7 (@rowstash7) { return "@

Store contents of array in a variable?

2007-05-17 Thread Romeo Theriault
This is probably a dumb question but is it possible to store the contents of an array into a variable? Something like this: $variable = foreach $array_ref7 (@rowstash7) { return "@$array_ref7\n"; } I have this script below in which I am trying to send the contents of an array within a