modern perl学习笔记

eq 操作符通过强制 字符串上下文,按字符串对待它的操作数。== 操作符则强制 数值上下文。 

在极少数情况下,没有合适类型的操作符存在,你也许需要明确地强制上下文。强制数值上下文,在变量前加零。 强制字符串上下文,将变量和空字符串拼接起来。强制布尔上下文,使用双重否定操作符。

my $numeric_x = 0 + $x; # 强制数值上下文
my $stringy_x = '' . $x; # 强制字符串上下文
my $boolean_x = !!$x; # 强制布尔上下文

 

作为对你设置 CPAN 客户端和相应环境来构建和安装发行版的回报,你得到了可以完成任何任务的 代码库的访问权────

从数据库访问到能处理现存几乎所有网络设备的协议分析工具再到声音和图像 处理库以及你系统上共享库的包装器。   #或许这就是Perl的优势所在吧。。。

 

转载于:https://www.cnblogs.com/wangshuai901/archive/2012/03/21/2408851.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
A Perl expert can solve a problem in a few lines of well-tested code. Now you can unlock these powers for yourself. Modern Perl teaches you how Perl really works. It's the only book that explains Perl thoroughly, from its philosophical roots to the pragmatic decisions that help you solve real problems--and keep them solved. You'll understand how the language fits together and discover the secrets used by the global Perl community. This beloved guide is now completely updated for Perl 5.22. When you have to solve a problem now, reach for Perl. When you have to solve a problem right, reach for Modern Perl. Discover how to scale your skills from one-liners to asynchronous Unicode-aware web services and everything in between. Modern Perl will take you from novice to proficient Perl hacker. You'll see which features of modern Perl will make you more productive, and which features of this well-loved language are best left in the past. Along the way, you'll take advantage of Perl to write well-tested, clear, maintainable code that evolves with you. 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 explains how to use Moose, how to write testable code, and how to deploy and maintain real-world Perl applications. This new edition covers the new features of Perl 5.20 and Perl 5.22, including all the new operators, standard library changes, bug and security fixes, and productivity enhancements. It gives you what you need to use the most up-to-date Perl most effectively, all day, every day. What You Need: Perl 5.16 or newer (Perl 5.20 or 5.22 preferred). Installation/upgrade instructions included. Table of Contents Chapter 1. The Perl Philosophy Chapter 2. Perl and Its Community Chapter 3. The Perl Language Chapter 4. Operators Chapter 5. Functions Chapter 6. Regular Expressions and Matching Chapter 7. Objects Chapter 8. Style and Efficacy Chapter 9. Managing Real Programs Chapter 10. Perl Beyond Syntax Chapter 11. What to Avoid Chapter 12. Next Steps with Perl
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值