Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Odd splice behavior between perl/OS versions

by SimonSaysCake (Beadle)
on Oct 28, 2016 at 17:53 UTC ( [id://1174907]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/local/bin/perl
    use strict;
    use warnings;
    ...
    splice(@stuff, $#stuff, 0, splice(@stuff, 3, 1));
    print "\nAfter:\n\n", join(",", @stuff), "\n";
    exit 1;
    
  2. or download this
    Before:
    
    one,two,three,four,five,six,seven,eight,nine,ten
    ...
    After:
    
    one,two,three,seven,eight,nine,ten,four,five,six
    
  3. or download this
    Before:
    
    one,two,three,four,five,six,seven,eight,nine,ten
    ...
    After:
    
    one,two,three,seven,eight,nine,four,five,six,ten
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1174907]
Approved by Corion
Front-paged by kcott
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2024-04-25 01:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found