标签:
试试,看看能否真的替代AWK,SED这些的。。。
#!/usr/bin/perl print "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"; }
标签:
原文地址:http://www.cnblogs.com/aguncn/p/4213918.html