in reply to Delete "/" in a string
Hello WTem, and welcome to the Monastery!
To remove all occurrences of a given string (in this case, the character /), use the substitution operator s/// together with the /g modifier:
12:39 >perl -wE "my $interface = 'POS1/0/0'; $interface =~ s{/}{}g; sa +y $interface;" POS100 12:39 >
See perlop#Regexp-Quote-Like-Operators and “Global matching” in perlretut.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|