in reply to Re^2: Gettin certain lines of text from a text file!
in thread Gettin certain lines of text from a text file!
So, half way there ;) Now you need to implement add_to_spreadsheet(); Answer the questions and use the module suggested initially, it's easy enough to use once you know the steps you intend to take.open (FILE, "<" ,"datafile"); my $sent_date=""; while (<>){ my $this_date_range=""; ($sent_date)=/^Sent: (.*)$/; #Could be more precise, but you're + only expecting one instance of Sent at the start of a line ? ($this_date_range)= /^\*{4}\s+Analysis Date Range\s+:\s(\d{2}\/ +\d{2}\/\d{4})/; add_to_spreadsheet($sent_date,$this_date_range); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Gettin certain lines of text from a text file!
by Foxyirish1987 (Novice) on Sep 15, 2009 at 14:41 UTC |