G
GGarramuno
Is there anything in Ruby similar to Perl's if -r, -x, etc. switches?
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?
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?