Hi Vaish, The size of your "unknown sized" array can be found using the function scalar. Here is one way to do it.
#! /usr/bin/perl -w my @arrUnknownSize = (1,3,4); for(my $i=0; $i < scalar(@arrUnknownSize); $i++) #try using the condition $i <= scalar(@arrUnknownSize) and watch da fun! {$arrUnknownSize[$i] = 0}; print @arrUnknownSize; __END__ Chetak -----Original Message----- From: vaishnavi krishnamurthy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 6:42 AM To: [EMAIL PROTECTED] Subject: how to initialize an array of unknown size to 0? Hello, Can anyone tell me how I can do the following - all the elements in my array of unkown size should be initialised to the value 0 ? thanks, vaish. -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>