schms schreef:

> opendir DH, $DIR or die "Cannot open '$DIR' $!";
> print map "$DIR/$_\n", readdir DH;
> closedir DH;

Looks very 'global variables' oriented to me. 

Compare to:

  {   opendir my $dh, $dir
          or die "Cannot open '$dir': $!";

      while (my $e = readdir $dh) {
          $e = "$dir/$e";
          -d $e and $e .= "/\t<--";
          print "$e\n";
      }
      closedir $dh;  #  no need, is implicit
  }

-- 
Affijn, Ruud

"Gewoon is een tijger."

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to