in reply to Delete "/" in a string

Hi WTem, welcome to the monastery. As with all things Perl, there is more than one way to do this. As long as you have at least Perl 5.14 (which added the /r regex modifier), this will work too and wont touch the original $interface value:

my ($ip,$interface) = ('192.168.1.1', 'POS1/0/0'); my $filename = sprintf '%s--%s.txt', $ip, $interface =~ s#/##gr; print $filename, "\n";
will print:
192.168.1.1--POS100.txt