in reply to Re^2: Spotting an empty array as argument
in thread Spotting an empty array as argument
For example, you can easily replicate the behaviour of uc, as prototype('CORE::uc') returns _. Similarly, pack has the prototype of $_ (the underscore must be the last one). But print or chomp return undef, so their behaviour is more complex and prototypes can't express it. So there is a special rule, but only for some of the built-in functions.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Spotting an empty array as argument
by ikegami (Patriarch) on Mar 26, 2021 at 19:32 UTC | |
by LanX (Saint) on Mar 26, 2021 at 20:36 UTC | |
by ikegami (Patriarch) on Mar 27, 2021 at 05:56 UTC | |
|
Re^4: Spotting an empty array as argument (prototype _ )
by LanX (Saint) on Mar 26, 2021 at 10:46 UTC |