Help for this page
use Modern::Perl; use strict; ... my $dest = q{UK Mobile - Vodafone [GBRVF] [MSRN]}; $dest =~ s/(\W+)\s?(\[MSRN\])?/_/g; say $dest;