Re: Searching a sorted array of strings



one man army wrote:
In article <1141160984.105622.40170@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"Paul Lalli" <mritty@xxxxxxxxx> wrote:

one man army wrote:
Subject: Searching a sorted array of strings

Did you check the Perl FAQ before sitting down to write your own
routine?
This is why you check the FAQ for a language *before* you start using
it - particularly if you're not especially familiar with that language.

Paul Lalli

<< FLAME >>

Well, good of you to let us all know what kind of person you are in
advance.

actually, I have the (rambling) Camel book, and the Perldoc FAQ online
right here.

Shame you didn't use them.

I finished this routine, Paul, and posted it to share.

Yes, you did. I'm still confused as to why. The Perl FAQ I pointed
you to has a far better solution to your stated goal. I am at a loss
as to what your point is.

Did I ask for constructive comments?

Yes. Which is exactly what I gave. There is nothing more constructive
than telling future readers "This solution is sub-optimal. Here is a
better one."

Why did I know I would immediately be met with "RTFM"

Probably because you didn't... or at least, didn't take the next
natural step and follow the advice given in TFM.

and "you cant do that"?

Well, since you snipped the portion of my reply that's relavent here,
let me explain. You stated you had tried to use the qw// shortcut.
That is admirable, as it's a useful tool. But you also stated that you
encountered problems (neglecting, btw, to expand upon what those
problems were - but I did extrapolate). My "You can't do that" was
intended to inform you that you did nothing wrong in your attempt to
use qw//, that it is a feature/bug/limitation of the operator that it
cannot be used for strings which contain a space character. I do
apologize if you misinterpreted that statement.

anyway, enough of that...

Quite.

Paul Lalli

.