#! /usr/bin/perl sub bash_q_esc { # my $text = shift ; $text =~ s/\\\\/\\\\\\\\/g ; $text =~ s/(?) { chomp ; my $rtr = bash_q_esc($_) ; my $cmd_rtr ; open FH, ">$dir/$_" || die "can't open $_ $?\n" ; close FH ; $cmd_rtr = `ls -l "$dir/$rtr"` ; #harmless shell pipeline print "rtr=$cmd_rtr\n$_\n$rtr\n" ; } print "--------------" ; #mean file names: __DATA__ ` 123 # ` 456 $ e ` file name $ no esc $ in the $ $tring$ "file name in quotes" $ esc \$ in the \$ $tring$ back slashes \ \ end \$ back slash $ start this and end $\ mean file \\\\\\\?\\ fg \n \b ==?`