in reply to tie and bless - guidence needed

bless $ref,CLASSmakes $ref an instance of CLASS. Class methods are available through $ref->method. If you run:

$ perl -mCGI -e '$\="\n";$c={};print $c;print bless $c,CGI' HASH(0x80eaae8) CGI=HASH(0x80eaae8) $
you see the way the ref is tagged to support its membership

tieis a form of aliasing simple variables to more complex underlying structures, so that assigning a value to a variable might hide a database update. That is done with not too occult magic, through defining methods with names like FETCH and STORE, as well as TIEARRAY, etc.

Better introductions, with details and examples, are at

  1. Blessables -- What Can You Make Into Objects? by Chromatic, and
  2. The tie()s that bind by KM,
both in the Tutorials section.

After Compline,
Zaxo