in reply to Re^2: Perl fan being tempted with Python
in thread Perl fan being tempted with Python

The problem is not that it uses whitespace, it's that the amount of whitespace has semantic meaning.
It doesn't quite change the semantic meaning, but Perl thinks the programmer uses the amount of whitespace to have different semantic meaning:
$ perl -wcle 'print("foo")' # 0 spaces -e syntax OK $ perl -wcle 'print ("foo")' # 1 space print (...) interpreted as function at -e line 1. -e syntax OK $ perl -wcle 'print ("foo")' # 2 spaces -e syntax OK

Replies are listed 'Best First'.
Re^4: Perl fan being tempted with Python
by diotalevi (Canon) on Jun 20, 2005 at 15:15 UTC
    All three examples had the same meaning, you just got a spurious warning for the second usage.