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
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
how this affects normal messages (Score:1)
rjbs
/o (Score:2)
while ($head_txt =~ m/\G(.+?)$mycrlf/g) {towhile ($head_txt =~ m/\G(.+?)$mycrlf/go) {I'm assuming the $mycrlf never changes, right?--
xoa
Re: (Score:1)
If I use $crlf, I should be safe, and that is constant. Switching to use that and enabling
Here's the better thing, though. It seems that I was wrong in my belief that I couldn't use a
rjbs
Will that really help? (Score:1)
Re: (Score:1)
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
continued regexps on scalar references (Score:1)
You certainly can. I use this technique extensively in CAM::PDF to incrementally parse a PDF document into a DOM. I pass a scalar reference to the content from one sub to the next.
Without delving too deep into your code, I believe the important bit that you are missing is the "c" flag on the regexp.
Re: (Score:1)
I didn't know about
I'm glad to know about it, but it should not be an issue here: at no point should the regex fail and then need to match again.
Thanks!
rjbs
uniting the array and hash in the symbol table (Score:1)
Re: (Score:1)
rjbs
Re: (Score:1)
Re: self referencing data structure (Score:1)
As you construct the second and third parts, you can reference the first copy:
Then, dumping it out, you see:
Re: (Score:1)
Alternatively, perhaps you could keep just one copy of the structure, and have methods to look up value different ways as-needed, without having whole other structures pre-built, if they if they might not be used.
That's what I did, effectively. There is on structure, an array of pairs, and methods that let you do the normal things. You can say "give me the values with name Foo" and it does. It just uses a linear search.
Since Email::Simple 2 will have a Header object with a known interface, a more memory-hungry but faster impleme
rjbs