TStanley has asked for the wisdom of the Perl Monks concerning the following question:
Packet ID (hex) 0xF040 Origin DOS 7452 Date (mm/dd/yyyy) 09/07/2001 Qualifier ACS Time 15:45:45.90 Terminal ID 109 Device ID (hex) 0x2D0 Application ID SALESAPP Catalog Code DOS Function ID(hex) 0x800E Status 253 Severity 0 Item code 772788600047 was not found in the PLU file ------------------------------------------------------------
Does anyone here have any better ideas than this? Thanks.#!/usr/bin/perl -w use strict; #This is the command I need to run my @Command = `ulread`; my $line; my @stripped=(); # Get rid of the separators and put everything into # another array foreach $line(@Command){ if($line=~/^-+$/){}else{ push @stripped,$line; } } # The end of the array will have 4 lines that are not part # of any record (it is actually statistical info for the # entire display). These lines can be removed. for(1..4){ pop @stripped; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Log File Parsing
by MZSanford (Curate) on Sep 11, 2001 at 19:32 UTC | |
by TStanley (Canon) on Sep 11, 2001 at 19:44 UTC | |
|
Re: Log File Parsing
by cLive ;-) (Prior) on Sep 11, 2001 at 20:44 UTC | |
|
Re: Log File Parsing
by TStanley (Canon) on Sep 12, 2001 at 00:31 UTC |