[EMAIL PROTECTED] into the middle of @players without removing any elements
from @players.

so i've done the following...

#!/usr/bin/perl -w

# extracting elements using splice

@players = ("ryno", "fukudome", "grace", "banks", "santo",
            "soto", "marmol", "sori", "bigZ", "pie");
@dump = splice(@players, 0,2, "theriot", "sosa");
print "The original array is @players\n";
print "The players dumped after the splice are: @dump.\n";
print "The spliced array is now @players.\n";


...but I'm not sure I'm doing the splice correct, because the first
line prints all the players including the ones stated in @dump. should
i be using negative offset or length?


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to