Ajey Kulkarni wrote:

> perl t.pl
> Name "main::FH" used only once: possible typo at t.pl line 6.
>
> cat t.pl
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> open FH, "out.dat";
>
> Why am i getting this warning?

Because the compiler thinks that you are probably doing something
pointless.  You are loading a filehandle, but never accessing it.  Since it
can't see why you would be creating a filehandle without using it, iot
guesses that you may have mistyped some other name.

> When i remove the warnings,this goes off?
> Is there any problem if i not include "use warnings" line?

Better to either do something with the filehandle, or get rid of it.  Don't
shoot the messenger.

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to