in reply to Re: Condensing code...golfing with push and return
in thread Condensing code...golfing with push and return
The original code had return undef, your code has just return. They are not the same.
A bare return is basically equivalen to:
your solution is equivalent to:return wantarray ? () : undef;
i.e. returns an array with a single element with an undefined value. As opposed to an empty array.return wantarray ? (undef) : undef;
Liz
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Condensing code...golfing with push and return
by Aristotle (Chancellor) on Oct 10, 2003 at 17:58 UTC | |
by tye (Sage) on Oct 10, 2003 at 21:16 UTC | |
by Aristotle (Chancellor) on Oct 10, 2003 at 22:25 UTC |