[pm-h] Perl rename bug?

Michael R. Davis mrdvt92 at yahoo.com
Mon Aug 18 13:03:46 PDT 2014


Perl Mongers,
Is this a bug in rename?  I googled but did not find anything off the top.
 
$ perl -e 'my @files=("x", "y"); rename(@files);'
Not enough arguments for rename at -e line 1, near "@files)"
Execution of -e aborted due to compilation errors.

 
But this works fine.
 
$ perl -e 'my @files=("x", "y"); rename($files[0], $files[1]);'
 
Mike
 
mrdvt92
 
$ perl -v
This is perl, v5.10.0 built for x86_64-linux-thread-multi
Copyright 1987-2007, Larry Wall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/houston/attachments/20140818/b4316cdc/attachment.html>


More information about the Houston mailing list