[jmax@gir] ~ $ perl testes.pl INPUT: asdf RESULT: asdf INPUT: #asdf RESULT: INPUT: "#asdF" RESULT: " INPUT: "lol#asdf" RESULT: "lol INPUT: [jmax@gir] ~ $ cat testes.pl print "INPUT:\n"; while (<>) { print "RESULT:\n"; s/("[^"*])#/$1\\#/; s/(?