Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

TeeJay (2309)

TeeJay
  (email not shown publicly)
http://www.aarontrevena.co.uk/

Working in Truro
Graduate with BSc (Hons) in Computer Systems and Networks
pm : london.pm, bath.pm, devoncornwall.pm
lug : Devon & Cornwall LUG
CPAN : TEEJAY [cpan.org]
irc : TeeJay
skype : hashbangperl
livejournal : hashbangperl [livejournal.com]
flickr :hashbangperl [flickr.com]

Journal of TeeJay (2309)

Thursday October 17, 2002
08:45 AM

cool tutorial and why to think before you use a regex

[ #8425 ]
http://www.neuralust.com/~mingdocs/lessons/graph-bars/tutorial2.php

3d bar charts in flash using ming.

In other news - regex's aren't always the best way to parse stuff - most of the time its quickest to use split and then work on smaller simper chunks.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Split is a subversive use of a regex though... Really, you meant to use Parse::RecDescent, right? :-)

    -Dom

    • Yes

      I mean its often better to attack a problem with tr, split, etc rather than building a regex to solve a problem thats already solved by a pattern based function, even using a glob or some other function.

      Of course if there is a module that parses something better - be is Parse::Excel, DBD::CSV or Parse::RecDescent (eeek! grammars!!) then we should use those.

      I was just surprised that I wrote a huge and awkward regex to parse lines of IIS logs when they were a space seperated list with a handy dandy c

      --

      @JAPH = qw(Hacker Perl Another Just);
      print reverse @JAPH;