Help for this page

Select Code to Download


  1. or download this
    my $req_len = shift || 100;
    
    ...
    seek FH, $req_len - 1,0;
    print FH 'X';
    close FH;
    
  2. or download this
    my $req_len = shift || 100;
    truncate 'test.txt', $req_len;