On Wednesday, 19 January 2022, 19:00:12 CET, Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> wrote: > sub signatured($x = undef) { > # impossible to distinguish signatured() from signatured(undef) > } I knew my 3VL discussion went over like a lead balloon, but I couldn't resist being cheeky ... use Unknown::Values; sub foo ($bar = unknown) { say is_unknown $bar ? "unknown" : "known"; } foo(); That prints "unknown", so if someone passed in `undef`, it will print "known" because someone explicitly assigned to it. Best, Ovid -- IT consulting, training, specializing in Perl, databases, and agile development http://www.allaroundtheworld.fr/. Buy my book! - http://bit.ly/beginning_perlThread Previous | Thread Next