
Jeff29
Novice
Oct 12, 2010, 8:40 PM
Post #12 of 26
(3422 views)
|
|
Re: [Jeff29] Parsing a text file and outputting to an excel sheet
[In reply to]
|
Can't Post
|
|
Hi Bill, A small query,In my log file I have a line that contains http: links like below after the error:.I want to print and write to excel these links also .My question is there a easier way just to get a link from a line? I added the following piece ,but am getting "Use of uninitialized value in pattern match (m//) at error.pl line 26"warnings
if ($match =~ /http:/) { if ($is_an_error_entry) { $resolution_link = /http:.*/ --->Is this right? chomp $resolution_link; } } if ( $match =~ /Perforce path:/ ) { if ($is_an_error_entry) { $match = (split /:\s*/, $match)[1]; chomp $match; print $cr_line, $match, $resolution_link, "\n"; $worksheet->write( $i, 0, $cr_line ); $worksheet->write( $i, 1, $match ); $worksheet->write( $i, 2, $resolution_link ); $i++; } $cr_line = ''; $resolution_link = ' '; }INPUT:- Error: Error MSG -----------*some data----------- This is an error file please check http://wiki.com/error-resolution/fixes/fix31 Perforce path: //Depot/old/radio/bit/audradio/rel/perl/src/profile.c#3
(This post was edited by Jeff29 on Oct 12, 2010, 11:07 PM)
|