Hi,
could be more efficient the first code, because you allocate, the memory space
one single time.
In the second code you allocate the memory space every time.
Walter
> Hi,
>
> Was wondering which of these 2 pieces of code is more efficient :
>
> <code1>
> my $file ;
> foreach $file (@tarred) { #do something ; }
> foreach $file (@gzipped) { #do something else ; }
> </code1>
>
> OR
>
> <code2>
> foreach my $file (@tarred) { #do something ; }
> foreach my $file (@gzipped) { #do something else ; }
> </code2>
>
> pv.
> --
> Prahlad Vaidyanathan <[EMAIL PROTECTED]>
>
> drug, n:
> A substance that, injected into a rat, produces a scientific paper.
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]