in reply to Re: Read Directory
in thread Read Directory

It checks (in an arcane way) for a directory named "BUS", but in the current directory

Sorry, no. BUS is just a bareword here with no meaning whatsoever for -d.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Replies are listed 'Best First'.
Re^3: Read Directory
by Corion (Patriarch) on May 26, 2017 at 07:12 UTC

    Had I tested my assumption, I would have come to that same conclusion:

    perl -we "print -d SCRIPTS" Name "main::SCRIPTS" used only once: possible typo at -e line 1. -d on unopened filehandle SCRIPTS at -e line 1. Use of uninitialized value in print at -e line 1.

    I thought the bareword would be treated as a string, but it gets treated as a filehandle.

    That's what I get for not using the old ways but lexical filehandles wherever I can :).