in reply to Re: read directory
in thread read directory

Why doesn't my if-statement work?

Replies are listed 'Best First'.
Re^3: read directory
by choroba (Cardinal) on Dec 20, 2017 at 15:55 UTC
    OK, let's assume you start in "D:\Program Files" and run the script. It reads a filename from C:\, let's say temp. Your if tries to verify that the directory temp exists in the current directory, i.e. "D:\Program Files\temp" is a directory, which is false. My if, on the other hand, tries to verify that "C:\temp" is a directory, which is true.

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

      Thanks for responding