http://qs321.pair.com?node_id=980952

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have a program where I need to pass a filename (and location) to the program. How can I do this? I have read the GetOpt doc so please don't point me there. My command line is as follows:

perl myprogram.pl -input C:\inputfilelocation -output C:\outputfileloc +ation

My GetOptions look like this:

GetOptions('input=s' => \$input,'output=s' => \$output);

Basically I need to figure out how to access that file in a while loop that I have which iterates over the lines in the file and puts each into $_