-- 
Just getting into the best language ever...
Fancy a [EMAIL PROTECTED] Just ask!!!

<quote who="Ankur Gupta">
>>
>>
>>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.
>

Got ya!!

Thanks.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to