Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to initialize 3 array's and a scalar in the same line of declaration, but the scalar is always reporting it as undefined.
my (@arr1, @arr2, $var, @arr3) = ( (),(),"0", () );
What could be wrong in this
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to declare arrays and scalars together?
by ikegami (Patriarch) on Jun 18, 2012 at 05:17 UTC | |
|
Re: How to declare arrays and scalars together?
by cheekuperl (Monk) on Jun 18, 2012 at 05:18 UTC | |
by 2teez (Vicar) on Jun 18, 2012 at 05:36 UTC | |
by Anonymous Monk on Jun 18, 2012 at 16:49 UTC | |
by 2teez (Vicar) on Jun 18, 2012 at 19:32 UTC | |
by Anonymous Monk on Jun 19, 2012 at 01:59 UTC | |
|
Re: How to declare arrays and scalars together?
by frozenwithjoy (Priest) on Jun 18, 2012 at 05:28 UTC | |
by ikegami (Patriarch) on Jun 18, 2012 at 05:30 UTC | |
by frozenwithjoy (Priest) on Jun 18, 2012 at 05:40 UTC |