I think Work around for this is,

My $usr = $ENV { USER };
If ($usr eq "userA")
   Go get it
Else
   Access restricted.


Rajnikant Jachak | Software Engg | Persistent Systems Limited
[EMAIL PROTECTED] | Cell: +91 9822204088 | Tel: +91 (20)
3023 2479
 
Persistent Systems - Innovations in software product design,development and
delivery - www.persistentsys.com
 

-----Original Message-----
From: Richard Lee [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 02, 2008 10:18 AM
To: Perl Beginners
Subject: user id validation

I am just wondering how to validate a user who is using the script??

I wanted to allow only user below to be able to user the script and was
thinking about
userA(userid: 1077)
userB(userid: 1088)
userC(userid: 1099)

so, inside of script, I would put,

unless ( $userid =~ /1077|1088|1099/ ) {
        print "You are not authorized to use this\n"; }

but I am not sure how to come up w/ $userid ?
how do I find out what the userid of person who is using the script? Is
there specific perl command for that?

--
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/



DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to