Y
Hacker News
new
|
ask
|
show
|
jobs
by
spider-mario
37 days ago
Same in Perl, hence the good old pattern:
open my $fh, '<', 'input.txt' or die;
1 comments
codesnik
37 days ago
yes, ruby inherited this from perl, though 'or' has lower precedence than 'and' in perl, and they're equal in ruby. Which sounds like something going to cause mistakes, but I yet to see 'and' and 'or' together in the same expression in ruby.
link