Royce Wells wrote:
> 
> I am trying to split off the user name and the password record in one pass
> through however what I am getting is only the first record is being
> populated into my user array.
> 
> Can someone tell me am I going about this the right way?

You should probably use perl's builtin functions to access password
information.

perldoc -f getpwnam
perldoc -f getpwuid
perldoc -f getpwent
perldoc -f setpwent
perldoc -f endpwent
perldoc User::pwent


> my @user=(split(/:/,(@passwd=(split(/\n/,`cat /etc/passwd`)))[0]));
> for($i=0;$i <= $#passwd ; $i++)
> {
> print "$user[$i]\n";
> print "$passwd[$i]\n";
> }

while ( my ( $user, $passwd ) = getpwent ) {
    print "$user\n$passwd\n";
    }



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to