Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!cs.utexas.edu!convex!news From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.lang.perl Subject: Re: file test operators + null string Message-ID: <1991Feb14.134246.16480@convex.com> Date: 14 Feb 91 13:42:46 GMT References: Sender: news@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Distribution: comp Organization: CONVEX Software Development, Richardson, TX Lines: 21 Nntp-Posting-Host: pixel.convex.com From the keyboard of ntp@tf2.isl.mei.co.jp: :I think the file test operators supplied with null string should :always return an undefined value. : :I tried all the file test operations (except -M -A -C) with null :string, on my home directory, and the operations that returned TRUE :were:(perl@3.044, sun3/4.0.3 and solbourne(sun4/4.0.3 compatible)) : : -r, -w, -x, -o, -R, -W, -X, -O, -e, -s, -d, -B. : :I guess, "./" is added to the args of the file operators ? (I'm not :sure, I couldn't find it in sources.) Old-style systems (pre-POSIX) often treat the nullstring as the same as "." is many contexts. On my system, I can compile either way. In POSIX mode, things like (-d "") all return false. In non-POSIX mode, I get the behavior you're describing. --tom -- "All things are possible, but not all expedient." (in life, UNIX, and perl)