I am using the following program to access and IP value stored by the key defined in $user. (a valid one is kimball).
Code:
#!/usr/bin/perl5
print "Username to lookup: ";
chomp($_=lc(<STDIN>));
$user=$_;
dbmopen(%ip, "useraddr", 0644) || die "Cannot open DBM file: $!";
print "$ip{$user} \n";
dbmclose(%ip);
It doesn't show the value associated with $ip{$user}" even though there is one. Any help appreciated.