Berkeley CSUA MOTD:Entry 29522
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/07/09 [General] UID:1000 Activity:popular
7/9     

2003/9/6 [Computer/SW/Languages/Perl] UID:29522 Activity:high
9/5     Is there a way to get perl to auto-escape all characters of a filename?
           \_ "\Q..\E" http://www.perldoc.com/perl5.8.0/pod/perlre.html
        Something that could be used in
        foreach $file ( <*.txt> ) {
                $escapedFile = superEscapeFunction($file);
                ...
                system("cp $escapedFile ../$escapedFile");
                ... etc.
        }
        Thanks