in reply to Re: Re^4: Many strings make one variable?
in thread Many strings make one variable?

I also just read local is better than 'my' for file handles

Yes this is true for advanced scenarios. However using anonymous filehandles available in 5.6 and later (or is it earlier as well?) avoids almost all of the scenarios where localising a filehandle is necessary. (Well, an exception being when dealing with older code that still uses dynamic filehandles instead of anonymous ones)

open my $private_filehandle,"<",$0 or die "Weird! failed to open mysel +f ($0) : $!";

Local is only really needed when localizing special filehandles like STDOUT and the like, or when localizing special variables like @ARGV and $_ and %ENV or whatever. (Actually this is not strictly true, sometimes using dynamic scoping is a powerful way to configure a module, for instance Data::Dumper, but of course that was written by a real guru, and the justifications are beyond the scope of your skills and this reply.) The note you post is most likely from an earlier version of perl, or hasnt been updated since an earlier version of perl.

--- demerphq
my friends call me, usually because I'm late....