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'.

Likewise,

"
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 ?

Regards,
 Sergei.

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. :-)      

zentara


-- 
I'm not really a human, but I play one on earth.
http://zentara.net/CandyGram_for_Mongo.html 



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