SPUG: Re: re-size array

John W. Krahn krahnj at telus.net
Tue Oct 12 08:30:57 CDT 2004


michaelrwolf at att.net wrote:
> Pedant alert -- I'm an isstructor, too.
> 
> Don't get the words confused: splice and slice.
> 
> splice -- a built-in function
>     splice(ARRAY,OFFSET[,LENGTH[,LIST]])
> 
> 
> slice -- a concept.  An indexing (or lookup) operation
> on an array (or hash) that returns a list.
               (or list)


>     @array_slice = @array[index list goes here];
>     @hash_slice = @hash{key list goes here};
       @list_slice = ( LIST )[index list goes here];


John
-- 
use Perl;
program
fulfillment


More information about the spug-list mailing list