From reading your description, it sounds like you have filename1234.pdf and you need to change it to filename1234.txt, is that right? Why not:
$name =~ s/pdf$/txt/;
In reply to Re: FIle name help!
by wink
in thread FIle name help!
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |