⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index-1.htm

📁 prrl 5 programs codes in the book
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<HTML>

<HEAD>

<TITLE>CONTENTS</TITLE>

</HEAD>

<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#CE2910">

<P>

<H1><FONT SIZE=9 COLOR="#FF0000"><B>Perl 5</B></FONT></H1>

<H1><FONT COLOR="#FF0000"><B>by Example</B></FONT></H1>

<H3><I>by David Medinets</I></H3>





<HR WIDTH="100%"></P>

<H2 ALIGN=CENTER><FONT COLOR="#FF0000"><FONT SIZE=+3>C&nbsp;&nbsp;O&nbsp;&nbsp;N&nbsp;&nbsp;T&nbsp;&nbsp;E&nbsp;&nbsp;N&nbsp;&nbsp;T&nbsp;&nbsp;S<A NAME="CONTENTS"></A>

</FONT></FONT></H2>

<HR WIDTH="100%"></P>

<BR>

<BR>

<P>

<H2><I><FONT SIZE=5 COLOR=#FF0000>Chapter </FONT></I><FONT SIZE=5 COLOR=#FF0000>1

</FONT><FONT SIZE=5>&nbsp;&nbsp;Getting Your Feet Wet</FONT></H2>

<UL>

<LI><A HREF="ch1.htm#Origins" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch1.htm#Origins">

Origins</A>

<LI><A HREF="ch1.htm#SimilartoC" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch1.htm#SimilartoC">

Similar to C?</A>

<LI><A HREF="ch1.htm#CostandLicensing" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch1.htm#CostandLicensing">

Cost and Licensing</A>

<LI><A HREF="ch1.htm#DoYouHavePerlInstalled" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch1.htm#DoYouHavePerlInstalled">

Do You Have Perl Installed?</A>

<LI><A HREF="ch1.htm#GettingandInstallingPerl" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch1.htm#GettingandInstallingPerl">

Getting and Installing Perl</A>

<LI><A HREF="ch1.htm#YourFirstPerlProgram" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch1.htm#YourFirstPerlProgram">

Your First Perl Program</A>

<UL>

<LI><A HREF="ch1.htm#CreatingtheProgram" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch1.htm#CreatingtheProgram">

Creating the Program</A>

<LI><A HREF="ch1.htm#Invocation" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch1.htm#Invocation">

Invocation</A>

</UL>

<LI><A HREF="ch1.htm#CommentsinYourProgram" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch1.htm#CommentsinYourProgram">

Comments in Your Program</A>

<LI><A HREF="ch1.htm#Summary" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch1.htm#Summary">

Summary</A>

<LI><A HREF="ch1.htm#ReviewQuestions" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch1.htm#ReviewQuestions">

Review Questions</A>

<LI><A HREF="ch1.htm#ReviewExercises" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch1.htm#ReviewExercises">

Review Exercises</A>

</UL>



<H2><I><FONT SIZE=5 COLOR=#FF0000>Chapter </FONT></I><FONT SIZE=5 COLOR=#FF0000>2

</FONT><FONT SIZE=5>&nbsp;&nbsp;Numeric and String Literals</FONT></H2>

<UL>

<LI><A HREF="ch2.htm#NumericLiterals" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch2.htm#NumericLiterals">

Numeric Literals</A>

<UL>

<LI><A HREF="ch2.htm#ExampleNumbers" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch2.htm#ExampleNumbers">

Example: Numbers</A>

</UL>

<LI><A HREF="ch2.htm#StringLiterals" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch2.htm#StringLiterals">

String Literals</A>

<UL>

<LI><A HREF="ch2.htm#ExampleSingleQuotedStrings" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch2.htm#ExampleSingleQuotedStrings">

Example: Single-Quoted Strings</A>

<LI><A HREF="ch2.htm#ExampleDoubleQuotedStrings" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch2.htm#ExampleDoubleQuotedStrings">

Example: Double-Quoted Strings</A>

<LI><A HREF="ch2.htm#ExampleBackQuotedStrings" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch2.htm#ExampleBackQuotedStrings">

Example: Back-Quoted Strings</A>

</UL>

<LI><A HREF="ch2.htm#ArrayLiterals" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch2.htm#ArrayLiterals">

Array Literals</A>

<UL>

<LI><A HREF="ch2.htm#ExamplePrintinganArray" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch2.htm#ExamplePrintinganArray">

Example: Printing an Array</A>

<LI><A HREF="ch2.htm#ExampleNestingArrays" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch2.htm#ExampleNestingArrays">

Example: Nesting Arrays</A>

<LI><A HREF="ch2.htm#ExampleUsingaRangeofValues" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch2.htm#ExampleUsingaRangeofValues">

Example: Using a Range of Values</A>

</UL>

<LI><A HREF="ch2.htm#Summary" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch2.htm#Summary">

Summary</A>

<LI><A HREF="ch2.htm#ReviewQuestions" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch2.htm#ReviewQuestions">

Review Questions</A>

<LI><A HREF="ch2.htm#ReviewExercises" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch2.htm#ReviewExercises">

Review Exercises</A>

</UL>

<H2><I><FONT SIZE=5 COLOR=#FF0000>Chapter </FONT></I><FONT SIZE=5 COLOR=#FF0000>3

</FONT><FONT SIZE=5>&nbsp;&nbsp;Variables</FONT></H2>

<UL>

<LI><A HREF="ch3.htm#ScalarVariables" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#ScalarVariables">

Scalar Variables</A>

<UL>

<LI><A HREF="ch3.htm#ExampleAssigningValuestoScalarVariables" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#ExampleAssigningValuestoScalarVariables">

Example: Assigning Values to Scalar Variables</A>

<LI><A HREF="ch3.htm#ChangingValuesinScalarVariables" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#ChangingValuesinScalarVariables">

Changing Values in Scalar Variables</A>

</UL>

<LI><A HREF="ch3.htm#ArrayVariables" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#ArrayVariables">

Array Variables</A>

<UL>

<LI><A HREF="ch3.htm#ExampleAssigningValuestoArrayVariables" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#ExampleAssigningValuestoArrayVariables">

Example: Assigning Values to Array Variables</A>

<LI><A HREF="ch3.htm#ExampleUsingArrayElements" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#ExampleUsingArrayElements">

Example: Using Array Elements</A>

<LI><A HREF="ch3.htm#ExampleUsingNegativeSubscripts" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#ExampleUsingNegativeSubscripts">

Example: Using Negative Subscripts</A>

<LI><A HREF="ch3.htm#ExampleDeterminingtheNumberofElementsinanArray" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#ExampleDeterminingtheNumberofElementsinanArray">

Example: Determining the Number of Elements in an Array</A>

<LI><A HREF="ch3.htm#ExampleHowtoGrabaSliceorPartofanArray" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#ExampleHowtoGrabaSliceorPartofanArray">

Example: How to Grab a Slice (or Part) of an Array</A>

</UL>

<LI><A HREF="ch3.htm#AssociativeArrayVariables" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#AssociativeArrayVariables">

Associative Array Variables</A>

<UL>

<LI><A HREF="ch3.htm#ExampleAssigningValuestoAssociativeArrayVariables" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#ExampleAssigningValuestoAssociativeArrayVariables">

Example: Assigning Values to Associative Array Variables</A>

</UL>

<LI><A HREF="ch3.htm#DoubleQuotedStringsRevisited" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#DoubleQuotedStringsRevisited">

Double-Quoted Strings Revisited</A>

<UL>

<LI><A HREF="ch3.htm#ExampleVariableInterpolation" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#ExampleVariableInterpolation">

Example: Variable Interpolation</A>

<LI><A HREF="ch3.htm#ExampleUsingtheIquotISpecialVariable" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#ExampleUsingtheIquotISpecialVariable">

Example: Using the <I>$&quot;</I> Special Variable</A>

</UL>

<LI><A HREF="ch3.htm#Summary" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#Summary">

Summary</A>

<LI><A HREF="ch3.htm#ReviewQuestions" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#ReviewQuestions">

Review Questions</A>

<LI><A HREF="ch3.htm#ReviewExercises" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch3.htm#ReviewExercises">

Review Exercises</A>

</UL>



<H2><I><FONT SIZE=5 COLOR=#FF0000>Chapter </FONT></I><FONT SIZE=5 COLOR=#FF0000>4

</FONT><FONT SIZE=5>&nbsp;&nbsp;Operators</FONT></H2>

<UL>

<LI><A HREF="ch4.htm#OperatorTypes" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#OperatorTypes">

Operator Types</A>

<LI><A HREF="ch4.htm#TheBinaryArithmeticOperators" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#TheBinaryArithmeticOperators">

The Binary Arithmetic Operators</A>

<UL>

<LI><A HREF="ch4.htm#ExampleTheExponentiationOperator" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#ExampleTheExponentiationOperator">

Example: The Exponentiation Operator</A>

<LI><A HREF="ch4.htm#ExampleTheModulusOperator" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#ExampleTheModulusOperator">

Example: The Modulus Operator</A>

</UL>

<LI><A HREF="ch4.htm#TheUnaryArithmeticOperators" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#TheUnaryArithmeticOperators">

The Unary Arithmetic Operators</A>

<UL>

<LI><A HREF="ch4.htm#ExampleThePreiNCrementOperator" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#ExampleThePreiNCrementOperator">

Example: The Pre-iNCrement Operator</A>

<LI><A HREF="ch4.htm#ExampleThePredecrementOperator" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#ExampleThePredecrementOperator">

Example: The Pre-decrement Operator</A>

<LI><A HREF="ch4.htm#ExampleThePostiNCrementOperator" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#ExampleThePostiNCrementOperator">

Example: The Post-iNCrement Operator</A>

</UL>

<LI><A HREF="ch4.htm#TheLogicalOperators" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#TheLogicalOperators">

The Logical Operators</A>

<UL>

<LI><A HREF="ch4.htm#ExampleThequotANDquotOperatorampamp" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#ExampleThequotANDquotOperatorampamp">

Example: The &quot;AND&quot; Operator (&amp;&amp;)</A>

<LI><A HREF="ch4.htm#ExampleThequotORquotOperator" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#ExampleThequotORquotOperator">

Example: The &quot;OR&quot; Operator (||)</A>

</UL>

<LI><A HREF="ch4.htm#ExampleThequotNOTquotOperator" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#ExampleThequotNOTquotOperator">

Example: The &quot;NOT&quot; Operator (!)</A>

<LI><A HREF="ch4.htm#TheBitwiseOperators" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#TheBitwiseOperators">

The Bitwise Operators</A>

<UL>

<LI><A HREF="ch4.htm#ExampleUsingtheampandOperators" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#ExampleUsingtheampandOperators">

Example: Using the &amp;, |, and ^ Operators</A>

<LI><A HREF="ch4.htm#ExampleUsingthegtgtandltltOperators" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#ExampleUsingthegtgtandltltOperators">

Example: Using the &gt;&gt; and &lt;&lt; Operators</A>

</UL>

<LI><A HREF="ch4.htm#TheNumericRelationalOperators" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#TheNumericRelationalOperators">

The Numeric Relational Operators</A>

<UL>

<LI><A HREF="ch4.htm#ExampleUsingtheltgtOperator" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#ExampleUsingtheltgtOperator">

Example: Using the &lt;=&gt; Operator</A>

</UL>

<LI><A HREF="ch4.htm#TheStringRelationalOperators" tppabs="http://cheminf.nankai.edu.cn/~eb~/Perl%205%20By%20Example/ch4.htm#TheStringRelationalOperators">

The String Relational Operators</A>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -