#!/usr/bin/perl -- use strict; use warnings; use diagnostics; use CGI(); my $cgi = CGI->new(); my $poop = []; $cgi->header; $poop->nonsense; __END__ Can't call method "nonsense" on unblessed reference at temp.pl line 13 (#1) (F) A method call must know in what package it's supposed to run. It ordinarily finds this out from the object reference you supply, but you didn't supply an object reference in this case. A reference isn't an object reference until it has been blessed. See perlobj. Uncaught exception from user code: Can't call method "nonsense" on unblessed reference at temp.pl line 13. at temp.pl line 13 #### #!/usr/bin/perl -- use strict; use warnings; use diagnostics; use CGI(); my $cgi = CGI->new(); my $poop = []; use Data::Dumper; print Dumper( $cgi, $poop ); __END__ $VAR1 = bless( { '.parameters' => [], 'use_tempfile' => 1, '.charset' => 'ISO-8859-1', '.fieldnames' => {}, 'param' => {}, 'escape' => 1 }, 'CGI' ); $VAR2 = [];