SPUG: re-size array

keith.reed at philips.com keith.reed at philips.com
Mon Oct 11 12:31:30 CDT 2004


splice() is the function you want to use.

The details can be found in perlfunc.

Keith











Luis Medrano <lmzaldivar at mac.com>
Sent by: 
spug-list-bounces at mail.pm.org
10/11/2004 10:10 AM

 
        To:     spug-list at mail.pm.org
        cc:     (bcc: Keith Reed/ATL-BTL/MS/PHILIPS)
        Subject:        SPUG: re-size array
        Classification: 




List,

I need your help. Any body know what is the best way to re-size array. For 
example:

@array=(1,2,3,4,5,6,7,8,9,10);

I need to remove 1,3,5,7,9 and I need to re-size @array to:

@array=(2,4,6,8,10);

the array I need to re-size or re-defined has 166771 elements. I really 
appreciate all your help.

Thanks,
Luis


_____________________________________________________________
Seattle Perl Users Group Mailing List 
POST TO: spug-list at mail.pm.org  http://spugwiki.perlocity.org
ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list
MEETINGS: 3rd Tuesdays, Location Unknown
WEB PAGE: http://www.seattleperl.org


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/archives/spug-list/attachments/20041011/37c7088c/attachment.htm


More information about the spug-list mailing list