Monday 7 February 2011

Perl Course help!

I need some help as to whether or not to do include something in a beginners perl course I am writing to run at work.

Courses I went on and textbooks I have read (including the excellent Modern Perl) mention the idiom '0 but true', to have a true 0.

Everyone in my office when I asked either went 'what?', 'why?' or 'just something not needed and is confusing'.

Personally, I agree with the 'why?' and 'confusing', so I'm inclined to leave it out. However, what do the community at large think? One of my colleagues has been programming Perl for 15+years, and has never seen it. Is this generally the case?

Thanks to any responses in advance that support either side of the argument, particularly with good reasoning.

Just to confirm my 4 reasons for leaving it out:

1) Never seen it used
2) Too confusing to explain to people experienced in Perl, let alone Newbies
3) Too confusing to read in code
4) Won't be automatically assigned to a variable when answer is 0 (4-4), so better to use defined

Andy