in reply to Re^3: open undef
in thread open undef
For me I am trying to figure out why perl handles the cases differently.
My position is that what happens in the first case is the proper thing to do.
You want to open a file for reading and you supply undef as a file-name: Error. That's how I think it should be.
And I still cannot quite see why the cases supplied should be different.
And there is this:
Both have the same high refcount, but the addresses seem to differ - why is that?perl -MDevel::Peek -e'Dump($ARGV[0])' SV = NULL(0x0) at 0x55a8c4978560 REFCNT = 2147483639 FLAGS = (READONLY,PROTECT) perl -MDevel::Peek -e'Dump(undef)' SV = NULL(0x0) at 0x55923aa70560 REFCNT = 2147483639 FLAGS = (READONLY,PROTECT)
Is this a can of worms that one should not open?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: open undef
by ikegami (Patriarch) on Aug 02, 2018 at 20:24 UTC | |
by morgon (Priest) on Aug 02, 2018 at 20:37 UTC | |
by ikegami (Patriarch) on Aug 02, 2018 at 20:49 UTC | |
by morgon (Priest) on Aug 02, 2018 at 20:57 UTC | |
by ikegami (Patriarch) on Aug 05, 2018 at 05:16 UTC | |
by BillKSmith (Monsignor) on Aug 07, 2018 at 14:20 UTC | |
by ikegami (Patriarch) on Aug 08, 2018 at 02:15 UTC | |
by BillKSmith (Monsignor) on Aug 08, 2018 at 11:01 UTC |