Ramprasad A Padmanabhan wrote:
> 
> Hello all,

Hello,

>   Suppose I have a huge array of filenames and I want to move them
> I would like to  move 1 chunk at a time on 'n' elements
> 
> How Can I efficiently do it ?
> 
> something like
> 
> @allfiles  = (....)   # 10000 files
> @smallchunks = split_to_chunks(@allfiles,100);
>                       #  This function is what I want to write
> 
> foreach (@smallchunks) {
>          my $filelist = join(" ",@{$_});
>         ....
>         .....
> }

my @allfiles = (....)   # 10000 files

while ( my @smallchunks = splice @allfiles, 0, 100 ) {
    my $filelist = "@smallchunks";
    }


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to