[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Testing for Defined



MacPerl complained to Richard Gordon:
> # Value of <HANDLE> construct can be "0"; test with defined().


Excerpt of message (sent 19 January 1999) by David Turley:
> while (defined($the_input = <INPUT>)){
> 
> This makes sure your while loop won't end prematurly if a line in
> <INPUT> contains only '0'.


You must set $/="0" to make this happen, or is there another way?

	Christian Brechbuehler
	
	Communication Technology Laboratory, Image Science Group
	Swiss Federal Institute of Technology (ETH), Zurich

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch