sub some_function { my ($first, $second) = @_; ... } sub some_method { my ($self, $first, $second) = @_; ... } #### SomeClass->some_method( $first, $second ); $some_object->some_method( $first, $second ); #### package SomeClass; sub new { my $class = shift; bless {}, $class; } ... my $some_object = SomeClass->new();
## SomeClass->some_method( $first, $second ); $some_object->some_method( $first, $second ); ##
## package SomeClass; sub new { my $class = shift; bless {}, $class; } ... my $some_object = SomeClass->new();