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

Odd splice behavior between perl/OS versions

by SimonSaysCake (Beadle)
on Oct 28, 2016 at 17:53 UTC ( #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? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2022-11-29 02:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?