perl学习4--调用子程序
生活随笔
收集整理的這篇文章主要介紹了
perl学习4--调用子程序
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
#!/usr/bin/perl -w
sub sum_of_fred_and_barney {
? print "Hey,you called the sum_of_fred_and_barney subroutine!\n";
? $fred+$barney;
}
$fred=3;
$barney=4;
$wilma=&sum_of_fred_and_barney;
print "\$wilma is $wilma\n";
sub sum_of_fred_and_barney {
? print "Hey,you called the sum_of_fred_and_barney subroutine!\n";
? $fred+$barney;
}
$fred=3;
$barney=4;
$wilma=&sum_of_fred_and_barney;
print "\$wilma is $wilma\n";
轉(zhuǎn)載于:https://www.cnblogs.com/djcsch2001/archive/2011/04/24/2026173.html
總結(jié)
以上是生活随笔為你收集整理的perl学习4--调用子程序的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ASP.NET服务器应用程序不可用
- 下一篇: Reactive Extensions简