Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Nested Conditional Statement Issue

by mincus (Chaplain)
on May 07, 2001 at 02:04 UTC ( #78401=note: print w/replies, xml ) Need Help??


in reply to Nested Conditional Statement Issue

Looking at that code, it doesnt appear that there is anything wrong with it on the surface..

I would suggest that you show us the data comming in, and comming out...

you might also want to throw some print statements in there which always help to find the problem.. ie-
foreach(@class) { ($id, $name, $credits) = split(/,/, $_); $x=0; while ($clen > $x) { print "COURSE: ->$course[$x]<- IE: ->$id<-$/"; if ($course[$x] eq $id) { $z++; } $x++; } }


in there so you can verify that your data is really what you think it is..

Good Luck!

UPDATE: chromatic made the excellent suggestion that I add something around to vars Im printing to check for white space, YATS (yet another time saver)


.mincus
telnet://bbs.mincus.com

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2021-09-27 16:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?