http://qs321.pair.com?node_id=1169017


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.