2wscv 发表于 2015-12-28 15:59:12

perl学习4--调用子程序

#!/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";
页: [1]
查看完整版本: perl学习4--调用子程序