[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] opendir, readdir vs. glob



On 9/26/06, Jay Hannah <jay@jays.net> wrote:
On 9/25/06, Andy Lester <andy@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?

Purely habit. The first time I was trying to figure out how to do
that, that was the example I saw.