NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
ugh! use "wantarray"! (Score:2)
Ugh! You really have two return values, so say so:
sub history { shift; return wantarray ? reverse @history : scalar @history; }This saves the extra work of reversing something that you don't need to reverse.Reply to This