while () { chomp; my ($user, $pass) = split(':'); # do stuff with $user and $pass } close USRS;