TRINITY CSCI 2323 - Perl Basics (8 pages)

Previewing pages 1, 2, 3 of 8 page document View the full content.
View Full Document

Perl Basics



Previewing pages 1, 2, 3 of actual document.

View the full content.
View Full Document
View Full Document

Perl Basics

68 views


Pages:
8
School:
Trinity University
Course:
Csci 2323 - Scientific Computation
Scientific Computation Documents

Unformatted text preview:

More Perl Basics 3 24 2010 1 Opening Discussion Do you have any questions about any aspect of the class at this point 2 Recap of Last Class What can you tell me about Perl Variables and types Comments Syntax 3 Files 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 4 Arrays 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 5 Context 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 6 Problems Let s continue to play around in Perl and do some reading from files to see how different things work 7 Closing Remarks Projects due Friday 8



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

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 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?