On Sunday, October 27, 2002, at 01:53 AM, Bruce Van Allen wrote:

At 8:28 PM -0400 10/26/02, Mark Knipfer wrote:
On 10/26/02 1:25 PM, Trey Harris wrote:
Did you test this code snippet it? It won't work. You can't use a numeric comparison to test for stringwise equality. (Sorry to be nitpicky, but it matters here.)
No problem.  After I pasted the Perl code in my message, it was Perl
code that I copied to the clipboard and did not copy the latest code
revision I was working on that time.

I don't mind nitpicky, because errors do not run/work in Perl.
Actually, if you run without warnings, that code snippet would appear to work.
but not in a good way: with this code the user always appears to be root, unless her login name happens to start with a numeral other than zero, which is very concise but a different test altogether.

best

will

ps. i confess: I have made this mistake in code in use by the public, and more than once.

Reply via email to