in reply to Re: Directory Listing to an Array
in thread Directory Listing to an Array

(minor bug) this will fail on a directory named 0. either use japhy's solution above (which checks the length of @_,) or check $_[0] for definedness, not truth.

~Particle ;Þ

Replies are listed 'Best First'.
Re: Re: Re: Directory Listing to an Array
by ehdonhon (Curate) on Apr 11, 2002 at 11:41 UTC

    Ohh, yeah. Good point. It will be nice in perl 6 when we can say

    my $dir = shift // '.';

    :-)