Hacker News new | past | comments | ask | show | jobs | submit login

Nothing is wrong with that. However the actual Perl open() would be like this...

  open my $fh, '<', 'file.txt'  or die "file.txt not found";

  open(my $fh, '<', 'file.txt') || die 'file.txt not found';
Above two lines are equivalent.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: