#!d:\perl\bin\perl.exe use lib 'S:\incubator\ex\Hello.pm'; print"Content-type:text/html;charset=UTF-8\n\n" ; my $obj = Hello->new( sample_data => 'hello world', more_data => 'blah blah blah' ); $obj->sample_method(); #### #!d:\perl\bin\perl.exe package Hello; #SampleObject; sub new { my ($class, %args) = @_; return bless { %args }, $class; } sub sample_method { my ($self) = @_; print $self->{sample_data}; } 1;