2010-01-08 13:42:23 +08:00
|
|
|
# truncate a giving file, all contents of the file are be cleared
|
|
|
|
|
2017-12-27 22:10:17 +01:00
|
|
|
if (!$TRUNCATE_FILE)
|
2010-01-08 13:42:23 +08:00
|
|
|
{
|
2017-12-27 22:10:17 +01:00
|
|
|
die TRUNCATE_FILE is not set;
|
2010-01-08 13:42:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
perl;
|
2017-12-27 22:10:17 +01:00
|
|
|
open FILE, '>', $ENV{TRUNCATE_FILE} or die "open(>$ENV{TRUNCATE_FILE}): $!";
|
2010-01-08 13:42:23 +08:00
|
|
|
close FILE;
|
|
|
|
EOF
|