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

Re: &say's return value

Thread Previous | Thread Next
From:
Larry Wall
Date:
July 30, 2005 09:36
Subject:
Re: &say's return value
Message ID:
20050730163613.GA25563@wall.org
On Sat, Jul 30, 2005 at 09:25:12AM -0700, chromatic wrote:
: On Sat, 2005-07-30 at 14:56 +0300, Gaal Yahas wrote:
: 
: > (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.)
: 
: I don't know if returning the printed string is the right approach, but
: would returning '$string but true' avoid the semipredicate problem?

I don't see any reason to return the string at all.  It's almost never
wanted, and you can always use .= or monkey but.

Larry

Thread Previous | 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