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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: hash reference to itself
by Your Mother (Archbishop) on Aug 02, 2016 at 18:41 UTC | |
by VinsWorldcom (Prior) on Aug 02, 2016 at 20:01 UTC | |
by Your Mother (Archbishop) on Aug 02, 2016 at 21:22 UTC | |
Re^2: hash reference to itself
by ExReg (Priest) on Aug 02, 2016 at 17:30 UTC |
In Section
Seekers of Perl Wisdom