Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Using Splice with Two Arrays within a loop

by Anonymous Monk
on Jun 10, 2013 at 17:32 UTC ( #1038125=note: print w/ replies, xml ) Need Help??


in reply to Re: Using Splice with Two Arrays within a loop
in thread Using Splice with Two Arrays within a loop

Hi, Sorry to clarify I have an assignment that requires the following to be done: "This program can be made both shorter and faster by using a built-in function named splice that will remove a specified number of elements from the @_ array at once, rather than the one-at-a-time that shift does." As you can see from my output I am doing something wrong. Can someone help me out. I need to use splice to resolve this. Thanks


Comment on Re^2: Using Splice with Two Arrays within a loop
Replies are listed 'Best First'.
Re^3: Using Splice with Two Arrays within a loop
by Anonymous Monk on Jun 10, 2013 at 18:28 UTC
    You're supposed to split the argument list into two with splice before the loop.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (14)
As of 2015-07-31 13:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (277 votes), past polls