The expected result for $fileName should be c:/temp/thisItem1_01.txt However, I am getting errors like - string found or bareword found where operator expected. What is the correct syntax for defining $fileName ? Thanks...my $var1 = "thisItem1"; my $var2 = "01"; $ENV{'scriptDir'} = "c:/temp"; my $fileLocn = $ENV{'scriptDir'}; my $fileName = "fileLocn/$var1_$var2.txt";
In reply to Use scalars to define a filename by akrrs7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |