develooper Front page | perl.beginners | Postings from December 2002

RE: Help with -e switch

Thread Previous | Thread Next
From:
wiggins
Date:
December 24, 2002 05:20
Subject:
RE: Help with -e switch
Message ID:
200212241320.HAA26006@crows.siteprotect.com
Should work according to the examples in 

perldoc perlrun 

Search for the -i.

http://danconia.org


------------------------------------------------
On Tue, 24 Dec 2002 08:38:35 +1100, Kieren Diment <kieren@diment.org> 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)|(^$)/);
>        }
> 
> This script is for validating some paragraph delimeted data files for
> what it's worth...
> 
> TIA
> 
> KD
> 
> -- 
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> 

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About