[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-beginners
Subject:    Re: How to test for existence of file with non-ascii characters
From:       Uri Guttman <uri () stemsystems ! com>
Date:       2018-12-26 18:20:27
Message-ID: bd97314b-82aa-424e-ecc0-8e866810fc3d () stemsystems ! com
[Download RAW message or body]

On 12/26/18 7:31 AM, Mike Martin wrote:
> Any ideas how to test for the existance of a file, when the file name 
> contains extended ascii characters
>
> For example if the file contains emdash (U-2014) file -e always 
> returns false
>
>

-e should not be looking at the filename directly. it checks if the file 
exists in the directory. post some actual code you use to test this. 
possibly you are missing the directory in the path. if you are using 
readdir or similar, it only gives you the file name. if you use that 
value with -e it will fail as the directory path isn't being passed to -e.

uri

-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic