Uri Guttman wrote:
> 
> not the best. would that be confused with a sub readable and a leading
> unary negation? in fact how does perl parse -r now vs - r()?

Yes it would, here's how Perl parses these right now:

perl -w -e '
  sub r { local $\; print "&r(@_) : "; }
  $\ = "\n";
  print "-r" if -r "/etc/motd";
  print "-r()" if -r("/etc/motd");
  print "- r" if - r "/etc/motd";
  print "- r()" if - r("/etc/motd");
'

Prints out:

  -r
  -r()
  &r(/etc/motd) : - r
  &r(/etc/motd) : - r()

Basically, the -r filetest always wins. Injecting a space makes the &r
sub always win, as would be expected.

-Nate

Reply via email to