in reply to split into hash

I would be tempted to mung the data to make the field seperator consistant and then parse it much as others have suggested-
while (<THATFILE>){ s/^(\d+): /$1,/; # convert first field seperator from ': ' to ' +,' my @fields = split /,/; next unless $fields[3] == 987; my ($hr, $min, $sec) = split /:/, $fields[1]; # do something with time here }

I think that makes the code clearer and I doubt any-one would look at the source data and miscount the fields, the comment would be mandatory however.

my $chainsaw = 'Perl';