"John W. Krahn" <[email protected]> writes:
[...]
>> In other words is the perl interpreter working harder in one case?
>
> Yes.
Thanks. Do you have any idea how much worse it is?
I ask because I have some old scripts that go spinning thru the whole
hash in that same way, that I should probably track down and change
... They've worked when I used them... but I never checked about how
much overhead they incurred. And they are not used that often either.
[...]
> . . . . . . . . . . . . . . . . . . . . . . . . so $_ is *in* *the*
> *current* *directory* and there is no need to prepend anything to $_
> to use a file test on it.
Thanks, got it. and thanks for being patient.
>> [...] script snipped
>>
>> Yes, once I get it working... and figure out what is actually going on
>> in that compact code it is the kind of code I'd like to be able to
>> dash off (and read) some day.
>>
>> I don't see (yet) what is supposed to be happening here. There is a
>> lot happening that isn't obvious to me.
>>
>> $data{ $_ }{ $r2 }++
>> $data{ $_ } .. (ok thats what I called the end name)
>> Are {} playing the role of rgx delimiters in `{ $r2 }'
>
> What are "rgx" delimiters?
I meant regular expression delimiters .. often `//'
>> Or is it the same as saying:
>> $data{ $_ } eq $r2
>
> No.
How does it differ?
>> I'm not sure what roll the `++' plays there either.
>
> That is incrementing the value in $data{ $_ }{ $r2 }.
I guess I should have asked why is it incrementing that data and why
is $r2 in squiggly brackets?
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/