in reply to hash reference to itself
Perl can do object-oriented code.
#!perl use strict; use warnings; package MyPkg; sub name { return 'foo'; } sub print { print "name: " . name(); } package main; print MyPkg->name() . "\n"; MyPkg->print();
UPDATE: Actually *not* OO as YourMother points out below.
In Section
Seekers of Perl Wisdom