laksh has asked for the wisdom of the Perl Monks concerning the following question:
Please let me know where I am doing the mistake.#!/usr/bin/perl -w use strict; use warnings; my ($time, $site, $logName, $fullName, $date, $gmt, $req, $file, $prot +o, $status, $length); $site; my $LOGFILE = "config.txt"; open LOGFILE,"$LOGFILE" or die "cannot open file : $!"; foreach my $line (<LOGFILE>) { ($site, $logName, $fullName, $date, $gmt, $req, $file, $proto, $status, $length) = split(' ',$line); my $a = "$site\n"; print "--$a\n"; my $b = "$logName\n"; print "==$b\n"; } close(LOGFILE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Use of uninitialized value $site in concatenation (.) when excute the perl script
by kcott (Archbishop) on Aug 31, 2012 at 09:21 UTC | |
by Anonymous Monk on Sep 02, 2012 at 14:43 UTC | |
|
Re: Use of uninitialized value $site in concatenation (.) when excute the perl script
by Corion (Patriarch) on Aug 31, 2012 at 08:49 UTC | |
|
Re: Use of uninitialized value $site in concatenation (.) when excute the perl script
by nemesdani (Friar) on Aug 31, 2012 at 08:53 UTC | |
|
Re: Use of uninitialized value $site in concatenation (.) when excute the perl script (an aside - code review)
by MidLifeXis (Monsignor) on Aug 31, 2012 at 13:07 UTC | |
|
Re: Use of uninitialized value $site in concatenation (.) when excute the perl script
by MidLifeXis (Monsignor) on Aug 31, 2012 at 12:51 UTC |