in reply to readdir fails?

I don't like these two lines:
$thefile = "/home/actionet/gallerymain" . $inode0; next if (-d $thefile);
because it seems that you are forgetting a slash.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: Re: readdir fails?
by rob_au (Abbot) on Mar 03, 2002 at 05:09 UTC
    ++merlyn ... And can be implemented much nicer and more cross-platform friendly with File::Spec ...

    use File::Spec; my $thefile = File::Spec->catfile('home', 'actionet', 'gallerymain', $ +inode0); next if -d $thefile;

     

    perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'