in reply to Re: Hope a subroutine will return undef by default
in thread Hope a subroutine will return undef by default
#!/usr/bin/perl use warnings; use strict; use Data::Dumper; sub explicit { return undef } sub bare { return } print "Explicit: ", Dumper [ explicit() ]; print "Bare: ", Dumper [ bare() ];
Output:
Explicit: $VAR1 = [ undef ]; Bare: $VAR1 = [];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Hope a subroutine will return undef by default
by boftx (Deacon) on Feb 11, 2014 at 16:55 UTC |