in reply to Parse/Split Log File
While writing this though I realize that this does not some up what I think it is you want done. You need to deciphers the format of delimeters between entries in the recored, ie a COMMA, and maybe a ; at the end of the record. Possibly a cut and paste of the document we are viewing could help better assist you, along with what you are trying to get out of this, Ie... propagating a database with these entries, iterating a count to a flat file or web page on how many failures as opposed to success's. Please elaborate.open(MYFILE, '/dir/logfiles'); @data = MYFILE; foreach $line (@data) { if ($line =~ /^Data Record:(.*)/){ push(@push, $1); }else{ next; } }
|
|---|