$search_q = $ENV{'QUERY_STRING'}; $search_q =~ s/\&pg=\d+//;