#如果给定的值不是undef, defined()函数会返回 true #如果给定值是undef 则返回false.my $test01 = "" ;#it return ture it will print string.if (defined $test01){ print "var is defined\n";}#it return false it will print string.if (! defined $test02){ print "var is undef\n";}
本文共 308 字,大约阅读时间需要 1 分钟。
#如果给定的值不是undef, defined()函数会返回 true #如果给定值是undef 则返回false.my $test01 = "" ;#it return ture it will print string.if (defined $test01){ print "var is defined\n";}#it return false it will print string.if (! defined $test02){ print "var is undef\n";}
转载于:https://www.cnblogs.com/jinxiang1224/p/8468170.html