TAILIEUCHUNG - Lecture Programming languages (2/e): Chapter 12d - Tucker, Noonan

Chapter 12d - Perl. Perl is a widely used scripting language, which is a high-level language that is interpreted at run time rather than compiled into machine language. Early scripting languages were used to automate job control tasks that a user might perlorrn at the keyboard. | Programming Languages 2nd edition Tucker and Noonan Chapter 12 Imperative Programming I really hate this darn machine; I wish they would sell it; It won’t do what I want it to, but only what I tell it. Programmer’s lament (anonymous) Contents What Makes a Language Imperative? Procedural Abstraction Expressions and Assignment Library Support for Data Structures C Ada Perl Perl is: widely used a scripting language (originally for Unix) dynamically typed encourages a variety of styles supports regular expression pattern matching “Larry Wall . created Perl when he was trying to produce some reports from a Usenet-news-like hierarch of files for a bug reporting system, and awk ran out of steam. Larry, being the lazy programmer that he is, decided to over-kill the problem with a general purpose tool that he could use in at least one other place. The result was the first version of Perl.” Scripting Languages “glue” take output from one application and reformat into desired input format for a different application. most time is spent in the underlying applications. also used for Web applications General Characteristics dynamically typed default conversion from one type to another (vs. Python) result is distinct operators; ex: . for string concatenation types: numbers, strings, regular expressions dynamic arrays: indexed and associative String vs. numeric comparisons: 10 “3465”, “allen” => “3131”, “rebecca” => “2912”); print $d{“bob”}; # prints 3465 Many different ways of saying the same thing Much of the syntax is optional; ex: ( ) Perl 5 added support for classes and objects Great strengths: support for regular expressions Many irregularities in Perl #! /usr/bin/perl die "Usage mygrep string \n" if @ARGV < 1; use strict; my .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.