in reply to newbie - hash - array?
open(USER_LIST, '/etc/passwd') or die "Couldn't open: $!"; while (<USER_LIST>) { @user_info = split /:/, $_; $user_dict{$user_info[0]} = $user_info[4] . " " . $user_info[5]; }
although I don't know what the \ that you have there does...@user_info[4,5]; #same as ($user_info[4],$user_info[5]);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
The Mysterious Slash
by chromatic (Archbishop) on Feb 11, 2000 at 09:31 UTC |