Shouldn't perl -T -e"do'./t\t.pl'" and perl -T -e"do'.\t\t.pl'" do the same thing
Yes. "/" and "\" are equivalent in Windows paths.
I can replicate the problem with ActivePerl 5.6.0, 5.6.1, 5.8.0, 5.8.8, 5.10.0.
Seems the logic for whether @INC should be used or not is broken. Under -T, @INC doesn't contain ".", and do'.\t\t.pl' is using @INC instead of the cd.
(and print 'hi').
Seems so. 5.8.8 on linux:
$ perl -le'@INC=(); do "t/t.pl"'
$ perl -le'@INC=(); do "./t/t.pl"'
hi
$ perl -T -le'@INC=(); do "t/t.pl"'
$ perl -T -le'@INC=(); do "./t/t.pl"'
hi
Update: Added comparison to linux and explanation of problem.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.