in reply to Regular expression and rename file help
If we can assume that file is a variable containing the old name of the file, and timestamp is a variable containing the, well... timestamp... you may find that one would access the value of a variable named file by prepending a dollar sign ($), not an ampersand (&). An ampersand generally denotes a subroutine, while a dollar sign denotes a scalar variable.
You might also want to post a more complete version of your code for further dissection.
$/ = q#(\w)# ; sub sig { print scalar reverse join ' ', @_ } + sig map { s$\$/\$/$\$2\$1$g && $_ } split( ' ', ",erckha rlPe erthnoa stJu +" );
|
|---|