"Rob Dixon" <[EMAIL PROTECTED]> writes:
> No. I wrote the code to derive the file type from an 'lstat'
> call in a previous post and thought you were happy with that.
Yes, I was happy with it. It does all I need.
Further ponderings weren't really related to what I'm doing with it.
You've solved
Harry Putnam <[EMAIL PROTECTED]> wrote:
> Steve Grazzini <[EMAIL PROTECTED]> writes:
>> Harry Putnam <[EMAIL PROTECTED]> wrote:
>>>
>>> I've seen that `_' crop up before
>>> I don't understand what this means.
>>
>> It's documented in perlfunc:
>
> Yes, I saw it there too. I must be having a par
times using _');
$t->report;
# using stat on each test
$t->start('1 times using stand');
eval $without_;
$t->stop('1 times using stand');
$t->report;
<~~ Paste
- Original Message -
From: "Rob Dixon" <[EMAIL PROTECTED]>
T
Harry Putnam wrote:
> Steve Grazzini <[EMAIL PROTECTED]> writes:
>
> > Harry Putnam <[EMAIL PROTECTED]> wrote:
> > > "Janek Schleicher" <[EMAIL PROTECTED]> writes:
> > > >
> > > > The underscore _ holds the results of the last stat call
> > > > (implicitly called by the -f operator), so no unnecess
Steve Grazzini <[EMAIL PROTECTED]> writes:
> Harry Putnam <[EMAIL PROTECTED]> wrote:
>> "Janek Schleicher" <[EMAIL PROTECTED]> writes:
>>>
>>> The underscore _ holds the results of the last stat call
>>> (implicitly called by the -f operator), so no unnecessary
>>> work needs to be done.
>>
>>
Harry Putnam <[EMAIL PROTECTED]> wrote:
> "Janek Schleicher" <[EMAIL PROTECTED]> writes:
>>
>> The underscore _ holds the results of the last stat call
>> (implicitly called by the -f operator), so no unnecessary
>> work needs to be done.
>
> I've seen that `_' crop up before
> I don't understan
"Janek Schleicher" <[EMAIL PROTECTED]> writes:
> Well, yes of course I can run each filename thru all those tests, but that
>> seems kind of like a lot of huffing and puffing. I wondered if there
>> isn't something that just spits it out.
>>
>> perl `stat' does do that very thing in element[2]
Harry Putnam wrote at Sat, 07 Jun 2003 02:18:32 -0700:
>> So you can use:
>>
>> if (-f $file) {
>> :
>> # process file
>> }
>> elsif (-d $file) {
>> :
>> # process directory
>> }
>> }
> Well, yes of course I can run each filename thru all those tests, but that
> seems kin
"Rob Dixon" <[EMAIL PROTECTED]> writes:
Thanks for the good description of the reasons for `my %types'
> Yes. My apologies - I'm travelling at the moment and I have no Unix
> system with me to test on. Change that line to use 'lstat' instead:
>
> my $type = (lstat $file)[2] & S_IFMT;
Yeah, now
"R. Joseph Newton" <[EMAIL PROTECTED]> writes:
> If you can tell us a little more about the context and sense in which you
> are seeking file type information, we may be able to help you find the
> distinctions appropriate to that context.
First... point taken about the bit-anding. But as you sa
Harry Putnam wrote:
> Probably a no-brainer, but I wondered what is the canonical way or
> possibly a module that does this chore:
>
> Identify files by type similar to `-type' flag to unix `find' command.
> I first thought of the stat function, but I see I'm confused about
> what that does. None
Harry Putnam wrote:
> "Rob Dixon" <[EMAIL PROTECTED]> writes:
> >
> > This code will build a map of 'stat' type values to the seven type
> > operators that you list. Not all of them may be active on your system.
> > You can obviously modify the code to return the value you want.
> > You need to imp
"Rob Dixon" <[EMAIL PROTECTED]> writes:
>
> This code will build a map of 'stat' type values to the seven type
> operators that you list. Not all of them may be active on your system.
> You can obviously modify the code to return the value you want.
> You need to import the symbolic mode values usi
Harry Putnam wrote:
> "Rob Dixon" <[EMAIL PROTECTED]> writes:
>
> > So you can use:
> >
> > if (-f $file) {
> > :
> > # process file
> > }
> > elsif (-d $file) {
> > :
> > # process directory
> > }
>
> Well, yes of course I can run each filename thru all those tests, but
> t
"Rob Dixon" <[EMAIL PROTECTED]> writes:
> So you can use:
>
> if (-f $file) {
> :
> # process file
> }
> elsif (-d $file) {
> :
> # process directory
> }
Well, yes of course I can run each filename thru all those tests, but
that seems kind of like a lot of huffing and puff
Harry Putnam wrote:
> Probably a no-brainer, but I wondered what is the canonical way or
> possibly a module that does this chore:
>
> Identify files by type similar to `-type' flag to unix `find' command.
> I first thought of the stat function, but I see I'm confused about
> what that does. None
Probably a no-brainer, but I wondered what is the canonical way or
possibly a module that does this chore:
Identify files by type similar to `-type' flag to unix `find' command.
I first thought of the stat function, but I see I'm confused about
what that does. None of the array elements are about
17 matches
Mail list logo