[Omaha.pm] opendir, readdir vs. glob

Jay Hannah jay at jays.net
Tue Sep 26 06:08:04 PDT 2006


On 9/25/06, Andy Lester <andy at petdance.com> wrote:
> On Sep 25, 2006, at 9:22 PM, Jay Hannah wrote:
>> Ok, when glob is this easy to use why have I been using opendir and
>> readdir for years?
>
> Because you didn't know better.

Why does anyone ever use opendir and readdir? Why aren't they  
deprecated and removed?

>> Anyone out there using Perl on
>> Windows? Does glob work there?
>
> Yes, it does.

Cool. Not that I own a Windows machine, or do any Real Work on  
Windows. Just curious. :)

On Sep 26, 2006, at 6:13 AM, Dave M wrote:
> glob is nice and easy. I think the only time I end up using readdir is
> when I want to be specific about what I'm globbing, in which case I
> mix it with grep.

Why use readdir? Why not just grep your glob?

j
(Please don't tell my mother I suggested you grep your glob. -grin-)





More information about the Omaha-pm mailing list