Thanks Jeff . I had tried $password eq /bob/ but your way works just fine.

Now for security reasons I want to check the variable to only alphanumeric charecters 
a-z A-Z 0-9 and the underscore _

I'm using the email address are a beginning password therefore....
code below

$password=~s/@/\_/g;                 ##removes"@"
$password=~s/\./\_/g;                   ##removes"."

##?????????
$password=~s/[^a-z^A-Z^0-9]/\-/g;        ##check for a-z, A-Z, 1-0 ???????
##????????

is there a better way?

I have been pouring iover perl books all day and this is the stumper (and the last 
question)

thanks in advance
Lou

  ----- Original Message ----- 
  From: Jeff 'japhy' Pinyan 
  To: Luinrandir Hernsen 
  Cc: [EMAIL PROTECTED] 
  Sent: Saturday, January 19, 2002 10:09 PM
  Subject: Re: help!!!trying to match password


  On Jan 19, Luinrandir Hernson said:

  >Just how do I match the input exactly
  >bob
  >to just 
  >bob

  Use 'eq'.

    if ($password eq 'bob') { ... }

  -- 
  Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
  RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
  ** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
  <stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.


  -- 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to