M
Mike Hartsough
I'm a perl neophyte, and I'm running into some difficulty with some text I
need to parse.
I invoke a command that returns a large chunk of text. Included in this text
are newline ASCII characters (0a), and one instance of the text string "\n"
(5c6e).
I need to remove all text up to and including the first newline (0A) (which
includes the "\n"), but the code I've been writing appears to _sometimes_
treat the "\n" (5c6e) as a newline. But when I try to account for this in my
code, it doesn't seem to work.
Here's what I have right now:
$Blob =~ /(\n)(\n)(.*)/s;
I'm using the 's' qualifier because I want it to ignore all the subsequent
newlines.
With the two "(\n)" it skips too many newlines and strips out needed text.
If I remove one of the "(\n)", it treats the text "\n" (5c6e) as a newline,
so it doesn't strip out enough.
Help?
Thanks,
Mike
need to parse.
I invoke a command that returns a large chunk of text. Included in this text
are newline ASCII characters (0a), and one instance of the text string "\n"
(5c6e).
I need to remove all text up to and including the first newline (0A) (which
includes the "\n"), but the code I've been writing appears to _sometimes_
treat the "\n" (5c6e) as a newline. But when I try to account for this in my
code, it doesn't seem to work.
Here's what I have right now:
$Blob =~ /(\n)(\n)(.*)/s;
I'm using the 's' qualifier because I want it to ignore all the subsequent
newlines.
With the two "(\n)" it skips too many newlines and strips out needed text.
If I remove one of the "(\n)", it treats the text "\n" (5c6e) as a newline,
so it doesn't strip out enough.
Help?
Thanks,
Mike