Perl 学习心得体会

首先是在windows平台上使用,可以下载ActivePerl或者StrawberryPerl,安装后既可以像在linux下进行命令行运行了(没有图形界面,呵呵!)

Predefined Names:http://www.cs.cmu.edu/People/rgs/pl-predef.html

Perl 中的特殊变量 $&, $`,$' ,@_ :http://blog.csdn.net/bjbs_270/archive/2007/09/20/1792360.aspx

下面的内容来时学习《Advanced Perl Programming》

Chapter 1

dynamically and statically allocated storage
anonymous storage
reference and dereference
scalars, arrays, hashes

%sue   =  (
    
' name '   =>   ' Sue ' ,
    
' age '   =>   ' 45 ' ,
    
' children '   =>  [         # anonymous array
         {     # anonymous hash 1
             ' name '   =>   ' John ' ,
            
' age '   =>   ' 20 '
         }
,
         {    
# anonymous hash 2
             ' name '   =>   ' Peggy ' ,
            
' age '   =>   ' 16 '
          }
        ]
);

print   $sue {children} -> [ 1 ] -> {name};

Chapter 2

http://www.perl.com/doc/FMTEYEWTK/ (http://www.perl.com/doc/FMTEYEWTK/regexps.html)

# two dimension array implement
%foo1   =  (a  =>   10 ,  str  =>   " good " );

$a   =   0 ;
$str   =   1 ;
$foo2 [ $a =   10 ;
$foo2 [ $str =   " hello " ;

print   " $foo1{str}  " ;
print   " $foo2[$str]  " ;

# complex structure
$student { 0001 =  {
    name 
=>  fei ,
    course 
=>  [] };

print   $student { 0001 }{name};

看到第二章,发现内容是在是太深了,还是先看看《Perl Programming》吧。尤其是正则表达式,一定要好好学习。

正则表达式30分钟入门教程 (相当不错的教程,虽然作者是.Net开发者)
http://unibetter.com/deerchao/zhengzhe-biaodashi-jiaocheng-se.htm

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值