$attach1 =~ s/\?.*$//; #### $paramstr = '\?'.$ENV{QUERY_STRING}; $attach1 =~ s/$paramstr//;