Run through Perl::Tidy and given <code> tags:
foreach $file (@cad_err_list) {
chomp($file);
$err_loan_id1 = `grep 'DataDictionary' $file`;
@err_loan_id2 = split( /<pciOFACViolation>/, $err_loan_id1 );
$reqd_1 = $err_loan_id2[0];
@err_loan_id3 = split( /\s/, $reqd_1 );
$reqd_2 = $err_loan_id32;
@err_loan_id = split( />/, $reqd_2 );
}
If that's actually your code, I don't really see how it relates to your question. There isn't a push anywhere in here. There isn't anywhere that you're "adding" to an array. All your array operations are assignments, so naturally they're not appended.
Usually to add to an array, we use push. In rare circumstances, unshift or splice.
What do you expect this to do that it's not doing? Did you Use strict and warnings?