Dec 17, 2009, 9:06 PM
Post #6 of 8
Re: [shawnhcorey] get File Name with an input redirection Perl
[In reply to]
Thanks for your reply. Can you please elaborate your reply. Does that mean that when ever we use an indirect operator with a Input Parameter, we can't get the name of Input parameter..
My requirement is:
if I execute the code as : perl myperl.pl < mytext.DAT
I need the name of first parameter i.e. mytext.DAT
I dont need to print the contents of file but only the file name. I also tried with unshift function but of no use. I could print the contents but not the file name.
So please explain in detail, if possible. Thanks a lot.
(This post was edited by solu_abhi on Dec 17, 2009, 9:10 PM)