in reply to Simple Perl, to get me started.
use strict; use warnings; my @args = sort { length($b) <=> length($a) } @ARGV; print "longest is $args[0], length = ", length($args[0]), "\n"; __END__ longest is ert, length = 3
See also: How do I compose an effective node title?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Simple Perl, to get me started.
by Lust69 (Initiate) on Oct 27, 2010 at 15:54 UTC | |
by marto (Cardinal) on Oct 27, 2010 at 16:01 UTC | |
by Anonymous Monk on Oct 27, 2010 at 16:42 UTC | |
by ig (Vicar) on Oct 27, 2010 at 17:00 UTC | |
by toolic (Bishop) on Oct 27, 2010 at 17:41 UTC |