Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Suggestion for regular expression speed improvement.

by QM (Parson)
on Jun 15, 2009 at 17:37 UTC ( #771730=note: print w/replies, xml ) Need Help??

in reply to Suggestion for regular expression speed improvement.

Hi bala.linux,

To put a finer point on the previous responses...

I see you've just joined Perlmonks, and this seems to be your first post. Given that, everyone will cut you some slack, to a point.

Regarding Text::CSV_XS (emphasis mine):

The module accepts either strings or files as input and can utilize any user-specified characters as delimiters, separators, and escapes so it is perhaps better called ASV (anything separated values) rather than just CSV.

So I would respectfully suggest that you haven't considered the degree of the generic solution provided by T::C. I'd suggest rereading the module doc several times, and trying a few toy examples to give you the flavor of it's capabilities, and whether any drawbacks it holds are acceptable for you.

For myself, I use it in a few scripts, and it is amazingly fast, and yet very configurable. Googling for reviews finds lots of similar opinions.

Otherwise, I'd go with the coderef idea. Give your users a few examples based on log files you've encountered, just to be helpful. But there are a lot of pitfalls here, not even considering malevolent code.

BTW, come back here often, and read up on anything that catches your fancy. This is the best place I know to get your Perl questions answered. You'll learn a lot by reading, and more by asking questions. Good luck.

Quantum Mechanics: The dreams stuff is made of

  • Comment on Re: Suggestion for regular expression speed improvement.

Replies are listed 'Best First'.
Re^2: Suggestion for regular expression speed improvement.
by bala.linux (Novice) on Jun 15, 2009 at 18:02 UTC
    Yes you are right. I might have registered today, but I always follow this site. Because google every time drops me here for any perl related query :) Regarding T::C module, frankly I have not evaluated so far. I would like to do that to see how best I can use that module to my project. Thanks for your suggestion.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://771730]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2021-05-11 16:27 GMT
Find Nodes?
    Voting Booth?
    Perl 7 will be out ...

    Results (119 votes). Check out past polls.