Ò»¸öӦƸµÄÊÔÌâ PHP ˸ø½â´ðһϠ¼±ÓÃ
=head1 *NAME*
perltst5.prl -- language analyzer (perl test 5)
=head1 *DESCRIPTION*
This program analyzes an arbitrary sample of any language written in
latin characters (a-z).
=head1 *TASK*
The program should output the following information:
1. Frequency distribution of the vowels and consonants used in the sample.
2. A list of the different consonant-vowel patterns
used in the sample:
A consonant-vowel pattern ("c-w pattern") should have
an 'a' for each vowel, and a 'c' for each consonant;
e.g. the c-w pattern word 'mopufom' would be 'cacacac',
and the c-w pattern for 'oleq' would be 'acac'.
3. The most frequent consonant-vowel pattern in the sample.
=head1 *QUESTION*
The sample below consists of two *different* language samples,
pasted one after another.
At which point does the second one probably start?
=cut
# Note: qw( ) "quotes words": creates an array with the space-separated items
@vowels = qw( a e i o u y );
@cons = qw( b c d f g h j k l m n p q r s t v w x z );
$/ = undef;
$_ = <DATA>; # All the text is in $_ now.
# write
Ïà¹ØÎÊ´ð£º
¸÷λ´óÏÀ
ÇóÒ»¶Îphp´úÂë
¿ÉÒÔʵÏÖÒÔϹ¦ÄÜ
Õë¶Ô²»Í¬µÄä¯ÀÀÆ÷ÏÔʾ²»Í¬µÄͼƬ
¾ÍÊÇÓÐÒ»ÕÅͼƬ£¬Ö»Ïë¸øie6Óû§¿´µ½
Èç¹ûie7¡¢chrome¡¢firefoxÓû§ä¯ÀÀÔòÏÔʾÁíÍâÒ»ÕÅͼƬ  ......
PHP code:
$date = '2009-12-25';
$ptn = '/([\d]{4})[- \/](0?[\d]|1[0-2])[-\/ ](0?[\d]|[1-2][\d]|3[0-1])/';
if (preg_match($ptn,$date,$out))
{
print_r($out);exit();
}
½á¹ûΪ:
PHP code:
......
µÃµ½¿Í»§¶ËIPÀÏÎÊÌâÁË£¬µ«Õâ´Î»·¾³Óе㲻һÑù£¨ ¿Í»§ÊÇÕâÑùµÄ»·¾³Ã»°ì·¨£¬ËµBTµÄÇëÆ®¹ý :) £©¡£
win2k3¸Ãϵͳ£¨Ï³ÆÏµÍ³A£©ÉÏ×°ÁËVMware Server£¬VMÏÂÓиöwin2k3ϵͳ(ϳÆÏµÍ³B)¡£
ϵͳA£ºÖ±½ÓÁ¬½Ó¹«Íø¡£Óй«ÍøI ......
ÎÒÔÚÍøÕ¾µÄÒýµ¼Ò³ÖÐÌí¼ÓÁË<embed src="ÒôÀÖµØÖ·" autostart="true" loop="true" hidden="true"></embed>
Õâ¾ä»°£¬È»ºóÌø×ªÒ³Ãæºó£¬±³¾°ÒôÀÖ¾ÍûÓÐÁË£¬ÔõôÈÃÕ ......