Your logic looks find, and works on my machine (although I made it command
line)
Try switching on warnings (#!/usr/local/bin/perl -w) and use strict (use
strict;)
Probably most likely is that you script can't read the file. You should
really always check if a file has been opened successfully yo
I have a simple perl script as follows which gets a users id number by
looking in a file. It already knows the username and uses this to reference
to the id.
The file is in the format:
jbloggs,101
jdoe,103
msmith,111
etc...
The code i'm using is:
#!/usr/local/bin/perl
my $hashfile = "/opt/netc