hi guys
i've having some problem extracting data from a text file
example if i got a text file with infos like:
Date 2008-05-01 Time 22-10
Date 2008-05-01 Time 21-00
Date 2008-05-02 Time 19-15
Date 2008-05-06 Time 18-00
The Date and Time is like one block
but i need to extract say the all the dates
usually i used
[CODE=perl]
my $service_line = index ($original, "T11");
my $service = substr ($original, ($service_line) , 3);
[/CODE]
but the problem is this index points to Date only once
it doesn't go through all the dates...
any idea how i can achieve getting all the dates extracted in the textfile?
i've having some problem extracting data from a text file
example if i got a text file with infos like:
Date 2008-05-01 Time 22-10
Date 2008-05-01 Time 21-00
Date 2008-05-02 Time 19-15
Date 2008-05-06 Time 18-00
The Date and Time is like one block
but i need to extract say the all the dates
usually i used
[CODE=perl]
my $service_line = index ($original, "T11");
my $service = substr ($original, ($service_line) , 3);
[/CODE]
but the problem is this index points to Date only once
it doesn't go through all the dates...
any idea how i can achieve getting all the dates extracted in the textfile?
Comment