Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Change this while ($head_txt =~ m/\G(.+?)$mycrlf/g) { to while ($head_txt =~ m/\G(.+?)$mycrlf/go) { I'm assuming the $mycrlf never changes, right?
    --

    --
    xoa

    • I'm afraid that mycrlf does. It's the line ending that's used in the given email. There are two regex involved: $crlf and $mycrlf. The former matches any valid line ending, the latter matches those which are expected in this header.

      If I use $crlf, I should be safe, and that is constant. Switching to use that and enabling /o didn't really help, though.

      Here's the better thing, though. It seems that I was wrong in my belief that I couldn't use a /g pattern on a dereferenced string. I don't know why I co
      --
      rjbs
      • In this instance, anyway, it did not. Perhaps it would if I tested under an older perl.

        MJD once gave me and/or the internet an explanation of when it helped, and it was a much smaller case than I had previously thought, so now I usually don't even think about it. :-/
        --
        rjbs