4 ms·
A sub without prototype (anonymous or not) indeed allows any number of arguments. That's sufficient to trigger the syntax error.
by jwilk 5y ago
A sub without prototype (anonymous or not) indeed allows any number of arguments. That's sufficient to trigger the syntax error.
- hnu0847 5y agoSo basically this: sub() {} does not try to parse the /1;#/+ as an argument because the () indicates there are no arguments (although they could be explicitly included if f were called with (), whereas this: sub f {} does try to parse the /1;#/+ as an argument because that's perl's behavior if () are omitted?
- jwilk 5y agoThat's right.