Wyman G has asked for the wisdom of the Perl Monks concerning the following question:
@cities = (Atlanta, Birmingham, Chicago, Memphis, "New York"); @states = (GA, AL, IL, TN, NY); print "Cities: @cities" . "\n"; print "States: @states" . "\n"; splice @cities, (@cities-@states)+1, 0, shift @states for 0 .. @states +-1; print "@cities" . "\n";
Edit Masem 2001-12-21 - CODE tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: splice and for loop together??
by Masem (Monsignor) on Dec 22, 2001 at 00:46 UTC | |
|
(crazyinsomniac) Re: splice and for loop together??
by crazyinsomniac (Prior) on Dec 22, 2001 at 15:26 UTC |