Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by tlm (Prior)
on Apr 01, 2005 at 10:36 UTC ( [id://444140]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    % perl -le 'print"@{[split//,join q(x),split/(?<=c)/,join(q(),qw(a b c
    + d c e foo f)),2]}"'
    a b c x d c e f o o f
    
  2. or download this
    % perl -le 'print"@{[split//,join q(x),split/(?<=c)/,join(q(),qw(a b c
    + d c e),q( ),q(f)),2]}"'
    a b c x d c e   f
    
  3. or download this
    perl -le 'print"@{[split/\0/,join qq(\0x),split/(?<=c)/,join(qq(0),qw(
    +a b c d c e foo f)),2]}"'
    a b c x d c e foo f
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 09:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found