Syntactic Confectionery Delight | |
PerlMonks |
exists (EXPR), autovivified and conditionalsby barrd (Canon) |
on Sep 28, 2003 at 13:56 UTC ( [id://294744]=perlquestion: print w/replies, xml ) | Need Help?? |
barrd has asked for the wisdom of the Perl Monks concerning the following question:
Hello there all, I have a couple of questions after trying to solve a small problem in a programme I am currently working on which lead me into deeper water. The basic synopsis of the problem was creating a conditional with exists using an if / else construct. This didn't work, so a RTFM session followed.
(Q1) WTF does autovivified mean? There is no such word in the English language, there is however "auto" which in this context I take to mean automated and "vivified" which means "To endue with life; to make to be living; to quicken; to animate". The point being I believe (maybe incorrectly) that this could be the crux of my problem trying to use else.
(Q2) Why no conditionals except if and unless?
This, for those of you who know what I'm on about doesn't work so I came up with something along the lines of (which works):
Which just 'seems' wrong, there must be a cleaner, nicer way to do it. Please someone tell me there is :) It's weird because I have been using exists for years but never tried it before with else... Any explanations or pointers would be most appreciated. Thank You.
Back to
Seekers of Perl Wisdom
|
|