Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Empyting an array inot multiple arrays

by clueless newbie (Hermit)
on Oct 27, 2011 at 17:20 UTC ( #934190=note: print w/ replies, xml ) Need Help??


in reply to Empyting an array inot multiple arrays

Offered for consideration --- Note it neither really creates the arrays @array1,@array2,@array3 nor does it really clear @array_original.

#!/usr/bin/perl use Data::Alias; use Data::Dumper; use strict; use warnings; my @Array; $Array[$_]=$_ for (0..29); alias my @Array_1=@Array[0..9]; alias my @Array_2=@Array[10..19]; alias my @Array_3=@Array[20..29]; warn Data::Dumper->Dump([\@Array,\@Array_1,\@Array_2,\@Array_3],[qw(*A +rray *Array_1 *Array_2 *Array_3)]);


Comment on Re: Empyting an array inot multiple arrays
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://934190]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2015-07-06 17:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls