Actually talking un*x, if you open a file, do stuff and at
some point rewind it, i would not like the system to close
and reopen the descriptor for me; they are many reasons: many passes onthe same file, descriptor sharing with children...etc
I would expect the same behaviour for dir handles;
this means rewinding makes you look at the same structure
% perldoc -f rewinddir
Sets the current position to the beginning of the directory for the "readdir" routine on DIRHANDLE.
it does not say the handle is closed and then reopened...
actually a poor man's rewinddir will do just that...
from what you say it seems this time that it is perl on unix
that does it wrong (poorly)...this should be filed as a bug
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.