Dear all
I apologize if I am going to ask a question that may be easy
I'm trying to read a list of file in a specific directory that are all done in this way: word-number.box When the script find the file it should go elsewhere launching a different program on each individual file found with this structure. My main issue is how to put in the variable $filename text and scalar together.
$filename=print($a,$x,$c) ;
This command is printing in the proper way but is not setting them in the $filename
$a and $c are texts while $x is a number.
Here is the code:
#!/usr/bin/perl -w
$job="eman-ctf.b";
for ($x=3 ; $x <=4 ; $x++){
$a='/sData/users/Musa/Necen/process/EspB-trunc/espbtrunc-imagi
+c-ctf/3-img-no-ctf/box/et3f-' ;
$c='.box';
$d=print($a,$x,$c) ;
$filename = $d;
print $d ;
if (-e $filename) {
print "File Exists!";
@_=($job,$x);
system(@_) == 0
or warn "system @_ failed ";
}
}
Thank you in advance
Max