1More Perl Basics3/24/20082Opening Discussion■Do you have any questions about any aspect of the class at this point?3Recap of Last Class■What can you tell me about Perl?Variables and typesCommentsSyntaxFiles and input4Arrays/Lists■List literals are specified with parentheses and have the values inside separated by commas.■Array variables are prefixed with @, but only when referring to the whole list.■We get out elements with []. Because we are pulling out a single scalar the variable is preceded with a $.■Negative indexes count back from the end of the list.■Push and pop.■Reverse and sort.5Context■How Perl interprets many statements depends on the context. Normally scalar vs. list context.■If you read a file in a scalar context it will give you back one line from the file. If you read it in a list context it will give you a list with all the lines.6Problems■Let's continue to play around in Perl and do some reading from files to see how different things work.7Closing Remarks■There is no class the rest of this
View Full Document