You need to untaint $ENV{PATH} because the user could change it to run his mv instead of the system one. This is particularly relevant in setuid scripts.
In this case, why don't you do
rename $a{from}, $a{to} or die("mov problem.. [$!]");
In reply to Re: having horrors untainting a path string for moving a file
by ikegami
in thread having horrors untainting a path string for moving a file
by leocharre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |