in reply to Reading from a file
The harder part is getting at the last record. For this, jump to the end of the file minus whatever the maximum possible record size could be (+ record delimiter), then read everything from there to the end and retrieve the last record. Again, not that difficult.chomp($record = <DATA>); $keys{$_} = $c++ for split / /, $record; ## Get last record and put it in $record @record = split / /, $record; print $record[$keys{'timestamp'}];
|
|---|