OK, well, that is all the help I can give you.
Reading the filename
Collapse
X
-
Hi Kevin,
At last was able to make the code work well.
I had split the file name in this form
d124_${t1}_SF_t ${s1}_r${s2}_s$ {s3}_m${s4}_${s 5}grad.txt instead of defining as $f1 directly. Also in the rename function, the code with variables works only with double quotes(") not doesn't work with single quotes. Same is the case with open function. It is really surprising!
Thanks for all the help provided and I really appreciate this forum for the quick responses.
RameshComment
-
Originally posted by ramesh54Hi Kevin,
At last was able to make the code work well.
I had split the file name in this form
d124_${t1}_SF_t ${s1}_r${s2}_s$ {s3}_m${s4}_${s 5}grad.txt instead of defining as $f1 directly. Also in the rename function, the code with variables works only with double quotes(") not doesn't work with single quotes. Same is the case with open function. It is really surprising!
Thanks for all the help provided and I really appreciate this forum for the quick responses.
Ramesh
My apology. I did not notice the single-quotes. You must use double-quotes when there are scalars in the string. Perl will not interpolate scalars inside of single-quotes. This is a very basic concept of perl and is generally one of the first things you learn.Comment
Comment