If you just open the file in write mode and then close it, that should do what you want.
open(my $handle, ">", $filename); close($handle)
From perlfunc:
If MODE is ’>’, the file is truncated and opened for output, being created if necessary.-Pileofrogs
In reply to Re: Cleaning file
by pileofrogs
in thread Cleaning file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |