perlquestion
Anonymous Monk
<p> 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:</p>
<code>
perl myprogram.pl -input C:\inputfilelocation -output C:\outputfilelocation
</code>
<p> My GetOptions look like this: </p>
<code>
GetOptions('input=s' => \$input,'output=s' => \$output);
</code>
<p> 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 $_</p>
7