Just a note of caution. I'm not familiar with your use-case, but might simply deleting the / (forward-slash) delimiters be ambiguous? Consider 'POS1/23/4' versus 'POS12/3/4' etc. Maybe better to replace with an innocuous character (note: no /d modifier needed here):
c:\@Work\Perl>perl -wMstrict -le "use 5.014; ;; my $s = 'POS1/23/4'; ;; my $t = $s =~ tr{/}{-}r; print qq{'$s' -> '$t'}; " 'POS1/23/4' -> 'POS1-23-4'
Update: See tr/// in Quote-Like Operators section in perlop.
In reply to Re: Delete "/" in a string
by AnomalousMonk
in thread Delete "/" in a string
by WTem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |