Code:
# build another nice hash table
for ($k=0; $k < $cntPasswd; $k++)
{
chomp($passwd[$i]);
Shouldn't this be:
Code:
# build another nice hash table
for ($k=0; $k < $cntPasswd; $k++)
{
chomp($passwd[$k]);
Eventho it dosn't affect the outcome of this program, it will ensure your $shell will hold a usefull info, if you plan on using it else where.