Yes, I agree that it very hard to read, and next to impossible to debug. I
appreciate everyone's comments very much. I will use your troubleshooting
method, but the kicker is the the damned backup program write these random
log file names (thus the my @files = glob('3*.log');), so I could only think
to open all the log files and start greping for strings... ick. Unless one
of  ya'll can tell me of a way to open a file based on file creation date?


"David" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> your script is very hard to read. :-)
>
> if you know where the problem might be, it's better to just post the
section
> of code that might be failing. posting the whole file with lots of log
> lines make it hard to read.
>
> it seems to me that you just want the log lines that contain a certain
reg.
> expression in field 7 to be backup somethere right? try:
>
> #!/usr/bin/perl -w
> #-- foo.pl
> use strict;
>
> while(<>){
>         next unless((split)[7] =~ /SNBJH_3203J/i);
>         print;
> }
>
> call your script like:
>
> foo.pl 3*.log | more
>
> see if it gives what you want. if it does, simply add your other
> reg.(like SNBJH_3403,SNBJH_3211J) to the above next unless(..) line to
> capture more lines as you intend.
>
> of course, you will want to add the fancy format you have in your original
> script.
>
> david
>
> Mike Singleton wrote:
>
> > This script will ultimately return the values of the regex strings for
> > successful backup. I am stumped right now as how to proceed, as the
script
> > seems to run without error, yet return nothing.
> >
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to