fishy conditional expression
- From: kloro2006@xxxxxxxxx (Tom Arnall)
- Date: Sun, 28 Jan 2007 21:13:48 -0800
the following script:
if (@f = `cat nonExistentFile` ) {
print 1;
}
if (@f = `cat nonExistentFile` && (1==1)) {
print 2;
}
gets:
cat: nonExistentFile: No such file or directory
cat: nonExistentFile: No such file or directory
2
seems to me both print statements should be skipped. what am i missing?
tom arnall
north spit, ca
"Relax, the tests extend the compiler."
.
- Follow-Ups:
- Re: fishy conditional expression
- From: Paul Lalli
- Re: fishy conditional expression
- From: "Jason Roth"
- Re: fishy conditional expression
- References:
- libgdbm
- From: Daniel D Jones
- libgdbm
- Prev by Date: WWW:Mechanize problem?
- Next by Date: Re: fishy conditional expression
- Previous by thread: Re: libgdbm
- Next by thread: Re: fishy conditional expression
- Index(es):
Relevant Pages
|