File1 contents:line1-file1      1 line2-file1      2line3-file1      3 line4-file1      4 File2 contents:line1-file2     25  line2-file2     24  Pointer-file2   23  line4-file2     22 line5-file2     21After the execution of perl/shell script, File2 content should become:line1-file2     25  line2-file2     24 line1-file1      1 line2-file1      2line3-file1      3 line4-file1      4 Pointer-file2   23 line4-file2     22 line5-file2     21i.e  paste the contents of File1 in File2 before the line that contains Pointer.
How to insert the content of a file into another file before a pattern (marker)?
shell;text processing;sed;awk;perl
sed has a function for that, and can do the modification inline:sed -i -e '/Pointer/r file1' file2But this puts your Pointer line above the file1.  To put it below, delay line output:sed -n -i -e '/Pointer/r file1' -e 1x -e '2,${x;p}' -e '${x;p}' file2 