in reply to Confused Contexts and wantarray
A little experimentation got me the following (somewhat scary) result:
It does work ...use strict; sub flab { my @r = ( 1 .. 10 ); wantarray ? @r : \@r; } print "flab has ", scalar @{flab()}, " entries\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Confused Contexts and wantarray
by MichaelORourke (Initiate) on Jun 15, 2007 at 20:20 UTC | |
Re^2: Confused Contexts and wantarray
by redlemon (Hermit) on Jan 19, 2005 at 00:58 UTC |