1. Problem如何管理多个输入流The next input to your program could be coming from any number of filehandles, but you don't know which. You've tried using select( ), but the need to then do unbuffered I/O is more than you can deal with (and it's making your code very difficult...【阅读全文】
1. Problem如何管理多个输入流The next input to your program could be coming from any number of filehandles, but you don't know which. You've tried using select( ), but the need to then do unbuffered I/O is more than you can deal with (and it's making your code very difficult...【阅读全文】
《Mastering.Algorithms.with.Perl》详细介绍了很多算法,而对于排序算法,Perl一般使用一个sort足矣,但是一些老的排序算法在特定场合还是相当实用的。1. 选择排序(section sort)#!/usr/bin/perl -wuse strict;my @array = qw(able was i ere i saw elba);...【阅读全文】
(一)单行注释: 以#开头的行都被perl认为是注释。但是有一个例外,perl程序的第一行是#开头的,他指定了perl程序的解释器。例如:#print 1; (二)多行注释:最常用的方法是使用 POD(Plain Old Documentations) 来进行多行注释。方法如下:=podcodes to co...【阅读全文】