CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [Jeff29] Parsing a text file and outputting to an excel sheet: Edit Log



Jeff29
Novice

Oct 12, 2010, 8:40 PM


Views: 4061
Re: [Jeff29] Parsing a text file and outputting to an excel sheet

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

Code
    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 = ' ';
}


Code
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)


Edit Log:
Post edited by Jeff29 (Novice) on Oct 12, 2010, 8:42 PM
Post edited by Jeff29 (Novice) on Oct 12, 2010, 9:24 PM
Post edited by Jeff29 (Novice) on Oct 12, 2010, 9:24 PM
Post edited by Jeff29 (Novice) on Oct 12, 2010, 9:27 PM
Post edited by Jeff29 (Novice) on Oct 12, 2010, 9:27 PM
Post edited by Jeff29 (Novice) on Oct 12, 2010, 9:33 PM
Post edited by Jeff29 (Novice) on Oct 12, 2010, 11:07 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives