> Is there anything in Ruby similar to Perl's if -r, -x, etc. switches?

Time to read the PickAxe:

  www.ruby-doc.org

  http://www.amazon.com/exec/obidos/tg/detail/-/0201710897/

> These switches work with variables as if they were files and they are
> used in simple, silent and quick constructs like:
>       if -r $file {
>              print "$file is readable\n";
>       }
>
> Or am I forced to write all the code of File.new() and handle the
> rescue exceptions myself?

See the FileTest module (e.g. in 'ri')

Cheers,
Gavin