That's right. Filehandles only ever exist as package "variables" in typeglobs. You have to localise them with local you can't create lexical filehandles with my
What about this?
open(my $fh, 'somefile') || die $!;
In reply to Re: Re: local vs my
by Anonymous Monk
in thread local vs my
by rzward
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |