develooper Front page | perl.perl6.language | Postings from July 2005

&say's return value

Thread Next
From:
Gaal Yahas
Date:
July 30, 2005 04:57
Subject:
&say's return value
Message ID:
20050730115601.GC1129@sike.forum2.org
What do &print and &say return?

"fail" would be great on errors. On success, they return "1" now, which
doesn't look very useful. How about returning the printed string? Unless
called in void context, of course.

(This introduces a potential semipredicate problem when looking at the
return value of a printed "0" or "" while not using "fatal", but the
code can use a defined guard.)

-- 
Gaal Yahas <gaal@forum2.org>
http://gaal.livejournal.com/

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About