It seems that
-r came from the
shell scripting languages. Namely
bash and
sh. Most of the
file testing operators are commong across both perl and bash. Little snippet of code as an example:
#!/bin/bash
echo Checking ${1} permissions...
if [ -r ${1} ] then
echo File is readable
else
echo File is not readable
fi
#!/usr/bin/perl
print "Checking $ARGV[0] ...\n";
if (-r $ARGV[0])
{
print "File is readable\n";
}
else
{
print "File is not readable\n";
}