in reply to IO::Dir confusing behaviour

I would think that the "works" cases are actually when the tie fails. You should check for that case:

if( ! tie %arquivos, IO::Dir, $folder ) { print "Can't read directory ($folder): $!\n"; } else { # ... }

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
Re: (tye)Re: IO::Dir confusing behaviour
by DaWolf (Curate) on Nov 21, 2001 at 23:14 UTC
    Hey tye.

    A good guess, but if the tie fails then it shouldn't show me any files in the directory. If I select some files to upload, the upload is done and the script show them correctly.

    Er Galvão Abbott
    a.k.a. Lobo, DaWolf
    Webdeveloper