Greetings,
I want to do the result of a substitution to $newname,
but do not have it correct.
#!/usr/bin/perl
# rename from the Terminal OSX
$orig = "tina-o1.jpg";
($orig = $newname) =~ s/tina/quest/ig;
print $newname;
__END__
Then I would like to run from the command line the following:
(OSX flie re-namer)
my @files = <>;
@files = sort @files;
foreach(@files){
my $newname;
( $newname = $_) =~ s/PIC1000/NEWNAME/;
rename($_, "$newname");
}
Any suggestions would be appreciated,
Thanks,
Dave
==============================================
Cora Connection: Your West African Music Source
Resources, Recordings, Instruments & More!
<http://www.coraconnection.com/>
==============================================
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>