close
#!/usr/bin/perl
# name.pl
$pre_a =$ARGV[0];
$pre_b =$ARGV[0];
$name = $pre_a || $pre_b;
print "$name \n";
---------------------------------
[root@user]# ./name.pl jason
[root@user]j#jason
[root@user]# ./name.pl '' jean
[root@user]j#jean
------------------------------------------------------------------
#!/usr/bin/perl
# name.pl
$name =$ARGV[0];
$pre_b ='jason';
$name ||= $pre_b;
print "$name \n";
---------------------------------
[root@user]# ./name.pl steven
[root@user]j#steven
[root@user]# ./name.pl
[root@user]j#jason
# name.pl
$pre_a =$ARGV[0];
$pre_b =$ARGV[0];
$name = $pre_a || $pre_b;
print "$name \n";
---------------------------------
[root@user]# ./name.pl jason
[root@user]j#jason
[root@user]# ./name.pl '' jean
[root@user]j#jean
------------------------------------------------------------------
#!/usr/bin/perl
# name.pl
$name =$ARGV[0];
$pre_b ='jason';
$name ||= $pre_b;
print "$name \n";
---------------------------------
[root@user]# ./name.pl steven
[root@user]j#steven
[root@user]# ./name.pl
[root@user]j#jason
全站熱搜
留言列表