http://qs321.pair.com?node_id=784507


in reply to Re: anonymous subroutines assigning regexes to hash keys
in thread anonymous subroutines assigning regexes to hash keys

Thanks so much for responding to the actual question. I just wrote an abstract piece of code, not the actual code that I was using. I tried both of the solutions though, and neither brought back a result. Any ideas? I appreciate it.
  • Comment on Re^2: anonymous subroutines assigning regexes to hash keys

Replies are listed 'Best First'.
Re^3: anonymous subroutines assigning regexes to hash keys
by ikegami (Patriarch) on Jul 30, 2009 at 07:06 UTC

    It's impossible for those expressions to return nothing back.

    It's impossible an expression to nothing back in scalar context.

    If they return undef, then the pattern didn't match. Make sure $_ contains what you think it should.

    If they return a zero-length string, it's because that's what they successfully matched.