Dea Monks,
I have an incorrect syntax when using mkpath but I cannot correct my error. I want to create the directories but it does not seem to work. Could you help me ?
Thanks
Here is my code :
#! usr/bin/perl -w
use strict;
use File::Copy;
use File::Path;
my $date = $ARGV[0];
my $comptage = $ARGV[1];
my $C = $comptage;
# index : input ou output
my $index = $ARGV[2];
my $I = $index;
my $week = $ARGV[3];
my $W = $week;
print STDOUT "the week is ${W}\n";
my $cmda=qq{mkpath('M1_fa_${W}/M1_${W}_comptage_${C}_${I}_first_action
+')};
my $cmdb=qq{mkpath('M2_fa_${W}/M2_${W}_comptage_${C}_${I}_first_action
+')};
my $cmdc=qq{mkpath('M3_fa_${W}/M3_${W}_comptage_${C}_${I}_first_action
+')};
system($cmda);
system($cmdb);
system($cmdc);
I get the error message
sh -c: line 0: syntax error near unexpected token ' 'M3_fa_W42/M3_W42_
+comptage_60_output_first_action' '
<code>
update:
added some elements to take into account Corion's remark