Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Inserting an element into an array after a certain element

by ikegami (Patriarch)
on Mar 31, 2005 at 19:07 UTC ( [id://443933]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $first = 1;
    @array = map {
    ...
          $_
       }
    } @array;
    
  2. or download this
    my $first = 1;
    @array = map {
    ...
       $first ||= @a-1;
       @a
    } @array
    
  3. or download this
    foreach (0..$#array) {
       if ($array[$_] eq "c") {
    ...
          last;      
       }
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-23 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found