sub test_sub { my ($thischan, $thisuser, $thismsg) = (@_); return "test_sub" if @_ == 0; return unless $thismsg =~ /^:google /; use WWW::Search; my $search = new WWW::Search('Google'); $search -> maximum_to_retrieve(5); $search -> native_query(WWW::Search::escape_query("osama")); $search -> seek_result(2); my $result = $search -> results(); use Data::Dumper; print Dumper \$result; carp "cycling"; } #### :google bleh # this was my input Found Total: 1,110,000 $VAR1 = \undef; cycling at test_harness.pl line 31 main::test_sub('#bleh', 'alex', ':google bleh') called at test_harness.pl line 17