in reply to Wierd DB Question

Well I first query are you doing any sort of filtering of input for inappropriate character? If your program is used to collect data from an unsecure source you need to be very careful not to leave an opening for hackers to insert programs or shell escapes or whatever.

Second, do you really need those characters in the first place? Maybe put a notice on the page that only A-Z, 0-9 chars are allowed and then strip them our with something like $field =~ s/#|&|'//g

If you really need to have these characters, it sounds like perl is trying to interpret these characters rather than just printing them, try escaping them: $field =~ s/(&|#|')/\\$1/g;

hope that helps