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.) |
SqrtNegInf (talk | contribs) 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|2016.07}} |
||
<lang perl6>use NativeCall; |
<lang perl6>use NativeCall; |
||
sub truncate(Str, |
sub truncate(Str, int32 --> int32) is native {*} |
||
sub MAIN (Str $file, Int $to) { |
sub MAIN (Str $file, Int $to) { |