Re: Introduction and question

On Tue, 15 Jul 2008 11:40:56 -0700 (PDT)
Sergei Steshenko <sergstesh yahoo com> wrote:

One should have very special reason to use 'local' in Perl, I haven't had
such a reason for probably more than 10 years.

So, I suggest not to use 'local'.


local *DIR;
opendir DIR

should better be replaced with

opendir(my $dh, $dir) or die "cannot open '$dir' directory";

'local' creates a global entity - why one would need this ?


Right you are. It was some old code I had, I should have looked
more closely, but it worked..... so I didn't look too close. :-)      


I'm not really a human, but I play one on earth. 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]