Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Comment on

# I've striped down the core dump example, # It no longer core dumps under v5.6.1 but it still returns the wrong +answer # Can anyone explain why /C(2)/ is not getting substituted? use strict; print doFunc( "MAIN", "B(1)+C(2)" ); sub doFunc{ my $theFunc = shift; local $_ = shift; my $re; $re = ${{ "B(1)+C(2)" => '1|2', }}{$_}||quotemeta; print "$theFunc: '$_'=~/$re/\n"; print join"\n",/(\w+)\(($re)\)/g,"\n"; $_ =~ s/(\w+)\(($re)\)/&doFunc($1,$2)/eg; # /ego works /eg fails return "func $theFunc returns <$_>"; } #should return #func MAIN returns <func B returns <1>+func C returns <2>> #

In reply to recursive /eg fails by I0

and:  <code> code here </code>

  • Please read these before you post! —
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (5)
    As of 2014-12-27 01:25 GMT
    Find Nodes?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?

      Results (176 votes), past polls