首页 > 代码库 > 来,试试PERL

来,试试PERL

试试,看看能否真的替代AWK,SED这些的。。。

技术分享

#!/usr/bin/perlprint "hello, world!\n";$line = <STDIN>;if ($line eq "\n") {    print "That was just a blank line!\n";}else {    print "That line of input was: $line";}$count = 0;while ($count < 10) {    $count += 2;    print "count is now $count\n";}$madonna = <STDIN>;if ( defined($madonna) ) {    print "The input was $madonna";} else {    print "No input available!\n";}

技术分享

来,试试PERL