韩半仙

  博客园  ::  :: 新随笔  ::  :: 订阅 订阅  :: 管理

2012年2月19日

摘要: loops are used for repeating codeeg: while(condition){ statement1; statement2;}perl provide two basic types of loopswhile/until loopsfor/foreach loopswhile.pl#!/usr/bin/perluse strict;use warnings;main(@ARGV);sub main{ open(FH, "linesfile.txt"); while(my $line = <FH>){# message(" 阅读全文
posted @ 2012-02-19 20:18 韩英武 阅读(389) 评论(0) 推荐(0)

摘要: 本章节实在是简单的不想写,太多雷同的部分了。understanding conditional statements1. conditional execute code selectivelyif(condition){ statements)2. conditionals my provide alternative codeif (condition){ statement_1}else{ statement_2}beginning with version 5.10, perl also provides a switch statement -use given ... 阅读全文
posted @ 2012-02-19 19:25 韩英武 阅读(291) 评论(0) 推荐(0)