Ron Grabowski <[EMAIL PROTECTED]> wrote:
> my $regex = join '|', 'value_garbage1',
> 'value_garbage2',
> 'value_garbage3';
> next if /$regex/;
You might want to say "next if /$regex/o" to prevent Perl from compiling
every time. If you're Perl 5.6, yo
ED]]On Behalf Of
$Bill Luebkert
Sent: Tuesday, August 13, 2002 12:39 AM
To: Dan Jablonsky
Cc: [EMAIL PROTECTED]
Subject: Re: trying to understand how regex works
Dan Jablonsky wrote:
> Hi all,
> I guess it must be a simple problem, but it's a
> mystery to me.
> I got 30 "fields&qu
On 13/08/2002 06:26:59 perl-win32-users-admin wrote:
>Hi all,
>I guess it must be a simple problem, but it's a
>mystery to me.
[snip question involving regex]
>
>Anybody cares to explain this to me?
Try running your script with
perl -re=debug scriptname.pl 2>re_debug
Make sure you redirect st
> open FOUT, ">>/some/path/outputfile.txt";
> open FILE ">/some/path/outputfile.txt") or
die("Error: $!");
open(FILE " while{
> p="N";
> next if (/.*?\|value_garbage1\|.*?/ ||
> /.*?\|value_garbage2\|.*?/ ||
> /.*?\|value_garbage3\|.*?/);
my $regex = join '|', 'value_garbage1',
Dan Jablonsky wrote:
> Hi all,
> I guess it must be a simple problem, but it's a
> mystery to me.
> I got 30 "fields" all separated by pipes in some files
> with many many lines. Some of the fields need to be
> changed, but mostly I have to drop any line that has
> certain values in certain fields
Hi all,
I guess it must be a simple problem, but it's a
mystery to me.
I got 30 "fields" all separated by pipes in some files
with many many lines. Some of the fields need to be
changed, but mostly I have to drop any line that has
certain values in certain fields.
So I start by skipping any field