Jakob Kofoed wrote at Tue, 05 Aug 2003 23:33:29 +0200:

> I am trying to get the maximum number in a file looking like:
> 
> 1   5001
> [...]
> 19   5019
> 
> 
> I had the idea to push the individual line in a row into a array and se
> the List::Util module - but I cant get it to work.

Yet another solution might be

use Tie::File;
use List::Util qw/max/;

tie my @line, 'Tie::File', $filename;
print max map {(split)[1]} @line;


Greetings,
Janek

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to