in reply to Re: Empty a text file?in thread Empty a text file?
If you're using that second one under Linux (under bash on Linux at least) then you're wasting a call to echo. This will work just as well:
perl -e 'system q{>file.dat}' [download]