Sisyphus wrote: >use subs ('FOO'); > >if( FOO < 43) { print "a\n" } ... >Unterminated <> operator at subs.pl line 5. Both of your failures have the same cause: the "<" is interpreted as the start of an argument expression, rather than as an operator. This is not specific to "use subs", and actually happens with any kind of predeclaration, unless you give an empty prototype: $ perl -lwe 'sub FOO; if (FOO < 43) { print "a"; } sub FOO { return 42; }' Unterminated <> operator at -e line 1. $ perl -lwe 'sub FOO { return 42; } if (FOO < 43) { print "a"; }' Unterminated <> operator at -e line 1. The same problem applies to other characters that can be either the start of a term or an infix operator: $ perl -lwe 'sub FOO { return 42; } print FOO + 1; print FOO() + 1' 42 43 This isn't a bug, but an intentional grammatical feature. Using explicit parens to delimit the empty argument list is one solution, as you've found. The other solution is to give the sub an empty prototype, which alters its grammatical role such that the ambiguous characters will be interpreted as infix operators: $ perl -lwe 'sub FOO () { return 42; } if (FOO < 43) { print "a"; } print FOO + 1' a 43 $ perl -lwe 'sub FOO (); if (FOO < 43) { print "a"; } print FOO + 1; sub FOO () { return 42; }' a 43 -zeframThread Previous | Thread Next