perl -pe "s/[#*]//g" infile > outfile #### perl -i.bak -pe "s/[#*]//g" filename #### perl -pe "next if /[#*]/" infile > outfile #### perl -i.bak -pe "next if /[#*]/" filename