On Fri, Jun 14, 2002 at 09:24:40PM -0700, [EMAIL PROTECTED] wrote: | Bart Schaefer <[EMAIL PROTECTED]> writes: | | > use Mail::Header; | > | > foreach my $message (@files) { | > open(FILE, "<$dir/$message") or next;
(it's good to qoute the text you're asking about) my $header = new Mail::Header(*FILE); | What is the significance of the * preceding file_handle? Or is it | something being handed into a function? Does it just hand each file | in... Prolly the perl equivalent of pointer dereferencing. I've done a bunch of C/C++ coding in the past, and that syntax is very familiar. I wouldn't be surprised, though, if there were some new sublties and gotchas in perl's incarnation of the construct. | > my $header = new Mail::Header(*FILE); | > $header->unfold("X-Spam-Status"); | > $output{"$dir/$message"} = $header->get("X-Spam-Status"); | > } | | What do the arrows (->) signify? "pointer" dereferencing, I believe. I haven't gone into any of the OO parts of perl, but that's how that token is used in C and C++, so I expect that perl does the same thing with it. If you're having trouble understanding this, then perl really isn't the language for you. Obfuscated code is not good, except in a obfuscated code contest. If you can't read the code, then you won't be able to understand it (so you won't know whether or not it is correct or does what you want it to) and you won't be able to maintain it. HTH, -D -- A kindhearted woman gains respect, but ruthless men gain only wealth. Proverbs 11:16 http://dman.ddts.net/~dman/
msg06393/pgp00000.pgp
Description: PGP signature