GertMT has asked for the wisdom of the Perl Monks concerning the following question:
it doesn't run. All my files remain in the original folder and there's no message/warning or anything. Maybe someone out there can tell me what I'm doing wrong?system("perl move.pl");
#!/usr/bin/perl -w #script_name = move.pl use strict; use diagnostics; use File::Copy; my $file_html = undef; my $file_png = undef; my $file_css = undef; my $javascriptje=undef; my @files_html = <*.html>; foreach $file_html (@files_html) { move( "$file_html", "./to_move/$file_html" ) or die "Copy html fai +led: $!"; } my @files_css = <*.css>; foreach $file_css (@files_css) { copy( "$file_css", "./to_move/$file_css" ) or die "Copy css failed +: $!"; } my @javascriptjes = <*.js>; foreach $javascriptje (@javascriptjes) { copy( "$javascriptje", "./to_move/$javascriptje" ) or die "Copy ja +vascr failed: $!"; } my @files_png = <*.png>; foreach $file_png (@files_png) { move( "$file_png", "./to_move/$file_png" ) or die "Copy png failed +: $!"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: file::copy problem
by runrig (Abbot) on Aug 17, 2007 at 22:10 UTC | |
by GertMT (Hermit) on Aug 18, 2007 at 08:58 UTC | |
by runrig (Abbot) on Aug 22, 2007 at 01:04 UTC |