in reply to Re^2: Hi Monks could you pls help Perl dummy user
in thread Hi Monks could you pls help Perl dummy user

No no, it has to have five defined , like this
while ( defined defined defined defined defined( my $file = readdir $d +h ) ) {

Replies are listed 'Best First'.
Re^4: Hi Monks could you pls help Perl dummy user
by Anonymous Monk on Dec 17, 2014 at 11:08 UTC
    Mmmm, I thought only readline is special-cased. Who can remember all this ****.

      Mmmm, I thought only readline is special-cased. Who can remember all this ****.

      :/

      $ perl -MO=Deparse -le " while( my $f = readdir $DIR ){ print $f; } " BEGIN { $/ = "\n"; $\ = "\n"; } while (defined(my $f = readdir $DIR)) { do { print $f }; } -e syntax OK
        I know how to use Deparse, ty. I'd rather just put defined in there without caring whether Perl is clever enough to DWIM.