in reply to Re^4: NON Common Elements between two columns
in thread NON Common Elements between two columns

<> is a file descriptor reading operation and it is already inside the script, so you should run either perl script.pl mytext.txt >output.txt (passing filename as command line argument) or perl script.pl <mytext.txt >output.txt (passing file contents as STDIN).
Sorry if my advice was wrong.