in reply to Re: Delete files if they match help!
in thread Delete files if they match help!
Any help on this one?use strict; use File::Slurp; ... my $dir_to_open = "../../pics"; my $arch = "../../arch"; while (my $row = $sth->fetchrow_hashref()) { for my $imgfile (map $row->{"image_$_"}, 1..4) { for my $file_to_mv (grep { -f } read_dir($dir_to_open)) { if($file_to_mv=~/$imgfile/) { #move("$dir_to_open/$file_to_mv", $arch); print "Test before move: $dir_to_open/$file_to_mv +<br>"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Delete files if they match help!
by toolic (Bishop) on Jan 07, 2011 at 18:02 UTC | |
by Anonymous Monk on Jan 07, 2011 at 18:55 UTC | |
by roboticus (Chancellor) on Jan 07, 2011 at 19:38 UTC | |
by Anonyrnous Monk (Hermit) on Jan 08, 2011 at 01:12 UTC | |
by Anonymous Monk on Jan 07, 2011 at 19:51 UTC |