Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Test-a-Rex

by patgas (Friar)
on Sep 03, 2001 at 19:40 UTC ( [id://109880]=note: print w/replies, xml ) Need Help??


in reply to Test-a-Rex

Pretty cool. I'm getting some errors, though, whenever I enter an 's' or 'q' by itself in the RegExp box. I took a quick look at your code, but regexes make my brain hurt, and I'm definitely not qualified to give advice.

Scalar found where operator expected at (eval 90) line 1, near "q;$Match=$&;$PreMatch"
Scalar found where operator expected at (eval 131) line 1, near "s;$Match=$&;$PreMatch=$`;$PostMatch"

Hope that helps...

"We're experiencing some Godzilla-related turbulence..."

Replies are listed 'Best First'.
Re: Re: Test-a-Rex
by ChOas (Curate) on Sep 04, 2001 at 12:14 UTC
    Hey!,

    Yeah, known problem.. but I think I`ll take it as-is,
    it results from the program unleashing the regex, even while
    it is not totally finished, it being in an eval won`t crash the
    program, but the eval does....

    I might have opted for a 'try-it' button after one finishes writing
    the regex, but I think part of the strength of this program is that
    you can see the different matches/results while you are building/writing
    the regex


    GreetZ!,
      ChOas

    print "profeth still\n" if /bird|devil/;
      Just swtich off warnings for that section with no warnings; or trap the warning call with $SIG{__WARN__} or redirect STDERR to /dev/null with open STDERR, ">/dev/null";

      I recommend the third. You can redirect to anywhere (say a "log" file) for systems with no /dev/null

      ____________________
      Jeremy
      I didn't believe in evil until I dated it.

Re: Re: Test-a-Rex
by patgas (Friar) on Sep 04, 2001 at 21:56 UTC

    Well, I haven't used eval too much, but isn't there a way to catch it if it dies? Then you can just print a little error message in the status boxes if it blows up... Just a thought.

    "We're experiencing some Godzilla-related turbulence..."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://109880]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-03-28 22:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found