Re: not sure why I am getting the following warning "Useless use of a constant in void context"
- From: "Peter J. Holzer" <hjp-usenet2@xxxxxx>
- Date: Sat, 15 Dec 2007 22:15:02 +0100
On 2007-12-14 20:44, John W. Krahn <krahnj@xxxxxxxxx> wrote:
"mcardeiro@xxxxxxxxx" wrote:
On Dec 14, 12:40 pm, "John W. Krahn" <kra...@xxxxxxxxx> wrote:
Just because it "works", for some value of "works", does not mean it is
the correct way to do it.
what exactly is incorrect about saying run a subroutine and assign the
return to a variable or exit?
I was commenting on the use of '||' instead of 'or' for flow control.
That the subroutine in question uses 'exit()' is just a side effect.
You shouldn't rely on side effects for flow control.
You are doing the same thing with or. It just happens at a slightly
different point in the program.
hp
.
- References:
- not sure why I am getting the following warning "Useless use of a constant in void context"
- From: mcardeiro@xxxxxxxxx
- Re: not sure why I am getting the following warning "Useless use of a constant in void context"
- From: Ben Morrow
- Re: not sure why I am getting the following warning "Useless use of a constant in void context"
- From: mcardeiro@xxxxxxxxx
- Re: not sure why I am getting the following warning "Useless use of a constant in void context"
- From: John W. Krahn
- Re: not sure why I am getting the following warning "Useless use of a constant in void context"
- From: mcardeiro@xxxxxxxxx
- Re: not sure why I am getting the following warning "Useless use of a constant in void context"
- From: John W. Krahn
- not sure why I am getting the following warning "Useless use of a constant in void context"
- Prev by Date: Re: Help: Auto login FTP modules
- Next by Date: Re: Problems with PAR
- Previous by thread: Re: not sure why I am getting the following warning "Useless use of a constant in void context"
- Next by thread: Net::SSH::Perl - How to set remote default file permissions
- Index(es):
Relevant Pages
|