question about ( () if () ) while ();
From: William M West (william_west_at_reyrey.com)
Date: 08/03/04
- Next message: James Edward Gray II: "Re: finding out what is uninitialized"
- Previous message: Gunnar Hjalmarsson: "Re: finding out what is uninitialized"
- Next in thread: Jeff 'Japhy' Pinyan: "Re: question about ( () if () ) while ();"
- Reply: Jeff 'Japhy' Pinyan: "Re: question about ( () if () ) while ();"
- Maybe reply: William M West: "RE: question about ( () if () ) while ();"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: beginners@perl.org Date: Tue, 3 Aug 2004 10:16:21 -0400
$ perl -e ' $entry = "willy"; (print "1") if (/$entry/) while ($_ = "will");
print "0"'
syntax error at -e line 1, near ") while"
Execution of -e aborted due to compilation errors.
seperating the bits seems to work. it seems to break down when i want to
use the if statement in combination with the while.
using print to simulate return values.
perhaps i should abandon this idiom and use a normal
while () {
if () {
}
}
i am curious as to why this error crops up...
thanks,
willy
http://www.hackswell.com/corenth
- Next message: James Edward Gray II: "Re: finding out what is uninitialized"
- Previous message: Gunnar Hjalmarsson: "Re: finding out what is uninitialized"
- Next in thread: Jeff 'Japhy' Pinyan: "Re: question about ( () if () ) while ();"
- Reply: Jeff 'Japhy' Pinyan: "Re: question about ( () if () ) while ();"
- Maybe reply: William M West: "RE: question about ( () if () ) while ();"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|