Wow! sweet!

Hi Jenda, thanks for the help. 

And I guess, for the dates problem I have to use hashes, eh?

Soham



----- Original Message ----
From: Jenda Krynicky <je...@krynicky.cz>
To: beginners@perl.org
Sent: Monday, 28 September, 2009 9:50:40 PM
Subject: Re: Arrays, Dates, Indexing and Initialisation

Date sent:          Mon, 28 Sep 2009 09:11:02 -0700
Subject:            Re: Arrays, Dates, Indexing and Initialisation
From:               r...@i.frys.com
To:                 "Soham Das" <soham...@yahoo.co.in>
Copies to:          beginners@perl.org

> Soham Das wrote:
> > Hello All,
> >
> > I wanted some guidance with these questions of mine:
> >
> > a.. How do I initialise an array of a definite size with
> > zero. Say the C equivalent of such a statement will be:
> >
> >                    int a[125];
> >                    for(i=0;i<125;i++)
> >                    a[i]=0;
> >
> my @array;
> $array[$_] = 0 for 0..125;

my @array = (0) x 126;

Jenda
===== je...@krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
    -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


      Try the new Yahoo! India Homepage. Click here. http://in.yahoo.com/trynew


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to