in reply to assigning to a hash via split

There is an easier way to do what you want, using a CPAN module called Unix::PasswdFile:

use Unix::PasswdFile; my $pw = Unix::PasswdFile->new('/etc/passwd') or die 'Could not open /etc/passwd'; my %users = map { $_ => [$ps->user($_)] } $pw->users;

This will create the %users hash without you needing to worry about the structure of the /etc/passwd file.