in reply to Login Please!!

If the lines in your password file really look like   eoin pass test 1234 admin sys then   my ($ur,$ps) = split(/\t/, $_, 2); isn't what you want to do. Assuming that you really do have tabs in the file (and not spaces), the third argument causes you to be left with
$ur = "eoin"; $ps = "pass\ttest\t1234\tadmin\tsys";
(For an explanation of why this is, consult the description of "split" in perlfunc.)

Drop the third argument, and you'll be O.K.

Stylistic comment: Consider returning a boolean (i.e., 0 or 1) instead of "Valid"/"notValid". There's far less chance of subtle typos causing you hours of debugging grief.