Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 browsing the Monastery: (5)
As of 2014-12-29 02:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls