Hi cherry,
It works perfectly. I always thought awk, sed, those commands, but yours coding is so simple.
instead of
__DATA__
Start Date/Time End Date/Time from Prob_Dura.
----------------- ----------------- ----- ------
20090525 23:58:59 20090526 00:00:00 machine1 000051
20090525 23:58:09 20090526 00:00:11 machine2 000150
how i can do with a file, i mean the start date... 2009... 000051, those data in a "a.txt". how the perl script can read from a file, stead of __DATA__?
Thanks
-----Post Update-----
$data_file="a.txt";
open(DAT, $data_file) || die("Could not open file!");
while(<DAT>){