Perl
文章平均质量分 73
youhaodeyi
这个作者很懒,什么都没留下…
展开
-
关于perl中如何实现switch结构
众所周知,perl中没有内置的switch结构,但是switch确实很有用,它提供了一个简单明了的结构体,可以避免烦琐的if else。既然perl不支持switch结构,我们可以自己写一个switch结构。我的switch结构如下:print("Enter command:");while({ SWITCH:{ /run/ && do{原创 2006-09-02 10:49:00 · 6646 阅读 · 1 评论 -
Perl中的直接引用
Perl 中的直接引用 Perl中的引用分为直接引用和符号引用,本文只针对直接引用,至于符号引用在以后的文章中会给出解释。 1、 一般的标量引用,如:sub add{ my ($a,$b) = @_; $$a++; $$b++;}$a=1;$b=2;add(/$a,/$b);print "$a,$原创 2006-09-15 11:14:00 · 1699 阅读 · 0 评论