perlquestion
mpd
Hi,
I'm working on something that works similar to mmv, but is more suited to the job i need done. I'd like to cheat using perl.
the syntax i'd like to get is something like:
<code>$ pmmv (.+)-(\d{,2})\.ext moof-$1-$2.newext</code>
<p>getting the files to be moved is no problem, but is there an easy way to translate the $1, etc given on the command line to the value matched in the regexp? My results getting the $1 to evaluate to the first match instead of the literal string have so far have been unsuccessful. Any pointers?