Truncate a file: Difference between revisions

Content added Content deleted
m (added whitespace before the TOC (table of contents), added other whitespace to the task's preamble.)
m (→‎{{header|Perl 6}}: use native type)
Line 730: Line 730:
truncate("file", 567);</lang>
truncate("file", 567);</lang>
=={{header|Perl 6}}==
=={{header|Perl 6}}==
{{works with|Rakudo Star|2013-02}}
{{Works with|rakudo|2016.07}}
<lang perl6>use NativeCall;
<lang perl6>use NativeCall;


sub truncate(Str, Int --> int) is native {*}
sub truncate(Str, int32 --> int32) is native {*}


sub MAIN (Str $file, Int $to) {
sub MAIN (Str $file, Int $to) {