truncate just sets the filesize of the file opened by handle to whatever you specify; you can use it to remove characters from file as well as increase the filesize.open FILEHANDLE, " +< filename" or die "Unable to open: $! \n"; truncate FILEHANDLE, $desired_length or print "Unable to truncate: $ +! \n";
In reply to Re: How do I pre-extend a file to a specified size
by abhishek_akj
in thread How do I pre-extend a file to a specified size
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |