I have a non-printable character that I'm trying to match in a regex, but I can't figure out what it is. If I know it comes after '~~~' in a string, how can I show its value? I tried:
s/~~~(.?)/sprintf "|%d|", $1/se;
but that just displays '|0|' which I don't think is right because it shows as a CRLF on the terminal. I have an input file which has data between '\r' characters. Some of these fields contain '\n' and the mystery character. I have a regex which changes any '\n' to '~~~':
s/\n+/~~~/sg;
Why can't I figure out what's there?
Name^M~~ ^MAddres
That is some sample input after the following regex's have been run on it:
s/\r\n/~~/sg; s/~~./~~!/sg;
The '~~' in the input was put there in place of a '\r\n'. The '^M' is a '\r'. What is causing the carriage return after '~~'? There's obviously something there if it's causing a carriage return in the output. Shouldn't the second regex catch whatever is there?
-- Andrew Gaffney Network Administrator Skyline Aeronautics, LLC. 636-357-1548
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>