Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Why does system("mv $x $y") not work when it works at the command line?

by misterperl (Pilgrim)
on Feb 03, 2023 at 17:32 UTC ( [id://11150141] : note . print w/replies, xml ) Need Help??


in reply to Why does system("mv $x $y") not work when it works at the command line?

system commands are generally the last resort.

Also a lot easier to read and less prone to warnings:
die "$ARGV[0] doesn't exist" unless @ARGV && -e $ARGV[0];
  • Comment on Re: Why does system("mv $x $y") not work when it works at the command line?
  • Download Code