On Mon, 25 Sep 2000, Nathan Wiger wrote:
> > I'd even go so far as to say that the current -X syntax should be
> > _extended_, to allow for multiple tests at once, maybe by way of a
> > leading caret (mnemonic "all"):
> >
> > -^rwx; # $_ is readable, writable and executable
> >
> > ($size, $mod, $acc, $ichange) = -^sMAC;
>
> In fact, you wouldn't even need a caret, since all file tests are a
> single letter. Just like grouping s/// flags, we should make file tests
> groupable as well:
>
> if ( -drwx /usr/local and ! -h /usr/local ) {
> # directory exists and has correct perms
> }
The use of a caret was to prevent decimation of the user's namespace,
vis:
perl -e 'print -rwx $_'
Can't call method "rwx" on an undefined value at -e line 1.
-vs-
perl -e 'print -^rwx $_'
syntax error at -e line 1, near "-^"
Execution of -e aborted due to compilation errors.
John.