Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: regex error puzzle

by bmann (Priest)
on May 09, 2006 at 17:48 UTC ( #548282=note: print w/replies, xml ) Need Help??

in reply to regex error puzzle

It's actually the next regex that perl is complaining about.

Try changing the second to s/\Q$delete_candidate//; in order to escape the asterisks.

Update: Recounted line numbers... the regex in question is on line 10.

Update 2: Originally thought the error gave the line of the if statement... tye posted a correction while I was posting the first update.

Replies are listed 'Best First'.
Re^2: regex error puzzle (line no)
by tye (Sage) on May 09, 2006 at 17:53 UTC
    perl reports any error on line 10, the first line of the if block

    No, line 10 isn't the first line of the 'if' block. Perl does report misleading line numbers for some errors in 'if' blocks, but this is restricted to saying that errors in an 'elsif' conditional expression occurred on the line of the matching 'if'.

    - tye        

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://548282]
[Rabbi Bob]: We have a Jack Russell: off the leash she is a torpedo against mice, rats, chipmunks and squirrels
[Rabbi Bob]: Doesn't eat them, just snaps, kills, drops and moves on.
[thezip]: Efficient, that one.
[erix]: my dog could do the classic mouse jump (never caught a mouse :)
[erix]: he caught a hare once (must have been a young one...)
virtualsue uses arcane git commands to resurrect a file, gets it back into shape and quits for the day
[GotToBTru]: a few years ago, when we had 3 dogs, the largest of them caught a chipmunk, but did not know what to do with it other than hold it in his mouth
[GotToBTru]: my wife told him to spit it out, so he did
[erix]: yeah, modern dogs are cute tjhat way :)

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (14)
As of 2017-11-17 20:01 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (272 votes). Check out past polls.