username1:password1 username2:password2 username3:password3 username4:password4 #### #!/usr/bin/perl open USRS, "users" or die "can't open file: $!"; my @users = ; foreach $user (@users) { chomp $user, $pass; # do stuff with $user and $pass } close USRS;