i surprised when
sub f{1}; $answer = 1-f(1); gave me syntax error in perl when expecting perform subtraction. adding space made work okay again:
sub f{1}; $answer = 1- f(1); why cause syntax error in perl? there ambiguity? dash interpreted part of function name?
-f tests whether file plain file, not make sense perl not see - sign. why works expect, there no -fo test.
sub fo{1} $answer = 1-fo(1); (nor there +f test)
sub f{1} $answer = 1+f(1);
Comments
Post a Comment