It's probably telling you that because the destination directory does not exist. You can create it with mkdir. For example:
my $destination = "/home/zack/music"; my $music = "$destination/$mp3"; if ( ! -d $destination && ! mkdir $destination ) { die "Can't mkdir $destination: $!"; } copy( $mp3, $music ) or die "Can't copy $mp3 to $music: $!";
In reply to Re^3: Trying to find and copy mp3s
by kyle
in thread Trying to find and copy mp3s
by HeyYou
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |