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.
Wow! (Score:1)
--fREW
http://blog.afoolishmanifesto.com
Making it even more compact... (Score:1)
Re: (Score:2)
Yes, it could potentially be made slightly shorter... but I like the straightforward clarity of the above. An advantage of the above approach is that it would work for almost any stack pattern -- including things that don't fit the ".push( fn(.pop) )" model. For example, to add a 'say' operator that displays the top value of the stack (without removing it):
I can also imagine functions that rotate or swap the top N operands, or the like. Trying to wedge those into
Re: (Score:1)