in reply to How would I do an inplace edit, prepending '~foo' to every key of a hash? (was: How would I do an inplace edit, prepending)

Update: Disregard -- a follow-up "answer" to this question provided more detail.

Your question is rather vague, and has absolutely nothing to do with hashes. I suspect you might be looking for this:

perl -pi.bak -e 'print "prepended\n" if $. == 1' file1 file2 ... filen
Otherwise, consider posting your question in Seekers of Perl Wisdom and provide a bit more detail.