Gossamer Forum
Home : General : Perl Programming :

File Handle Warning

Quote Reply
File Handle Warning
When perl checking a plugin module for Links SQL I get this message:

Quote:
Unquoted string "outf" may clash with future reserved word at EditorMonitor.pm line 77.


outf is a file handle like: open (outf, ">index_$rec{'ID'}.html");

How can I modify this to remove this warning message? Do I just qoute the file handle?

open ("outf", ">index_$rec{'ID'}.html");



http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] File Handle Warning In reply to
>>
How can I modify this to remove this warning message?
<<

The easiest thing would be simply change the filehandle name.

Last edited by:

Paul: May 25, 2002, 1:18 AM
Quote Reply
Re: [Ian] File Handle Warning In reply to
You get this when running you script under use warnings; right?

If you're defining a file handle, you should define it as upper case so to be sure that it doesn't clash with future functions or any other reserved word. This should do the trick:

Code:
open (OUTF, ">index_$rec{'ID'}.html");

- wil

Last edited by:

Wil: May 25, 2002, 5:40 AM
Quote Reply
Re: [Wil] File Handle Warning In reply to
Thank you very much... thats the magic it neededSmile


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] File Handle Warning In reply to
You might find the following 'Perl Style' guide a good read. This also gives you more information on where to use CAPS and where not to:

http://www.perldoc.com/...6/pod/perlstyle.html

- wil
Quote Reply
Re: [Wil] File Handle Warning In reply to
Thanks Wil, looks interestingSmile


http://www.iuni.com/...tware/web/index.html
Links Plugins