The stupid question is the question not asked | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I am on Win32, AS 5.8.7.
I am ran into a character substitution problem, any enlightment would be great. I built a pure perl Pdf module and was testing my tables with some ascii art. I have to escape every '\' with '\\' in the string I embed in the Pdf. This code does work, but only if the '\' is not followed by another '\': but, it does not work when there this 2 or more I needed it to do this '__\\\\U//__' Can anyone show me how to do this? Thanks, JamesNC This is kindof solved, thanks to everyone who responded. Update: I posted a follow-up. I would still like some more info on why ikegami's suggestion of streaming the data makes a difference. Closing note: This is a "special helpful programming feature" of perl that backslashes are interpreted as backslashes inside of single quotes except in the case where a backslash is followed by another backslash, in which case the pair escape each other. It is documented in perlop as was pointed out to me by ambrus. All this because I started messing with ascii art. In reply to Escaping multiple escape chars by JamesNC
|
|