On Friday 03 Oct 2003 4:05 pm, James Edward Gray II wrote:
> On Friday, October 3, 2003, at 09:55  AM, Gary Stainburn wrote:
> > Hi folks
>
> Howdy.
>
> > I've got a query about variable initialisation. I want to initialise a
> > list of
> > variables to an empty string, but I'm having troubles.
> >
> > What's the best wat to do this?
>
> How about:
>
> my($fred, $ginger) = ('') x 2;

Hmmm,  thanks you three for this.

However, while I can see why - one array initialised by another array of the 
same size - I'd have expected a simpler method from Perl.

It's open to user error quite easily by not specifying enough on the right 
side, and Perl's usually better at making life easy for the programmer.

Or is it just that I'm getting too spoilt by Perl?

>
> James
>
[snip]
-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to