Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by ikegami (Pope)
on Mar 31, 2005 at 19:07 UTC ( #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
Node Status?
node history
Node Type: note [id://443933]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2020-11-30 01:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?