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

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.
  • Me likes, but you might want to extend your globs a bit.
    Range and hash support could make it look even better.

    before qr'/(\d+)' => run { set id => $1; };

    could become

    # hash, equivalent to /(\d+)
    before '/#' => run { set id => $1 }

    # range, for more specific matching (bit more complicated to implement but worth it imo)
    before '/[0-255]' => run { set id => $1 }

    # alternatives, would make sense too :)
    before '/{1|133|255}' => run { set id => $1 }

    • It's an interesting thought. Though once we get to ranges, it's almost easier to just use full regexps. (And everywhere we use globs, we can just use a full regexp and qr'' instead. Globs are really nice for the simple case. I'm not quite sure where to draw the line. But "#" feels really nice. The suggestion is much appreciated.