New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
open() call with a directory path #12713
Comments
From victor@vsespb.ruCreated by victor@vsespb.ruperl -e 'open(F, "</tmp") && -d "/tmp" && print "OK"' seems open can take directory name as argument and not throw any error. But I would suggest to document this behaviour, cause perl "open" POD open(my $fh, "<", "input.txt") which in fact won't catch error in case 'input.txt' is directory. Perl Info
|
From @jkeenanOn Sat Jan 19 01:32:09 2013, vsespb wrote:
Looks like the problem appears when you open for reading, but not for ##### |
The RT System itself - Status changed from 'new' to 'open' |
From victor@vsespb.ruyes, only for reading. another confusing thing that file size is > 0 and eof is true for just perl -e 'open(F, "</tmp") && -d "/tmp" && -s "/tmp" && eof F && print "OK"' prints OK I am sure this is intended behaviour.. but point is perl documentation On Sat Jan 19 16:30:41 2013, jkeenan wrote:
|
From @arcVictor Efimov <perlbug-followup@perl.org> wrote:
This is long-standing behaviour (and, by my reading, mandated by the I do take your point that, to people who don't know that, this -- |
From @arcVictor Efimov via RT <perlbug-followup@perl.org> wrote:
I think that's also the expected behaviour, when you're on a system Again, do you have a concrete suggestion for how to improve the -- |
From victor@vsespb.ruGood news, there is http://perldoc.perl.org/functions/open.html with
However, on top of the page I propose to add "Also, keep in mind that even if open returns success, that does not after the following lines:
On Mon Jan 21 06:10:00 2013, perl@aaroncrane.co.uk wrote:
|
Migrated from rt.perl.org#116453 (status was 'open')
Searchable as RT116453$
The text was updated successfully, but these errors were encountered: