You can use index to find the position of the "1" and the four-argument form of substr to replace it.
knoppix@Microknoppix:~$ perl -E ' > $str = q{mystring123456}; > substr $str, index( $str, q{1} ), 1, q{}; > say $str;' mystring23456 knoppix@Microknoppix:~$
I hope this is helpful.
Cheers,
JohnGG
In reply to Re: How do I cut single characters out of a string
by johngg
in thread How do I cut single characters out of a string
by akechnie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |