use strict; use warnings; my $path = <<'EOT'; \\127.0.0.1\c$\bak\ EOT $path =~ s/\\$//; printf "%s %s path %s\n", __FILE__, __LINE__, $path;