Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I confess I'm somewhat new to perl but I've searched for days now for an example that works and have had no luck. Perhaps I'm going about it the wrong way. I'd appreciate any comments. Regards, Generator#!c:/perl/bin/perl.exe -w use strict; use diagnostics; open OUTPUT,"<","c:\/Perl\/Project\/Files\/SMDR.log.prs.20090220_08423 +0.prd" or die "Couldn't open smdr file; $!\n"; my @lines = <OUTPUT>; #loop through the array values and print each foreach my $lines (@lines) { open (OUTFILE, ">>c:\/perl\/project\/archive.txt"); print OUTFILE "$lines"; #here's where I'd like to filter out any lines + containing "/" a slash character close OUTFILE; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Print while filtering ouput...
by ikegami (Patriarch) on Feb 26, 2009 at 02:19 UTC | |
by Anonymous Monk on Feb 26, 2009 at 03:23 UTC | |
by ikegami (Patriarch) on Feb 26, 2009 at 03:33 UTC | |
|
Re: Print while filtering ouput...
by Lawliet (Curate) on Feb 26, 2009 at 02:24 UTC | |
by Anonymous Monk on Feb 26, 2009 at 03:13 UTC | |
by Lawliet (Curate) on Feb 26, 2009 at 04:03 UTC |