return $inp or ""; #### $ perl -le' sub prompt { my $inp = shift; return $inp or "zzz"; } print prompt( $_ ) for undef, 0, 1, 2; ' 0 1 2 #### $ perl -le' sub prompt { my $inp = shift; return $inp || "zzz"; } print prompt( $_ ) for undef, 0, 1, 2; ' zzz zzz 1 2 #### while ( chomp(my $inpt = ) != 0 ) { #### while ( my $inpt = ) { chomp $inpt; #### system("ifconfig wlan0 up") if ( (my $ifconf = `ifconfig`) !~ /wlan0/ ); #### system 'ifconfig wlan0 up' if `ifconfig` !~ /wlan0/;