#!usr/bin/perl use strict; use warnings; use MyClass; foreach my $foo ( 1 .. 2 ) { print "\n"; my $o = MyClass->new({ number => $foo }); warn "$foo $o->bar"; $o->bar( $foo ); print "\n"; } __END__