O
Oldbitcollector
I've got a routine that looks something like this...
for( $i = 1; $i <= $pop->Count(); $i++ ) {
foreach( $pop->Head( $i ) ) {
/^(From|Subject):\s+/i && print $_, "\n";
}
}
This parses two lines from an email header. (From & Subject)
I'm having some trouble understanding how this works.
I'm shooting for a parse that would put this lines into variables as
well as print them.
something like
$from = /^(From):\s+/i
print $from;
$subject = /^(Subject):\s+/i
print $subject;
Could someone take a little time to explain how this works so I can
apply it correctly to my own code requirements. Thanks
Jeff
for( $i = 1; $i <= $pop->Count(); $i++ ) {
foreach( $pop->Head( $i ) ) {
/^(From|Subject):\s+/i && print $_, "\n";
}
}
This parses two lines from an email header. (From & Subject)
I'm having some trouble understanding how this works.
I'm shooting for a parse that would put this lines into variables as
well as print them.
something like
$from = /^(From):\s+/i
print $from;
$subject = /^(Subject):\s+/i
print $subject;
Could someone take a little time to explain how this works so I can
apply it correctly to my own code requirements. Thanks
Jeff