in reply to moving files
You could use File::Copy with File::Find instead of
like so:system ("mv $fil_nm ./reports")
use warnings; use strict; use File::Copy qw(move); use File::Spec; use Cwd qw(abs_path); use File::Find; my $path = $ARGV[0]; my $final_dir = File::Spec->rel2abs("./report"); $path = abs_path($path); find( sub { chomp; return if $_ eq '.' or $_ eq '..'; move( $_, $final_dir ); }, $path );
If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me
|
---|
In Section
Seekers of Perl Wisdom