DOC PREVIEW
TRINITY CSCI 2323 - Perl Basics

This preview shows page 1-2-3 out of 8 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 81More Perl Basics3-24-20102Opening 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 typesCommentsSyntax4Files■The open and close commands are used to open and close files.open(FILE_HANDLE,$filename);close FILE_HANDLE;■Putting a file handle in angle braces, <...>, will read from that file.5Arrays/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.6Context■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.7Problems■Let's continue to play around in Perl and do some reading from files to see how different things work.8Closing Remarks■Projects due


View Full Document

TRINITY CSCI 2323 - Perl Basics

Documents in this Course
Load more
Download Perl Basics
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Perl Basics and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Perl Basics 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?