|
論壇說明 |
歡迎您來到『史萊姆論壇』 ^___^ 您目前正以訪客的身份瀏覽本論壇,訪客所擁有的權限將受到限制,您可以瀏覽本論壇大部份的版區與文章,但您將無法參與任何討論或是使用私人訊息與其他會員交流。若您希望擁有完整的使用權限,請註冊成為我們的一份子,註冊的程序十分簡單、快速,而且最重要的是--註冊是完全免費的! 請點擊這裡:『註冊成為我們的一份子!』 |
|
主題工具 | 顯示模式 |
2004-05-20, 11:42 AM | #1 |
註冊會員
|
An Overview of Perl
1. An Overview of Perl
Contents: Getting Started Natural and Artificial Languages A Grade Example Filehandles Operators Control Structures Regular Expressions List Processing What You Don't Know Won't Hurt You (Much) 1.1 Getting Started We think that Perl is an easy language to learn and use, and we hope to convince you that we're right. One thing that's easy about Perl is that you don't have to say much before you say what you want to say. In many programming languages, you have to declare the types, variables, and subroutines you are going to use before you can write the first statement of executable code. And for complex problems demanding complex data structures, this is a good idea. But for many simple, everyday problems, you would like a programming language in which you can simply say: print "Howdy, world!\n"; and expect the program to do just that. Perl is such a language. In fact, the example is a complete program,[1] and if you feed it to the Perl interpreter, it will print "Howdy, world!" on your screen. [1] Or script, or application, or executable, or doohickey. Whatever. And that's that. You don't have to say much after you say what you want to say, either. Unlike many languages, Perl thinks that falling off the end of your program is just a normal way to exit the program. You certainly may call the exit function explicitly if you wish, just as you may declare some of your variables and subroutines, or even force yourself to declare all your variables and subroutines. But it's your choice. With Perl you're free to do The Right Thing, however you care to define it. There are many other reasons why Perl is easy to use, but it would be pointless to list them all here, because that's what the rest of the book is for. The devil may be in the details, as they say, but Perl tries to help you out down there in the hot place too. At every level, Perl is about helping you get from here to there with minimum fuss and maximum enjoyment. That's why so many Perl programmers go around with a silly grin on their face. This chapter is an overview of Perl, so we're not trying to present Perl to the rational side of your brain. Nor are we trying to be complete, or logical. That's what the next chapter is for.[2] This chapter presents Perl to the other side of your brain, whether you prefer to call it associative, artistic, passionate, or merely spongy. To that end, we'll be presenting various views of Perl that will hopefully give you as clear a picture of Perl as the blind men had of the elephant. Well, okay, maybe we can do better than that. We're dealing with a camel here. Hopefully, at least one of these views of Perl will help get you over the hump. [2] Vulcans (and like-minded humans) should skip this overview and go straight to Chapter 2, The Gory Details, for maximum information density. If, on the other hand, you're looking for a carefully paced tutorial, you should probably get Randal's nice book, Learning Perl (published by O'Reilly & Associates). But don't throw out this book just yet. |
送花文章: 0,
|
|
|
相似的主題 | ||||
主題 | 主題作者 | 討論區 | 回覆 | 最後發表 |
windwos如何執行Perl或CGI | 飛鳥 | 網路疑難應用技術研討區 | 1 | 2005-10-08 12:50 AM |
2.網路管理語言 Perl 的簡介 | 飛鳥 | 網路疑難應用技術研討區 | 0 | 2005-10-07 09:39 AM |
perltoot - Tom's object-oriented tutorial for perl | mic64 | 作業系統操作技術文件 | 0 | 2004-05-20 01:18 PM |
Perl in a Nutshell | mic64 | 作業系統操作技術文件 | 9 | 2004-05-20 01:15 PM |
ㄚ...我的硬碟全掛了!誰能救救我>< | Atober | 硬體疑難使用問題討論區 | 11 | 2003-05-12 11:10 PM |