in reply to Is it possible to "use vars" or "our" a file handle?
open(my $messages,'>', 'msg.txt') or die "$!";
or, if you really mean to use the global property associated with bareword filehandles,
open(our $messages,'>', 'msg.txt') or die "$!";
Is there a reason you are not using lexicalindirect file handles? ( and using 2-argument instead of 3-argument open? )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is it possible to "use vars" or "our" a file handle?
by rovf (Priest) on Nov 02, 2009 at 16:12 UTC | |
by chromatic (Archbishop) on Nov 02, 2009 at 18:24 UTC | |
by ikegami (Patriarch) on Nov 02, 2009 at 18:46 UTC | |
by kennethk (Abbot) on Nov 02, 2009 at 16:31 UTC |