Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: unknown syntax error

by zork42 (Monk)
on Jul 05, 2013 at 09:20 UTC ( #1042664=note: print w/replies, xml ) Need Help??


in reply to unknown syntax error

Unrelated to the error but:

(1) This is probably wrong as you're ||-ing "$np[$a] eq $np[$b]" with itself:
34: if($np[$a] eq $np[$b] || $np[$a] eq $np[$b] || $np[$b] eq $np[$c]) ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ once and again

Maybe you meant:
v v 34: if($np[$a] eq $np[$b] || $np[$a] eq $np[$c] || $np[$b] eq $np[$c]) ^ ^


(2) Also your rexexps m/^\d.+/ can be simplified very slightly to m/^\d./ ie remove the +.
(I only mention this incase your rexexps are wrong.)

Replies are listed 'Best First'.
Re^2: unknown syntax error
by sahil2588 (Novice) on Jul 05, 2013 at 09:30 UTC
    hmmm well searched mike :). it seems this is the problem.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1042664]
help
Chatterbox?
erix .oO( apparently but does not GotToBFast )
[Discipulus]: now i must come back to my house/hoven monks: dont do interesting discussion in my absence!
[erix]: or apparently, now it does :)
[GotToBTru]: heh
erix prods ambrus to (re-)start cbstream...
[GotToBTru]: I've got a program with an if ... or ... statement with 80 clauses
[stevieb]: 80 clauses? dispatch table?
[GotToBTru]: no, lookup
[stevieb]: no, I mean have you considered using a dispatch table. an 80 condition if/else is huge :)

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (13)
As of 2017-06-22 12:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (519 votes). Check out past polls.