NODE 32 0.00000 0.00000 -1.90000
NODE 33 0.00000 0.00000 -5.50000
NODE 34 0.00000 0.00000 -9.00000
NODE 35 0.00000 0.00000 -15.00000
NODE 36 0.00000 0.00000 -18.90000
NODE 37 0.00000 0.00000 -22.40000
NODE 38 0.00000 0.00000 -25.90000
NODE 39 0.00000 0.00000 -29.00000
NODE 40 0.00000 0.00000 -32.50000
NODE 41 0.00000 0.00000 -33.90000
NODE 42 0.00000 0.00000 -62.90000
BEAM 26 27 26 1 14 1
BEAM 27 28 27 1 13 1
BEAM 28 29 28 1 12 1
BEAM 29 30 29 1 11 1
BEAM 30 31 30 1 10 1
BEAM 31 32 31 1 9 1
BEAM 32 33 32 1 8 1
BEAM 33 34 33 1 7 1
BEAM 34 35 34 1 6 1
BEAM 35 36 35 1 5 1
BEAM 36 37 36 1 4 1
####
use Tie::File;
my @records;
tie @records, 'Tie::File', "pile_out.txt";
# file containing data
$in_file = "fake_vals.fem";
# specific line number in the output file. The data from the input
# file should be written at this line.
$seed_line = 10;
open(IN,"$in_file") or die("cannot open the log file for reading\n");
# NODE is the string to be matched with, in the data from the
# input file
while(){######to read the input file
$records[$seed_line] = "$_" if($_=~/\bNODE\b/i);
$seed_line++;
}
close(IN);
####
NODE 32 0.00000 0.00000 -1.90000
NODE 33 0.00000 0.00000 -5.50000
NODE 34 0.00000 0.00000 -9.00000
NODE 35 0.00000 0.00000 -15.00000
NODE 36 0.00000 0.00000 -18.90000
NODE 37 0.00000 0.00000 -22.40000
NODE 38 0.00000 0.00000 -25.90000
NODE 39 0.00000 0.00000 -29.00000
NODE 40 0.00000 0.00000 -32.50000
NODE 41 0.00000 0.00000 -33.90000
NODE 42 0.00000 0.00000 -62.90000
####
NODE 32 0.00000 0.00000 -1.90000
NODE 33 0.00000 0.00000 -5.50000
NODE 34 0.00000 0.00000 -9.00000
NODE 35 0.00000 0.00000 -15.00000
NODE 36 0.00000 0.00000 -18.90000
NODE 37 0.00000 0.00000 -22.40000
NODE 38 0.00000 0.00000 -25.90000
NODE 39 0.00000 0.00000 -29.00000
NODE 40 0.00000 0.00000 -32.50000
NODE 41 0.00000 0.00000 -33.90000
NODE 42 0.00000 0.00000 -62.90000