On Dec 18, Daniel Falkenberg said: >sub view_users{ > open( PASSWD, $file) or die "$file: $!\n"; > flock(PASSWD, 2) or die "Can't lock $file exclusively: $!"; > my (@users, %popusers); .... > return %popusers; >} > >view_users(); > >print Data::Dumper -> Dump( [\%popusers], ['*popusers']);
You don't have 'strict' turned on. If you did, you'd have been told that %popusers needs a package name, etc. The problem is that you've created %popusers in the view_users() function, and declared it local TO THAT FUNCTION. Returning it does you no good, since you're not PUTTING it anywhere. my %users = view_users(); print Data::Dumper->Dump([\%users], ['*users']); -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]