in reply to Parsing a data file to find the highest value.

As moritz has said, without seeing the format of the input file it's impossible to give a definitive answer, but the following may help you get started

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";

Replies are listed 'Best First'.
Re^2: Parsing a data file to find the highest value.
by misconfiguration (Sexton) on Nov 30, 2007 at 19:06 UTC
    Sorry for the lack of information guys, I'll show you the basic syntax of our printer config file.

    M08_amvpss09_MEDIP :279:lp -damvpss09 >amvpss09.trace 2>&1

    The number :279 is the identifier we need to locate and add by one.

    There are over 700 unique numbers in no particular order, Are you guessing that this will need to be sorted by columns?