Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^5: perl -d myprog autostarts - but only in one specific directory

by pryrt (Monsignor)
on Jan 18, 2022 at 20:05 UTC ( #11140582=note: print w/replies, xml ) Need Help??


in reply to Re^4: perl -d myprog autostarts - but only in one specific directory
in thread perl -d myprog autostarts - but only in one specific directory

-e shows CON exists under windows:

C:\Users\peter.jones\Downloads\TempData>perl -le "print -e 'CON'" 1 C:\Users\peter.jones\Downloads\TempData>dir CON Directory of \\. File Not Found

in other words, that fix should work, if I understand it correctly.

crossposted to https://github.com/Perl/perl5/pull/19349#discussion_r787107781

  • Comment on Re^5: perl -d myprog autostarts - but only in one specific directory
  • Download Code

Replies are listed 'Best First'.
Re^6: perl -d myprog autostarts - but only in one specific directory
by bliako (Monsignor) on Jan 18, 2022 at 21:35 UTC

    yes, you are right.

    Can there be some magic behind that -e 'con' which obviously did not kick in in the Unix case? I tried to use logic in the absence of a windows machine, but that failed me, being m$! "CON" (like LPT, AUX and some others) are all DOS reserved words and can not be the name of files, unless doing some hack (which will confuse Perl!). So, I am not sure that your dir CON failed because of that restriction or because of not existing a CON file. In any event, your perl oneliner is proof enough.

      Sorry, yes, my point with the dir CON was to show there wasn't a filesystem file in the active directory called CON, that the -e "con" really was finding the magic CON, not some local file or directory that happened to be named CON. I guess I should have added more verbiage to explain that.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11140582]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2022-06-27 05:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (86 votes). Check out past polls.

    Notices?