in reply to Re^2: remove chars with regexin thread remove chars with regex
To remove the middle instead of keeping the middle, you could use
substr( $char, 5, -5, "" ); # In-place [download]
my $output = substr( $char, 0, 5 ) . substr( $char, -5 ); [download]