in reply to Re^3: Special formatting of error messages
in thread Special formatting of error messages

The shortest I've got so far is my $max = (sort map { length } @test)[0]; This can also get the shortest by using -1 instead of 0.


___________
Eric Hodges

Replies are listed 'Best First'.
Re^5: Special formatting of error messages
by osunderdog (Deacon) on Feb 02, 2005 at 18:07 UTC

    Bravo! I hadn't thought about doing it with sort.

    I came up with:

    use List::Util qw|max|; ... my $maxsize = max(map {chomp; length} @lines);

    "Look, Shiny Things!" is not a better business strategy than compatibility and reuse.