perl -pi -e '$. == 1 and print $/' textfile