Path: utzoo!utgpu!watserv1!watmath!att!dptg!ulysses!andante!princeton!udel!wuarchive!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: Possible problem with syscall() Message-ID: <10543@jpl-devvax.JPL.NASA.GOV> Date: 27 Nov 90 17:15:57 GMT References: <1454@tharr.UUCP> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 13 In article <1454@tharr.UUCP> gustav@tharr.UUCP (Paul Moore) writes: : There appears to be a problem with syscall() in perl. When perl is working : out whether an argument is a string or an integer, it decides by working out : whether the argument looks like a number. But what about the *string* "1"? No, it doesn't decide by whether it looks like a number, exactly. It decides by whether the value has ever been evaluated in a numeric context. The literal string "1" has never been evaluated in a numeric context, so should be treated as a string. If you have a string value of "1" in a variable, but have evaluated it as a number (such as by comparing it using ==), then it will be treated as a number. Larry