[PerlChina] 求助如何可以读取邮箱中邮件啊
tiger peng
tigerpeng2001 at yahoo.com
Tue Jan 29 06:07:48 PST 2008
Everyone begins as a beginner!
No matter you are a beginner or an expert, you'd better to know how to use perldoc (There are a lot to learn)
-> perldoc -f readdir
readdir DIRHANDLE
Returns the next directory entry for a directory
opened by "opendir". If used in list context,
returns all the rest of the entries in the
directory. If there are no more entries, returns an
undefined value in scalar context or a null list in
list context.
If you're planning to filetest the return values out
of a "readdir", you'd better prepend the directory
in question. Otherwise, because we didn't "chdir"
there, it would have been testing the wrong file.
opendir(DIR, $some_dir) || die "can't opendir $some_dir: $!";
@dots = grep { /^\./ && -f "$some_dir/$_" } readdir(DIR);
closedir DIR;
----- Original Message ----
From: truncatei <truncatei at gmail.com>
To: china-pm at pm.org
Sent: Tuesday, January 29, 2008 6:05:08 AM
Subject: Re: [PerlChina] 求助如何可以读取邮箱中邮件啊
看来是Perl Beginner,是在做项目还是个人练习?
my @dirs = readdir DH;
or
while (<DH>) {
// $_
}
2008/1/29 Steven Zhu <stevenzyk at gmail.com>:
怎么把读出来,赋值哪,请教
--
如果觉得无聊,您不妨访问Google Reader消遣 http://www.google.com/reader/view
要尝试黑版本Google,请访问 http://www.google.com/custom?q=&sa=Search&client=pub-4021907304270164&forid=1&channel=7519554017&ie=UTF-8&oe=UTF-8&cof=GALT%3A%23FF9900%3BGL%3A1%3BDIV%3A%230033FF%3BVLC%3ACC9900%3BAH%3Acenter%3BBGC%3A000000%3BLBGC%3A000000%3BALC%3AFFFFFF%3BLC%3AFFFFFF%3BT%3ACCCCCC%3BGFNT%3A33CC00%3BGIMP%3A33CC00%3BFORID%3A1%3B&hl=en
-----Inline Attachment Follows-----
_______________________________________________
China-pm
mailing
list
China-pm at pm.org
http://mail.pm.org/mailman/listinfo/china-pm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/china-pm/attachments/20080129/79bce9a7/attachment-0001.html
More information about the China-pm
mailing list