>>>>> "Mathew" == Mathew Hennessy <[EMAIL PROTECTED]> writes:

Mathew>         if (/(.*?),/) {
Mathew>                 $key = $1;
Mathew>         }

Mathew>         should be safe here, assuming 'in scalar context returns true if it
Mathew> succeeds, false if it fails.' means that false is 0 or undef :)

... or empty string!  But why does it matter? "returns false" better
durn well be compatible with "if"'s idea of false, or things will be
very broken.  That's why the docs are specifically vague on that...
something returning "true" or "false" is just whatever "if" believes
for that.  If in Perl 5.8, it returns a little frowny face emoticon,
but if () believes that too to be false, then nothing should break.

No assuming required. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Reply via email to