- or download this
splice @cities, (@cities-@states)+1, 0, shift @states for 0 .. @states
+-1;
- or download this
for ( 0..@states-1 ) {
splice @cities, ( @cities-@states)+1, 0, shift @states;
}
- or download this
for ( 0..@states-1 ) {
my $state = shift @states;
splice @cities, ( @cities-@states)+1, 0, $state;
}
- or download this
@citystates = map { $cities[$_], $states[$_] } (0..@cities-1);