$ (echo "hoge"; cat hoge.txt) | perl -e 'print<>' > hoge.txt
$ cat hoge.txt 1 2 3 $ tac hoge.txt 3 2 1