Feb 16, 2007, 5:40 AM
Post #15 of 16
2/ When asking a question, the best approach is to supply a short, but complete program that we can run, together with an explanation of the output that you expect to see. Thats almost impossible to forfil. The script is too large to condense and in my experience, anyone who pastes more than ten lines of code gets ignored anyway!
See above! I did see what the problem was and corrected it.
3/ Perl has two completely different sets of logical comparison operators. ==, !=, >, >=, <, <= and <=> all treat the two operands as numbers. eq, ne, gt, ge, lt, le and cmp all treat the two operands as strings. See perldoc perlop
(the sections on relational operators and equality operators) for more details.
I assume this is another area where the author of "Perl for Dummies" doesn't really know what he's talking about and therefore writes a confusing explanation :-)
You know, for a book that actually led me to this site (its listed in ten good resources near the end), you are very harsh on the author. If anything, it showed me this place to get more information, and in response to your point, it does mention and explain the differences between < and lt, eq and == etc etc The information you provide on here is invaluable to me and everyone else that uses this site. But I would like to share with you a saying that is with me everyday that I work at sea - assumption is the mother of all f?*! ups. Please dont assume anything is bad simply because someone writes a bad review or all the bits of the book dont match your ideas of what it should be. For Dummies like me, using it purely for referencing back to terminology its ok. Its not great I agree, but it has helped me in the past. And I do reference to Cpan, perldoc and other sites. I have taken your suggestion to change and I have now put it in the cupboard and rely on my copy of core. Im changing the error of my ways! Re:Bad Author, my limited knowledge of BASIC programming stood me in good stead with Dummies. So when the author runs off into big scripts and doesnt explain them the way others think he should, I can usually decypher and understand them. What works for one person, doesnt necessarily work for the others. And of course, I thankfully have this place to search through!
veritas vos liberabit ~ The truth shall set you free