$ perl -E 'my $file="Bob_Smith"; $file =~ s/_/\\_/g; say $file' Bob\_Smith