Erm, no.
$ perl -E 'my $file="Bob_Smith"; $file =~ s/_/\\_/g; say $file' Bob\_Smith
You're doing something wrong; this isn't the actual code you're using, or you're not showing us something (for instance if you're using Data::Dumper to print things out it's going to show you the string as you'd give to perl which of course would need the backslash doubled inside a "" string).
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: Extra backlash getting added to string
by Fletch
in thread Extra backlash getting added to string
by newperldeveloper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |