`
hitgnu
  • 浏览: 92402 次
  • 性别: Icon_minigender_1
  • 来自: 苏州-->上海
社区版块
存档分类
最新评论

learn perl

阅读更多

#!/usr/bin/perl

print "Hello, World...\n";
printf "请问您的姓名?";
$name=<STDIN>;
chop($name);
printf "你好$name,欢迎光临网上学园!\n";

print"请输入一个字符串!\n";
$string=<STDIN>; #<STIDN>代表标准输入,会让使用者输入一字符串
chop($string); #将$string最后一个换行的字符\n删除掉
if($string!~/cgi/)
{#!~不相配运算符
 print("输入的字符串中没有cgi这个字符串!\n");#如果输入的字符串中没有cgi这个字符串的话,就会显示出这个信息
}
elsif ($string=~/cgi/)
{#=~相配运算符
 print("输入的字符串中有cgi这个字符串!\n");#如果输入的字符串中有cgi这个字符串的话,就会显示出这个信息
}

#读写文件,假设当前目录有一文件名为:test.txt



分享到:
评论

相关推荐

    Learn Perl Perl_排版

    Learning Perl very detail Easy to learn perl

    Learn Perl in 21 days

    This is a super good perl tutorial. It will teach you perl by so many elementory examples and clear explanations. Worth treasuring.

    learn_perl_by_example.pdf

    learn_perl_by_example。最基本的。2008年。英文。

    Learn Perl in a Weekend

    快速学习Perl的书籍,循序渐进的教学方法。

    Learn Perl

    Perl programming. The basic document for new comer in Perl.

    Beginning Perl Programming.pdf

    Get started with Perl 5 and learn the important core concepts of Perl programming, such as variables, flow control, expressions, and I/O. Additionally, this book covers pattern matching and shows that...

    minimal_perl_for_unix_and_linux_people.pdf

    hunch that many were hungering for an easier way to learn Perl. Since then, I’ve taught Minimal Perl at other professional conferences, at meetings of Perl Users Groups in the US and Canada, and to ...

    Apress.Beginning.Perl.3rd.Edition.Apr.2010

    This is a book for those of us who believed that we didn’t need to learn Perl, and now we know it is more ubiquitous than ever. Perl is extremely flexible and powerful, and it isn’t afraid of Web ...

    Perl 6 Deep Dive

    Learn Perl 6 effortlessly to solve everyday problems Filled with practical examples, this comprehensive guide explores all aspects of Perl 6. Leverage the power of Perl 6 concurrency to develop ...

    perl_爬虫脚本

    银行外汇牌价爬虫。结合中英两版网站信息,适合perl初学者学习模块和... Binding ounce version of the site information for beginners to learn perl module and hash arrays, etc. Txt file format code in them.

    perl programming 01

    perl programming 01, best for beginner to learn perl

    impatient.perl

    This document is for people who either want to learn perl or are already programming in perl and just do not have the patience to scrounge for information to learn and use perl. This document should ...

    Intermediate Perl.pdf

    Learn how Perl manages to keep track of pointers to data, and an introduction to anonymous data structures and autovivification. Chapter 6, Manipulating Complex Data Structures Create, access, and ...

    Modern.Perl.4th.Ed

    Learn how the language works, how to take advantage of the CPAN's immense trove of time-tested solutions, and how to write clear, concise, powerful code that runs everywhere. Specific coverage ...

    Perl Best Practices

    Instead of each of us developing our own, we can learn good practices from one of Perl's most prolific and experienced authors. I recommend this book to anyone who prefers getting on with the job ...

    Think Perl 6: How to Think Like a Computer Scientist

    Think Perl 6: How to Think Like a Computer Scientist by Laurent Rosenfeld English | 8 May 2017 | ASIN: B0716P9W11 | 466 Pages | AZW3 | 1.02 MB Want to learn how to program and think like a computer ...

    Effective.Perl.Programming.Writing.Better.Programs.with.Perl.chm

    The book on Perl that experienced Perl programmers have been looking for, Effective ... Learn from Hall's answers to "real life" questions and problems he receives from newsgroups and his Perl seminars.

    Practical Text Mining With Perl (zipped)

    This book, however, does make one demand: it assumes that you are willing to learn to write simple programs using Perl. This programming language is explicitly designed to work with text. In addition,...

    intermediate perl

    If you're familiar with the material in Learning Perl and have the ambition learn more, this book will take you much further into Perl's capabilities. Topics include: * Packages and namespaces * ...

    learn_perl_oneliners:基于示例的命令行中Perl文本处理指南

    learn_perl_oneliners:基于示例的命令行中Perl文本处理指南

Global site tag (gtag.js) - Google Analytics