perlfan99 has asked for the wisdom of the Perl Monks concerning the following question:
is there a way i can assign$num1 = "1;2;3"; $num2 = "4;5;6"; (@ar1, @ar2) = map { split(';', $_) } ($num1, $num2); print "ar1 size = " . scalar(@ar1) . "\n"; print "ar2 size = " . scalar(@ar2) . "\n"; output: ar1 size = 6; ar2 size = 0;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to assign map results to arrays
by ikegami (Patriarch) on Jul 29, 2008 at 06:53 UTC | |
|
Re: how to assign map results to arrays
by pc88mxer (Vicar) on Jul 29, 2008 at 06:51 UTC | |
|
Re: how to assign map results to arrays
by GrandFather (Saint) on Jul 29, 2008 at 12:23 UTC | |
|
Re: how to assign map results to arrays
by perlfan99 (Sexton) on Jul 29, 2008 at 07:34 UTC | |
by davorg (Chancellor) on Jul 29, 2008 at 11:10 UTC | |
by ikegami (Patriarch) on Jul 29, 2008 at 19:28 UTC |