--- Richard Krause <[EMAIL PROTECTED]> wrote: > I found out what the problem is. If you write > > $q->table({-border=>undef}, > #caption('When Should You Eat Your > Vegetables?'), > > ... <snip> ... > > instead of > > print table({-border=>undef}, > caption('When Should You Eat Your > Vegetables?'), > > ... <snip> ... > > it works. Otherwise you get a "Undefined subroutine > &main::caption called at > ..." error message. > > Is there an explanation for this?
CGI.pm has two different styles, looks like you're mixing them. Basically, you've got your standard function style: use CGI qw/:standard/; print header, start_html("My page"); or your object-oriented style: use CGI; my $q = new CGI; # an object! print $q->header, $q->start_html("My page"); Completely your choice which you use, but you've got choose one and stick with it. See "perldoc CGI" for details. - John ===== "Now it's over, I'm dead, and I haven't done anything that I want; or, I'm still alive, and there's nothing I want to do." - They Might Be Giants, http://www.tmbg.com __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]