Help for this page
perl -i.bak -pe 's/hello/goodbye/gi' file1 file2 ...
use Fcntl qw(:seek); ... truncate FOO, tell FOO; close FOO;