jflevi has asked for the wisdom of the Perl Monks concerning the following question:
There must be some better way to force @my_array as a scalar or do I have flashbacks of "C" ???print @my_array; # no good: "print" works in a list context print ($#my_array + 1); # OK only if "$[" set to 0 print (0 + @my_array); # works, but looks ugly
I must be missing something ... actually I'm missing a lot of things :-)
jfl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Printing the length of an array ?
by kyle (Abbot) on Mar 30, 2008 at 20:50 UTC | |
by jflevi (Beadle) on Mar 31, 2008 at 20:23 UTC | |
|
Re: Printing the length of an array ?
by FunkyMonk (Bishop) on Mar 30, 2008 at 21:00 UTC | |
|
Re: Printing the length of an array ?
by jwkrahn (Abbot) on Mar 30, 2008 at 22:20 UTC | |
by shmem (Chancellor) on Mar 30, 2008 at 22:45 UTC | |
|
Re: Printing the length of an array ?
by ww (Archbishop) on Mar 30, 2008 at 21:14 UTC | |
by FunkyMonk (Bishop) on Mar 30, 2008 at 21:21 UTC | |
by ww (Archbishop) on Mar 30, 2008 at 21:30 UTC | |
by chromatic (Archbishop) on Mar 30, 2008 at 21:57 UTC | |
by shmem (Chancellor) on Mar 30, 2008 at 22:08 UTC | |
| |
by wardy3 (Scribe) on Mar 31, 2008 at 04:39 UTC | |
|
Re: Printing the length of an array ?
by Jenda (Abbot) on Mar 31, 2008 at 17:51 UTC |