📄 程嶏清单9-3.txt
字号:
sub bigger_than {
my($n,@values); # create some local variables
($n,@values) = @_; # split args into limit and values
my(@result); # temporary for holding the return value
foreach $_ (@values) { # step through the arg list
if ($_ > $n) { # is it eligible?
push(@result,$_); # add it
}
}
return @result;
}
@list = (95..105);
@new = bigger_than(100,@list);
foreach $number(@new){
print $number," ";
}
print "\n";
@this = bigger_than(5,1,5,122,-34.15,30,780);
foreach $number(@this){
print $number," ";
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -