Verily, on Tuesday June 5, 2001, the Sainted Kweku Addae-Mensah spake:
> However I get this warning when I run it
> Name "main::opt_f" used only once: possible typo at
> openfile.pl line 9.
> What could be the problem.
Perl's '-w' checking warns you about variables that are only used
once, as this often comes about from a typographical error.
For example:
-------------------------------------
#!/path/to/perl -w
$string = "This is fun!";
print $strng; # Oops, left out an 'i'
-------------------------------------
generates the same sort of warning...and in this case,
it is a very welcome warning, basically saying "Hey,
you mistyped a variable name.".
So, your situation amounts to exactly what your error
message said -> "possible typo". You really don't have
a problem; Perl's just trying real hard to help you
out a bit. :)
HTH,
John
--
John Fox <[EMAIL PROTECTED]>
System Administrator, InfoStructure, Ashland OR USA
---------------------------------------------------------
"What is loved endures. And Babylon 5 ... Babylon 5 endures."
--Delenn, "Rising Stars", Babylon 5