update: Changed the regex to match the data provided by the OP.
my $high_id = 0; open my $ID_FILE, "<", "path/to/file" or die $!; while ( <$ID_FILE> ) { my ( $id ) = m/:(\d+):/; # extract first number from line $high_id = $id if $id > $high_id; } print "highest id found = $high_id\n";
In reply to Re: Parsing a data file to find the highest value.
by FunkyMonk
in thread Parsing a data file to find the highest value.
by misconfiguration
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |