<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:courier,monaco,monospace,sans-serif;font-size:10pt"><div style="font-family: courier,monaco,monospace,sans-serif; font-size: 10pt;">Everyone begins as a beginner!<br><br>No matter you are a beginner or an expert, you'd better to know how to use perldoc (There are a lot to learn)<br><br>-> perldoc -f readdir<br> readdir DIRHANDLE<br> Returns the next directory entry for a directory<br> opened by "opendir". If used in list context,<br> returns all the rest of the entries in the<br> directory. If there are no more entries, returns
an<br> undefined value in scalar context or a null list in<br> list context.<br><br> If you're planning to filetest the return values out<br> of a "readdir", you'd better prepend the directory<br> in question. Otherwise, because we didn't "chdir"<br> there, it would have been testing the wrong file.<br><br> opendir(DIR, $some_dir) || die "can't opendir $some_dir:
$!";<br> @dots = grep { /^\./ && -f "$some_dir/$_" } readdir(DIR);<br> closedir DIR;<br><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: truncatei <truncatei@gmail.com><br>To: china-pm@pm.org<br>Sent: Tuesday, January 29, 2008 6:05:08 AM<br>Subject: Re: [PerlChina] 求助如何可以读取邮箱中邮件啊<br><br>
看来是Perl Beginner,是在做项目还是个人练习?<br><br>my @dirs = readdir DH;<br><br>or <br><br>while (<DH>) {<br> // $_<br>}<br><br><br><div class="gmail_quote">2008/1/29 Steven Zhu <<a rel="nofollow" ymailto="mailto:stevenzyk@gmail.com" target="_blank" href="mailto:stevenzyk@gmail.com">stevenzyk@gmail.com</a>>:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">怎么把读出来,赋值哪,请教<br><br><br></blockquote></div><br><br clear="all"><br>-- <br>如果觉得无聊,您不妨访问Google Reader消遣 <a rel="nofollow" target="_blank" href="http://www.google.com/reader/view">http://www.google.com/reader/view</a><br>
要尝试黑版本Google,请访问 <a rel="nofollow" target="_blank" href="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">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</a>
<!-- kill --><div><br><br>-----Inline Attachment Follows-----<br><br>_______________________________________________<br>China-pm
mailing
list<br><a ymailto="mailto:China-pm@pm.org" href="mailto:China-pm@pm.org">China-pm@pm.org</a><br><a href="http://mail.pm.org/mailman/listinfo/china-pm" target="_blank">http://mail.pm.org/mailman/listinfo/china-pm</a></div></div><br></div></div></body></html>