in reply to Bean properties...
#!/usr/bin/perl -- use strict; use warnings; beans(); warn $_ for beans(); # 7 warn scalar beans(); sub beans { return unless defined wantarray; warn 'beans'; my @beans = 1 .. 3; return wantarray ? @beans : \@beans; } __END__ beans at - line 12. 1 at - line 7. 2 at - line 7. 3 at - line 7. beans at - line 12. ARRAY(0x183aaa0) at - line 8.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Bean properties...
by buz260 (Novice) on Apr 28, 2009 at 14:58 UTC | |
by Anonymous Monk on Apr 28, 2009 at 15:21 UTC | |
by buz260 (Novice) on Apr 30, 2009 at 08:03 UTC |