in reply to Re: WARNING!! Possible Brainbench spoilers (do NOT read unless you've taken and passed the cert)
in thread WARNING!! Possible Brainbench spoilers (do NOT read unless you've taken and passed the cert)

That is one of the goofiest context-things I've ever seen. Must mean why if you want the number of matches, you need to do
my $data = () = "Hello World" =~ /(.*) (.*)/;

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested

  • Comment on Re^2: WARNING!! Possible Brainbench spoilers (do NOT read unless you've taken and passed the cert)
  • Download Code

Replies are listed 'Best First'.
Re^3: WARNING!! Possible Brainbench spoilers (do NOT read unless you've taken and passed the cert)
by tachyon (Chancellor) on Jul 02, 2004 at 22:55 UTC

    Perhaps it is because of the difficulty in defining matches? For example I would call this example one match that *returns* a two element array ( $1, $2 ). I might well expect it to return 1, you evidently expect 2. I do agree that it is non intuitive.

    cheers

    tachyon