Your question is rather vague, and has absolutely nothing to do with hashes. I suspect you might be looking for this:
Otherwise, consider posting your question in Seekers of Perl Wisdom and provide a bit more detail.perl -pi.bak -e 'print "prepended\n" if $. == 1' file1 file2 ... filen
|
|---|