my ( $week, $comptage, $index ) = qw{ W C I }; my $cmdc2= qq{mv M3.*txt ../../../dir_first_action_${week}/dir_M3_${we +ek}_comptage_${comptage}_${index}}; print $cmdc2; #Output: #mv M3.*txt ../../../dir_first_action_W/dir_M3_W_comptage_C_I
How does it "not work"?
Are you expecting the unix command mv to run? If so, you need to use qx{} or backticks, not qq{}. See Quote Like Operators in perlop.
Update: Forgot to mention backticks
In reply to Re: command move and qq{}
by FunkyMonk
in thread command move and qq{}
by steph_bow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |