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
- Re: RFC 290 (v1) Remove -X Jonathan Scott Duff
- Re: RFC 290 (v1) Remove -X Adam Turoff
- Re: RFC 290 (v1) Remove -X Jonathan Scott Duff
- Re: RFC 290 (v1) Remove -X Uri Guttman
- Re: RFC 290 (v1) Remove -X Adam Turoff
- Re: RFC 290 (v1) Remove -X Uri Guttman
- Re: RFC 290 (v1) Remove -X Adam Turoff
- Re: RFC 290 (v1) Remove -X Nathan Wiger
- Re: RFC 290 (v1) Remove -X John L. Allen
- Re: RFC 290 (v1) Remove -X Uri Guttman
- Re: RFC 290 (v1) Remove -X Nathan Wiger
- Re: RFC 290 (v1) Remove -X Uri Guttman
- Re: RFC 290 (v1) Remove -X Alan Gutierrez
- Re: RFC 290 (v1) Remove -X Ariel Scolnicov
- Re: RFC 290 (v1) Remove -X Bart Lateur
- Re: RFC 290 (v1) Remove -X Adam Turoff
- Re: RFC 290 (v1) Remove -X Dave Storrs
- Re: RFC 290 (v1) Remove -X Clayton Scott
- Re: RFC 290 (v1) Remove -X John L. Allen
- Re: RFC 290 (v1) Remove -X Nathan Wiger
- Re: RFC 290 (v1) Remove -X John L. Allen
