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 accordingly...

but when I do:
regren.pl "^(.*?)\.ext" "$1"

Perl replace the matched string with string literal
'$1' not the first matched part as what $1 should be.

This is probably pretty dump, but any idea?


                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to