MERRY CHRISTMAS TO ALL, WITH PEACE AND LOVE.
MY BEST WISHES


Ricardo Derbes
Altec SE
Albarracín 157 - San Carlos de Bariloche
+54-2944-426892
[EMAIL PROTECTED]
----- Original Message -----
From: "Paul Johnson" <[EMAIL PROTECTED]>
To: "Kieren Diment" <[EMAIL PROTECTED]>
Cc: "Perl Beginners" <[EMAIL PROTECTED]>
Sent: Tuesday, December 24, 2002 12:17 PM
Subject: Re: Help with -e switch


> On Tue, Dec 24, 2002 at 08:38:35AM +1100, Kieren Diment wrote:
>
> > I'd like to know if it's possible to combine the -i and -e switches.
> > I have the following script, and I'd like not to have to go to the
> > bother of firing up an editor, chmod +x ing it and co:
> >
> > #!/usr/bin/perl -w
> > open FILE, $ARGV[0];
> > while (<FILE>)
> >        {
> > print if (/(^org_name)|(^email)|(^$)/);
> >        }
>
> perl -n00i.bak -e 'print if /^(?:org_name|email)/' file
>
> > This script is for validating some paragraph delimeted data files for
> > what it's worth...
>
> --
> Paul Johnson - [EMAIL PROTECTED]
> http://www.pjcj.net
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to