develooper Front page | perl.perl5.porters | Postings from June 2004

Re: [PATCH] sort plays nethack in a scalar context

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
June 25, 2004 02:27
Subject:
Re: [PATCH] sort plays nethack in a scalar context
Message ID:
20040625092748.GH1147@plum.flirble.org
On Fri, Jun 25, 2004 at 04:29:04PM +1000, Paul Fenwick wrote:

>      if (gimme != G_ARRAY) {
> +	if (PerlLIO_isatty(PerlIO_fileno(PerlIO_stdin())) &&
> +	    PerlLIO_isatty(PerlIO_fileno(PerlIO_stdout()))) {
> +		system(ROGUELIKE_GAME);

You're not checking the return code from system.
In scalar context shouldn't the return value be some sort of score for this
game of nethack?

Nicholas Clark

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