Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How do I insert an element into an arbitrary (in range) array index?

by Denis.Beurive (Initiate)
on Jul 07, 2010 at 12:38 UTC ( [id://848439]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub arrayInsertAfterPosition
    {
    ...
    print join(', ', @res) . "\n";
    @res = arrayInsertAfterPosition (\@tab, 5, 'Test');
    print join(', ', @res) . "\n";
    
  2. or download this
    Test, A, B, C, D, E
    A, Test, B, C, D, E
    ...
    A, B, C, D, Test, E
    A, B, C, D, E, Test
    A, B, C, D, E, Test
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://848439]
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: (3)
As of 2024-09-08 16:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.