#!/usr/bin/perl use warnings; use strict; package MyClass; sub new { my $classname = shift; my $self = {}; return bless($self, $classname); } sub myMethod { my $self = shift; print "Hallo\n"; } package main; my $object = MyClass -> new(); $object -> myMethod(); # Geht nicht: # $object -> &myMethod();