in reply to Re^2: true/false condition - what am I doing wrong?
in thread true/false condition - what am I doing wrong?
Update: even more uses are possible:
#!/usr/bin/perl -w use strict; sub is_name_valid { return $_[0]; #just a dummy } print "the name ",is_name_valid(0) ? "was" :"was not"," valid\n"; # the name was not valid print "the name ",is_name_valid(1) ? "was" :"was not"," valid\n"; # the name was valid
|
|---|