Ok, you have a little mistake here.. It's all in "Case2":
my $Rubbish=join "",(split //,shift)[$_[1]..$_[2]];
Ok, before that you have $_[0], $_
1 and $_
2. Then you shift. That means that you take the first value ($_[0]), end delete it. So $_
1 becomes $_[0] and $_
2 becomes $_
1. And since there wasn't a $_
3 there won't be a $_
2 after that.
If you alter the line to the following it should work:
my $Rubbish=join "",(split //,shift)[$_[0]..$_[1]];
sorry, i made a mistake.. this WON'T work! see below..
Regards, octopus
--
GED/CC d-- s:- a--- C++(+++) UL+++ P++++$ L++>++++ E--- W+++@ N o? K? w-- O- M-(+) V? !PS !PE !Y PGP+(++) t-- 5 X+ R+(+++) tv+(++) b++@ DI+() D+ G++ e->+++ h!++ r+(++) y+