Wijaya Edward wrote:
Hi all,

I have a snippet that rename files from:
"sth.txt.out"  into
"sth.out"

Now I am really curious how can I make this
oneliner "even shorter":

$  perl -e '
for(glob ("*.txt.out")){
$out = $_; $out =~ s/\.txt(\.out)/\.out/;
 rename ($_,$out);
}'


perl -e '/(.*)\.txt(\.out)$/&&rename$_,qq($1$2)for<*.txt.out>'

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