Your problem is that $base_dir.$top_file expands to 'C:/Text_Filesmlb_boxscore$124728.txt', which doesn't exist. A fix is probably as simple as: move($base_dir.'/'.$top_file, $new_dir.'/'.$top_file); though you could also consider using File::Spec/File::Spec if you wanted to make your code more portable (probably not warranted in this specific case).
- tye (but my friends call me "Tye")In reply to (tye)Re: Moving a Text File
by tye
in thread Moving a Text File
by Perl Newby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |