thanks for the help, if anyone cares:
package Table; # # # Generic HTML Table Object # # sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = {}; $self->{TABLE_OPEN} = undef; $self->{TABLE_CLOSE} = undef; $self->{ROW_OPEN} = undef; $self->{ROW_CLOSE} = undef; $self->{COL_OPEN} = undef; $self->{COL_CLOSE} = undef; $self->{NAME} = undef; $self->{VALUE} = undef; bless ($self, $class); return $self; } ################################################# sub table_open { my $self = shift; if (@_) { $self->{TABLE_OPEN} = shift } return print "<table $self->{TABLE_OPEN}>\n"; } sub table_close { my $self = shift; if (@_) { $self->{TABLE_CLOSE} = shift } return print "</table>\n"; } sub row_open { my $self = shift; if (@_) { $self->{ROW_OPEN} = shift } return print "\t<tr $self->{ROW_OPEN}>\n"; } sub row_close { my $self = shift; if (@_) { $self->{ROW_CLOSE} = shift } return print "\t</tr>\n"; } sub col_open { my $self = shift; if (@_) { $self->{COL_OPEN} = shift } return print "\t\t<td $self->{COL_OPEN}>\n"; } sub col_close { my $self = shift; if (@_) { $self->{COL_CLOSE} = shift } return print "\t\t</td>\n"; } sub name { my $self = shift; if (@_) { $self->{NAME} = shift } return print "\t\t\t$self->{NAME}\n"; } sub value { my $self = shift; if (@_) { $self->{VALUE} = shift } return print "\t\t\t$self->{VALUE}\n"; } 1; ################################################ # script i'm using to interface #!/usr/bin/perl -w use CGI::Carp 'fatalsToBrowser'; use strict; use Web; # my web processing module use Table; my ($website) = 'dev.merchantonline.com'; my ($i) = undef; $|=1; &parse(); # parse html post/get using the Web module &check_referer($website); # check refering url using the Web module &check_required('test'); # check required fields using the Web module print "Content-type:text/html\n\n"; print "<html>\n<body>\n"; print "test = " . $in{'test'} . "<br><br>\n"; my($table) = new Table(); $table->table_open('width=500'); foreach $i (sort keys %in){ $table->row_open(); $table->col_open(); $table->name($i); $table->col_close; $table->col_open; $table->value($in{$i}); $table->col_close; $table->row_close; } $table->table_close; print "got here\n"; exit;

In reply to semi final script -- by dryland
in thread new to oop (problem with my object) by dryland

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.