Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
when in this case there is only one row/value to pull out. going the loop route obvioulsy works, but I would think that you should be able to do this in a one-liner so I did this:foreach( @$res ) { print "$_->[0]\n"; }
But got this result instead:print "$res->[0]\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Array Deferencing Question
by davido (Cardinal) on Oct 01, 2004 at 16:09 UTC | |
|
Re:Array Deferencing Question
by ikegami (Patriarch) on Oct 01, 2004 at 16:15 UTC | |
|
Re: Array Deferencing Question
by periapt (Hermit) on Oct 01, 2004 at 19:47 UTC | |
|
Re: Array Deferencing Question
by Scarborough (Hermit) on Oct 01, 2004 at 16:14 UTC |