Re: 4perl regexp from command line argument

2005-09-24 Thread Xavier Noria
On Sep 24, 2005, at 5:27, Ling F. Zhang wrote: regren.pl "REGEXP1" "REGEXP2" Note that the second one is not a regexp as the script uses it. would do $ARG1 = shift @ARGV; $ARG2 = shift @ARGV; // some code to obtain a filename list and loop: $filename =~ s/$ARG1/$ARG2/ and rename the file a

4perl regexp from command line argument

2005-09-23 Thread Ling F. Zhang
hiall: I am writing a regexp rename script as an exercise for learning perl. Here's what it's suppose to do: regren.pl "REGEXP1" "REGEXP2" would do $ARG1 = shift @ARGV; $ARG2 = shift @ARGV; // some code to obtain a filename list and loop: $filename =~ s/$ARG1/$ARG2/ and rename the file accordi