Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: assigning the maximum of two numbersby xdg (Monsignor) |
on Nov 03, 2005 at 03:42 UTC ( [id://505209]=note: print w/replies, xml ) | Need Help?? |
my $max_xy = ($x,$y)[$x<$y] That reminds me about a variation of this gem I seem to remember being in Effective Perl Programming. Not as efficient, but more artistic. If I remember correctly, it's like this:
-xdg Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
In Section
Meditations
|
|