TechNoFear has asked for the wisdom of the Perl Monks concerning the following question:
and I'm using the timestamp (last one) further on in the program.my $SentRec; open(LOGFILE, "$LogDir$Filename") or return "Error: Open of $Filen +ame failed: $!\n"; while (<LOGFILE>){ if (/\b$Autosys/) { print "the full string: $_\n"; $SentRec = substr($_, 0, 28); $count++; } #sample output 07/25/05 09:03:56 p2.ipgprd.nscc.bti.arch.d Archived BTIHDR.000.137660 +435.Z 07/25/05 09:04:11 p2.ipgprd.nscc.bti.arch.d Archived ML2001788C.137660 +435.Z 07/25/05 09:04:37 p2.ipgprd.nscc.bti.arch.d Archived ML2001789D.137660 +435.Z
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Hash
by davorg (Chancellor) on Jul 26, 2005 at 08:43 UTC | |
by TechNoFear (Initiate) on Jul 26, 2005 at 09:05 UTC | |
by davorg (Chancellor) on Jul 26, 2005 at 09:12 UTC | |
by reasonablekeith (Deacon) on Jul 26, 2005 at 09:21 UTC | |
by TechNoFear (Initiate) on Jul 26, 2005 at 09:33 UTC | |
by davorg (Chancellor) on Jul 26, 2005 at 09:51 UTC | |
by GrandFather (Saint) on Jul 26, 2005 at 09:55 UTC | |
by GrandFather (Saint) on Jul 26, 2005 at 10:15 UTC | |
by Random_Walk (Prior) on Jul 26, 2005 at 10:02 UTC | |
by Iron (Scribe) on Jul 26, 2005 at 09:58 UTC | |
|
Re: Perl Hash
by TechNoFear (Initiate) on Jul 26, 2005 at 10:00 UTC | |
by kutsu (Priest) on Jul 26, 2005 at 14:30 UTC |