📄 ch9.htm
字号:
<BR>
37 print "RCPT TO: <",$in{'To'},">\n";
<BR>
38 print "DATA\n";<BR>
39 print "Subject: ",$in{'Subject'},"\n\n";
<BR>
40<BR>
41 print "====================\n";<BR>
42 print "From: ",$in{'From'},"\n";<BR>
43 print "To: ",$in{'To'},"\n";<BR>
44 print "Subject: ",$in{'Subject'},"\n";
<BR>
45<BR>
46 foreach $key (keys(%in)) {<BR>
47 if (($key eq 'Data') ||
($key eq 'Body') || ($key eq 'Address') ||<BR>
48 ($key eq 'data') || ($key eq 'body')
|| ($key eq 'address')) {<BR>
49
print $key,":\n",$in{$key},"\n";<BR>
50 }<BR>
51 else {<BR>
52
if (($key ne 'From') && ($key ne 'To') && ($key
ne 'Subject') &&<BR>
53 ($key ne 'from') && ($key ne 'to') && ($key
ne 'subject')) {<BR>
54 print
$key,": ",$in{$key},"\n";<BR>
55
}<BR>
56 }<BR>
57 }<BR>
58<BR>
59 print ".\n";<BR>
60 print "QUIT\n";</FONT></TT>
</BLOCKQUOTE>
<HR>
<H2><A NAME="UnsupportedFunctions"><FONT SIZE=5 COLOR=#FF0000>Unsupported
Functions</FONT></A></H2>
<P>
The difference between NT and UNIX in operating system behavior
is apparent when you have to port Perl applications. Some of the
UNIX versions of Perl system functions have no equivalent functions
in NT. Similarly, NT functions that deal with the Registry have
no equivalent functions in UNIX.
<P>
Most UNIX system calls are not available in NT. Some of these
functions use an error message to warn you that they are not implemented.
Most cause the script to fail on unresolved references. (The warning
capability for all functions requires modifications to the main
Perl 5 distribution and has not been undertaken.) The most up-to-date
list is at <TT><A HREF="http://www.hip.perl.com/" tppabs="http://www.hip.perl.com/">http://www.hip.perl.com</A></TT>.
The following functions were supported at the time of writing:
<P>
<TABLE>
<TR VALIGN=TOP><TD COLSPAN=2 WIDTH=499><B>Network Routines</B></TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">getnetbyname()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">setprotoent()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">getnetbyaddr()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">setservent()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">getnetent()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">endhostent()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">getprotoent()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">endnetent()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">getservent()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">endprotoent()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">sethostent()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">endservent()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">setnetent()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">socketpair()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD COLSPAN=2 WIDTH=499><B>System V-Compatible Ipc Routines</B>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">msgctl()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">semop()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">msgget()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">shmctl()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">msgrcv()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">shmget()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">msgsnd()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">shmread()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">semctl()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">shmwrite()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">semget()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270></TD></TR>
<TR VALIGN=TOP><TD WIDTH=229><B>I/O Routines</B></TD><TD WIDTH=270></TD>
</TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">ioctl()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">select($w, $x, $y, $z)*</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229><B>Filesystem Routines</B></TD><TD WIDTH=270>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">chmod()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">readlink()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">chroot()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">symlink()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">fcntl()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">sysread()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">flock()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">syswrite()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">link()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">umask()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">lstat()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">utime()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229><B>Security-Related Routines</B></TD><TD WIDTH=270>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">crypt()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">getgrgid()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">getlogin()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">getpwent()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">getpgrp()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">getgrent()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">getppid()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">setpwent()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">getpriority()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">setgrent()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">getpwnam()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">endpwent()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">getgrnam()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">endgrent()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">getpwuid()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">setpgrp()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229><B>Process-Related Routines</B></TD><TD WIDTH=270>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">fork()</FONT></TT>
</BLOCKQUOTE>
</TD><TD WIDTH=270><TT><FONT FACE="Courier">times()</FONT></TT>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=229>
<BLOCKQUOTE>
<TT><FONT FACE="Courier">kill()</FONT></TT>
</BLOCKQUOTE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -