in reply to The read function and newlines

I did something similar yesterday using Lingua::EN::Splitter's words() function.

Replies are listed 'Best First'.
Re^2: The read function and newlines
by BrowserUk (Patriarch) on Jul 04, 2010 at 03:29 UTC

    Which left you with lots of nonsensical words like 's', 't', 'm', 're', 've', 'll', & 'isn', 'don', 'doesn', 'aren', 'wouldn', 'shouldn', 'couldn'...

    Much the same as if you had used split '\W+', $scalar. Because, after loading jiggabytes of stuff you're not going to use, that's exactly what you did. Just more slowly, laboriously and obscurely. And without an easy option for correcting for the above limitations.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      And without an easy option for correcting for the above limitations.

      See the set_non_word_regexp() method.

      Because, after loading jiggabytes of stuff you're not going to use....

      Here's a tuppence; go buy yourself a second megabyte of RAM.

        Here's a tuppence; go buy yourself a second megabyte of RAM.

        Well actually I already have the maximum amount of memory my hardware can handle, so I'll need thr'pence more for a new box.

        And as my current box runs as much memory as my OS can handle, I'll need another tanner to cover the cost of upgrading the OS and the entire tool chain.

        And a bob or two more for developing and testing replacements for all the bespoke software in the systems.

        Hm. Getting a bit pricey now. Still, I can always sack half a dozen programmers and outsource the work to a cheaper labour force.

        (Why am I reminded of the former biggest car industry in the world and their V8 shopping cars?)


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.