I am not sure why? It misses the odd ones.
while (<PASSWD>) {
my @passwds = split /:/, <PASSWD>;
You are reading the file twice in each while loop. Whenever you access
<PASSWD>, it returns a line and moves to the next line of the file.
So in "while (<PASSWD>) {" it returns one line of the passwd file .
As you are reading the line again in "my @passwds = split /:/, <PASSWD>;", you
are missing out on the previous line.
print "@passwds";
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>