#!/usr/bin/perl # vi:ts=4 sw=4 et: package ups; use strict; use warnings; sub new { my $class = shift; my %parms = @_; my $self = []; # array-ref push @$self, qw( abc def 123 456 ); bless $self, $class; return $self; } sub print_content { my $self = shift; my @args = @_; for ( @$self ) { print $_, $/; } } package main; my $a = ups->new(); $a->print_content();