$ perl -MCGI -e 'my $q = new CGI::; open CGI, "~/foo.txt";' Can't locate object method "new" via package "IO::Handle" (perhaps you forgot to load "IO::Handle"?) at -e line 1.