> ... The documentation for truncate() explicitly states ...
I see: truncate() can work on files directly, without an open(); just
like stat(), the -X functions, and chdir() do; whereas many other
functions would use an EXPR to find the name of the "real" filehandle.
Confusing.
Seems I got confus
On Sat, Mar 03, 2007 at 07:58:53PM +1100, Paul Szabo wrote:
> Package: perl
> Version: 5.8.4-8sarge5
> Severity: normal
>
> The truncate() function does not use filehandle correctly in some cases.
> Correct behaviour (reads and truncates FILE):
>
> $ echo abc >FILE; echo xyz >HAND; ls -l; perl -e
Package: perl
Version: 5.8.4-8sarge5
Severity: normal
The truncate() function does not use filehandle correctly in some cases.
Correct behaviour (reads and truncates FILE):
$ echo abc >FILE; echo xyz >HAND; ls -l; perl -e 'open $FH,"+; print "$FH: $x"; $x=truncate($FH,2); print "$x $!\n"'; ls -l
3 matches
Mail list logo