On 2/23/06, Ryan Frantz <[EMAIL PROTECTED]> wrote: > I've got a few reports that are generated by a third-party app that we use > and the raw report files include incomprehensible strings at the beginning > of each page like so: > > &k2S&l6D
I wonder whether those are supposed to be escape sequences, as one might send to a video terminal. Those typically are signalled by a non-printing character (such as "\x1b", esc) followed by... well, anything goes, really. But you can figure out the rules for your data. Or, maybe you can tell your third-party app that you're not using a fancy video terminal. Check its docs to see whether it respects the TERM environment variable. > What kind of text/coding/whatever is this and what tools are available that > I can use to search for this content (to remove it)? Tools? You've got Perl! :-) The trick is to know how to tell Perl how to tell the wheat from the chaff. If you can dump the file contents, you might be able to figure out the encoding. In these cases I use the Unix command 'od -xc somefile | less' to see what I can see of a file's format. Another way to see what's inside would be to step through a simple program in Perl's debugger, using the 'x' command periodically to examine a variable's contents. (In this case, $_.) perl -ndebug somefile Does this help you to make any progress? If you can see what's going on in the file, but you can't turn that knowledge into Perl code, let us know. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>