Learning Perl 4th Editon pdf

295 257 0
Learning Perl 4th Editon pdf

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... major version of Perl: Perl 6 Don't throw away your Perl 5, which is still the current and stable version of Perl We don't expect a stable version of Perl 6 for a while yet Perl 5 won't disappear when Perl 6 shows up, and people may end up using both for several years The Perl 5 Porters maintain Perl 5 just like they always have and some of the good ideas from Perl 6 have made it into Perl 5 In 2000,... say what will happen since they are still working on it, but you can write simple Perl 6 programs in Pugs You can see more about Perl 6 at http://dev .perl. org /perl6 and http://www.pugscode.org/ to get more information 1.2.6 What Is Perl Good For? Perl is good for quick-and-dirty programs that you whip up in three minutes Perl is also good for long and extensive programs that take a dozen programmers... 1.3.1 What Is CPAN? CPAN is the Comprehensive Perl Archive Network, your one-stop shopping for Perl It has the source code for Perl itself, ready-to-install ports of Perl to all sorts of non-Unix systems,[ ] examples, documentation, extensions to Perl, and archives of messages about Perl In short, CPAN is comprehensive [ ] It's nearly always better to compile Perl from the source on Unix systems Other... as other sites, such as http://perldoc .perl. org that has HTML and PDF versions of the Perl documentation, http://www.perldoc.com that lets you search multiple versions of the documentation, or http://faq .perl. org/ that has the latest version of the perlfaq [*] The term manpages is a Unix-ism meaning documentation If you're not on a Unix system, the manpages for Perl should be available via your system's... sprung up around Perl discussions One popular one, known as The Perl Monastery (http://www.perlmonks.org ) has seen quite a bit of participation from many Perl book and column authors, including at least two of the authors of this book You can also check out http://learn .perl. org/ and its associated mailing list, beginners @perl. org If you find yourself needing a support contract for Perl, a number of... line is the least portable part of a Perl program because you'll need to find out what goes there for each machine Fortunately, it's almost always /usr/bin /perl or /usr/local/bin /perl If that's not it, you'll have to find where your system is hiding perl and use that path On Unix systems, you might use a shebang line that finds perl for you: #!/usr/bin/env perl If perl isn't in any of the directories... first proposed the next major release of Perl as the Perl community's rewrite of Perl In the years that followed, a new interpreter called Parrot came to life, but not much else happened for average users This year, Autrijus Tang started playing with Pugs (Perl User Golfing System) as a "featherweight" implementation of Perl 6 in Haskell Developers from the Perl and Haskell sides of the world ran to... well 1.2.5 What Is Happening with Perl Now? Larry doesn't write the code these days, but he still guides the development and makes the big decisions Perl is mostly maintained by a hardy group of people called the Perl 5 Porters You can follow their work and discussions on the perl5 -porters @perl. org mailing list As we write this (March 2005), a lot is happening with Perl For the past few years, many... escapes in the next chapter 1.4.3 How Do I Compile Perl? Just run your Perl program The perl interpreter compiles and then runs your program in one user step $ perl my_program When you run your program, Perl' s internal compiler first runs through your entire source, turning it into internal bytecode , which is an internal data structure representing the program Perl' s bytecode engine takes over and runs the... your program slower Perl 6 should do a lot better in this regard, although it is too soon to tell (as we write this) 1.5 A Whirlwind Tour of Perl So, you want to see a real Perl program with some meat? (If you don't, just play along for now.) Here you are: #!/usr/bin /perl @lines = `perldoc -u -f atan2`; foreach (@lines) { s/\w]+)>/\U$1/g; print; } Now, the first time you see Perl code like this, . write simple Perl 6 programs in Pugs. You can see more about Perl 6 at http://dev .perl. org /perl6 and http://www.pugscode.org/ to get more information. 1.2.6. What Is Perl Good For? Perl is good. as http://perldoc .perl. org that has HTML and PDF versions of the Perl documentation, http://www.perldoc.com that lets you search multiple versions of the documentation, or http://faq .perl. org/. The Perl 5 Porters maintain Perl 5 just like they always have and some of the good ideas from Perl 6 have made it into Perl 5. In 2000, Larry Wall first proposed the next major release of Perl

Ngày đăng: 07/07/2014, 05:20

Từ khóa liên quan

Mục lục

  • Learning Perl, 4th Edition

  • Table of Contents

  • Copyright

  • Preface

  • Chapter 1. Introduction

  • Chapter 2. Scalar Data

  • Chapter 3. Lists and Arrays

  • Chapter 4. Subroutines

  • Chapter 5. Input and Output

  • Chapter 6. Hashes

  • Chapter 7. In the World of Regular Expressions

  • Chapter 8. Matching with Regular Expressions

  • Chapter 9. Processing Text with Regular Expressions

  • Chapter 10. More Control Structures

  • Chapter 11. File Tests

  • Chapter 12. Directory Operations

  • Chapter 13. Strings and Sorting

  • Chapter 14. Process Management

  • Chapter 15. Perl Modules

  • Chapter 16. Some Advanced Perl Techniques

Tài liệu cùng người dùng

Tài liệu liên quan