perluser456 has asked for the wisdom of the Perl Monks concerning the following question:
Thanks Ascii.txt would look like this:#!/usr/local/bin/perl open (FILE1, "$ARGV[1]") || warn "The script $0 can't open $ARGV[1]: $ +!\n"; open (FILE1, "$ARGV[0]") || warn "The script $0 can't open $ARGV[0]: $ +!\n"; while (<FILE1>){ s/f/z/; s/h/y/; s/there/where/; print $_; } close (FILE1);
Then regexp.txt would be like this:foo bar here there
s/f/z/; s/h/y/; s/there/where/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Want to get regexp list from file
by japhy (Canon) on Mar 26, 2005 at 21:30 UTC | |
|
Re: Want to get regexp list from file
by ambs (Pilgrim) on Mar 26, 2005 at 19:53 UTC | |
by ambrus (Abbot) on Mar 26, 2005 at 20:39 UTC | |
by Fletch (Bishop) on Mar 27, 2005 at 01:12 UTC | |
|
Re: Want to get regexp list from file
by b10m (Vicar) on Mar 26, 2005 at 21:24 UTC | |
|
Re: Want to get regexp list from file
by perluser456 (Initiate) on Mar 29, 2005 at 15:30 UTC |