Welcome to the Monastery | |
PerlMonks |
Re^2: open undef shiftby ikegami (Patriarch) |
on Oct 03, 2009 at 18:01 UTC ( [id://799035]=note: print w/replies, xml ) | Need Help?? |
You end up at one of these:
Notice how they check if the file name SV is the global constant undef (*args == &PL_sv_undef) rather than checking if it's undefined (SvOK(*args)). It could be a bug, but I suspect it's intentional to try to detect the case where the file name is accidentally undef. It almost never makes no sense for a program to allow both a valid file name and undef. If your program is one of those, you can use
I think they should used a special character in the mode string instead of using a literal undef.
True, but one doesn't expect a difference in behaviour between the undefined value returned by undef and an undefined scalar. Any differences should be explicitly stated.
In Section
Seekers of Perl Wisdom
|
|