韩半仙

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

2012年3月10日

摘要: a reference is a variable that refer to a value- as opposed to a variable that contains a valueexample.pl#!/usr/bin/perl#usestrict;usewarnings;main(@ARGV);submain{my$var="ThisisthePerl5referenceschapter.";my$ref=\$var;my$copy=$ref;message($$ref);$var=42;message($$copy);}submessage{my$m=shi 阅读全文
posted @ 2012-03-10 21:31 韩英武 阅读(233) 评论(0) 推荐(0)

摘要: understanding subroutinessubroutines(sometimes called "functions") are a means of encapsulating code.subroutines are reusable. subroutines can hide complexity.subroutines can call other subroutines.subroutines can call themselves.this is called "recursion"http://www.cnblogs.com/h 阅读全文
posted @ 2012-03-10 13:23 韩英武 阅读(333) 评论(0) 推荐(0)