I am having the below lines of perl cgi code that suppose to iterate through a file lines and print each line. The issue is what is printed to the stdout for a specific line (in[ 41: ]) is not the same in the file.
Note : This is a perl cgi script.
code :
for (param('menu')) {
/^(1)$/ and do {
$Sample="cat /tmp/int_rej_sample.txt";
@Sample=`$Sample`;
foreach (@Sample) {print $_,p}
}
}
cat /tmp/int_rej_sample.txt is :
in[ 37: ]<22222222222>
in[ 39: ]<91>
in[ 39: ]<91>
in[ 41: ]<BBBBBBBB44444444>
in[ 42: ]<9999999999 >
output to cgi window is :
in[ 37: ]<22222222222>
in[ 39: ]<91>
in[ 39: ]<91>
in[ 41: ]
in[ 42: ]<9999999999 >