Quote:
Originally posted by RTM
Must have been this:
$userinfo=`/usr/bin/grep $id /etc/passwd`;
There may be a problem there. Suppose that id is set to "rtm". If there are other users like xrtm or rtm2, you will return multiple lines. Of course, since I didn't see the original code, this could be what you want.
$userinfo=`/usr/bin/grep "^${id}:" /etc/passwd`;
might be a solution. I'm not sure if perl's backticks involve launching a shell or not.