in reply to Request help regarding perl code usage to extract from trace file

Firstly, you've posted in the wrong section of the forum. See Where should I post X?. Since you have yet to execute this code I wont delve too deeply into it, you should test and debug this, however your code lacks:

use strict; use warnings;

See Use strict and warnings.

If you simply want to run this script, try the following from the command prompt (terminal):

perl datashort.pl value_for_granularity trace_file_name

Should you wish to start learning perl the following links are useful:

Update: I've moved the node since posting.