in reply to adding ";" to void elements

#!/usr/bin/perl use strict; use warnings; map { print if s/\A (\w;\d) (?!;\d) / $1; /xms } <DATA>; __DATA__ a;3 b;2;3 c;5;4 d;6
Output : a;3; d;6;
hth,

Poolpi

Replies are listed 'Best First'.
Re^2: adding ";" to void elements
by chromatic (Archbishop) on Feb 12, 2008 at 19:08 UTC
    map { print ... }

    That's worth at least two fifteen-yard penalties right there! I'm sort of horrified and impressed.

      It's for error checking, of course
      any { !$_ } map { print ... } ... and die;
      ;)