note
Albannach
While [philcrow] undoubtedly has the [id://602531|right approach] to this problem, I'm surprised nobody has mentioned Perl's own [perldoc://truncate] function, which works just fine in Win32 and is neater than the [perldoc://open] solutions.
<p>
<b>Update:</b> there is no need to [perldoc://open] the file, as truncate will operate on the file <i>name</i>, e.g. <code>truncate 'myfile.log', 0;</code> will set the length of the file to zero, but you can use any desired length in that place.
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-33341">
<p>--<br>
I'd like to be able to assign to an luser
</div></div>
602529
602529