# New Ticket Created by Father Chrysostomos # Please include the string: [perl #129183] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=129183 > On Unix, entries in PATH are separated by : and may validly contain backslashes. ‘perl -S’ erroneously To demonstrate: $ mkdir ~/'\' $ cat > ~/'\'/foo #!/usr/bin/perl print "Hahaha!\n"; ^D $ chmod +x ~/'\'/foo $ PATH=~/'\':$PATH foo Hahaha! $ PATH=~/'\':$PATH perl -S foo Can't find foo on PATH. $ echo $PATH /Users/sprout/\:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/bin perl is reading the initial ‘/Users/sprout/\:/usr/bin’ as one PATH entry, which is wrong. The Perl_find_script function in util.c uses delimcpy to find the colon. delimcpy allows the terminator to be escaped, which is inappropriate for this call site. -- Father ChrysostomosThread Next