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

&say's return value

Thread Next
Gaal Yahas
July 30, 2005 04:57
&say's return value
Message ID:
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 <>

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About