# lll.pl sub longestLineLength { my $longestLen = undef; for my $l ( @_ ) { if ( length($l) > $longestLen ) { $longestLen = length($l); } } return $longestLen; } 1; # propitiatory offering for require __END__ # test03.pl use strict; use warnings; require "lll.pl"; open (TOP, "COLUMNS=1000 /usr/bin/top -bcS -n 1 2>err.txt|") || die "open pipe from top failed $!"; print longestLineLength( ) . "\n"; __END__ % perl test03.pl 208