in reply to Hiding my variables

You can make pseudo-private subs with references and my as follows. Pretty much the same as your first case but I think it looks a bit better ;)
#!perl use strict; package Whatever; my $password = sub { 'passwd_here' }; sub reveal_pass { print "Authorised: ", $password->(), "\n"; } package main; Whatever::reveal_pass; print "Unauthorised: "; print ref $Whatever::password ? $Whatever::password->() : "no access!\ +n"; __END__ Authorised: passwd_here Unauthorised: no access!

"Argument is futile - you will be ignorralated!"