in reply to Re: split snafus
in thread split snafus

geez. That'd take me a long time to get my head around it... Thanks! There's enough there for me to explore and learn :-)

Replies are listed 'Best First'.
Re^3: split snafus
by jwkrahn (Abbot) on Jun 17, 2008 at 12:25 UTC

    It should be more readable to do it like this:

    my %hFields; while ( $line =~ / \( (\d+) \* ([^)]+) \) /gx ) { $hFields{ $2 } += $1; }
      d'oh! Yeah, it all makes sense now ...
Re^3: split snafus
by planetscape (Chancellor) on Jun 18, 2008 at 16:12 UTC
      Excellent references - just the stuff I was looking for. Thank you!