There is more than one way to do it in Perl [tm]. Which one is more efficient depends on many things. You can set up a test bench and run each implementation on it and measure time or something else if you really want to know. The VB version uses at least an array of pointers of thes size of the input array but it does not tell you about it. Peter -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads