Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!bfmny0!tneff From: tneff@bfmny0.BFM.COM (Tom Neff) Newsgroups: comp.lang.perl Subject: Re: $! and string context Message-ID: <15668@bfmny0.BFM.COM> Date: 13 Jul 90 03:10:32 GMT References: <1990Jul13.175014.1750@uvaarpa.Virginia.EDU> Reply-To: tneff@bfmny0.BFM.COM (Tom Neff) Lines: 16 In article <1990Jul13.175014.1750@uvaarpa.Virginia.EDU> worley@compass.com writes: >People might be interested to note that the conditional expression in >an 'if' is a string context, which I didn't expect. The >string/numeric context difference seems to usually be unimportant, but >$! is an exception: > > die "Can't do ..." if $!; Try using the standard workaround for this sort of thing: dir "Can't do ..." if 0+$!; -- "Nature loves a vacuum. Digital \O@/ Tom Neff doesn't." -- DEC sales letter /@O\ tneff@bfmny0.BFM.COM