Output: C:\Temp>splice_tst.pl --debug --config --enter --config --config --enter --help Before Array Splicing: --debug,--config,--enter,--config,--config,--enter,--help Splicing Value: --config --config is located at index(s): 1,3,4 Index:1 Index:2 Index:2 After Array Splicing: --debug,--enter,--enter,--help Before Array Splicing: --debug,--enter,--enter,--help Splicing Value: --enter --enter is located at index(s): 1,2 Index:1 Index:1 After Array Splicing: --debug,--help C:\Temp>