steph_bow has asked for the wisdom of the Perl Monks concerning the following question:
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
update: added some elements to take into account Corion's remarksh -c: line 0: syntax error near unexpected token ' 'M3_fa_W42/M3_W42_ +comptage_60_output_first_action' ' <code>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: incorrect syntax when using mkpath
by moritz (Cardinal) on Mar 25, 2008 at 11:22 UTC | |
|
Re: uncorrect syntax when using mkpath
by Corion (Patriarch) on Mar 25, 2008 at 11:14 UTC | |
|
Re: incorrect syntax when using mkpath
by Pancho (Pilgrim) on Mar 25, 2008 at 13:11 UTC | |
by Anonymous Monk on Mar 26, 2008 at 09:59 UTC |