From: Robin Houston Date: Tue, 18 Dec 2001 14:54:33 +0000 (+0000) Subject: Third time lucky? (Re: [PATCH] ...while $var = glob(...)) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c682d774b5d37972d8e89f9a7989e8824be55be4;p=p5sagit%2Fp5-mst-13.2.git Third time lucky? (Re: [PATCH] ...while $var = glob(...)) Message-ID: <20011218145433.A18835@puffinry.freeserve.co.uk> p4raw-id: //depot/perl@13749 --- diff --git a/t/op/glob.t b/t/op/glob.t index 064202d..c18ee2f 100755 --- a/t/op/glob.t +++ b/t/op/glob.t @@ -5,7 +5,7 @@ BEGIN { @INC = '../lib'; } -print "1..10\n"; +print "1..11\n"; @oops = @ops = ; @@ -60,6 +60,12 @@ print open(F, ">0") ? "ok 8\n" : "not ok 8 # $!\n"; close F; my $ok = "not ok 9\n"; + +# ... while ($var = glob(...)) should test definedness not truth + +my $ok = "not ok 11\n"; +$ok = "ok 11\n" while my $var = glob("0"); +print $ok; $ok = "ok 9\n" while my $var = glob("0"); print $ok;