http://www.perlmonks.org?node_id=1185570


in reply to Re^2: How to read the input directory from command line arguments using perl?
in thread How to read the input directory from command line arguments using perl?

My query is this script is here where are you taking project.txt as your input in the above code.

Why while is empty without considering and input file? (source)

You can read about the magic <> operator and its use in while loops in I/O Operators. In the code that bart posted, you would provide project.txt either on the command line, as in "perl script.pl project.txt", or by feeding it into the script's STDIN, as in "cat project.txt | perl script.pl".