in reply to Re: The N-queens problem using pure regexes
in thread The N-queens problem using pure regexes

Home work question: the code above is lacking something vital. What is it not doing what it should do?

Not clearing $@ ?


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail

  • Comment on Re: Re: The N-queens problem using pure regexes

Replies are listed 'Best First'.
Re: The N-queens problem using pure regexes
by Abigail-II (Bishop) on Oct 11, 2003 at 01:49 UTC
    Clearing $@ isn't necessary. $@ is guaranteed to be a "null string" (sic) if there's no error in an eval block or string.

    But it has to do something with the eval.

    Abigail

      Other than perhaps checking that /usr/bin/time was found, accepted it's parameters, was able to execute the command and completed successfully returning a sensible value in $time, nothing particularly leaps off the screen at me.

      Hopefully, despite being vital, it's something non-obvious, else I'm gonna feel a bit foolish:)


      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "Think for yourself!" - Abigail

        There is an alarm that aborts the piece of code running in the eval block, to avoid having to wait for a program that may take a long time to run. However, that potentially long running program isn't killed - it just keeps on running, till it either finds an answer, or gets killed manually (guess what happened ;-)).

        Abigail