in reply to Re: OT: if loop (was Re: perl grep with regex)
in thread perl grep with regex
You really should consider keeping your code properly formatted for maximum readability. Tools like PerlTidy can help you:
foreach $strfile (@arr1) { @arr3 = split(/[.\n]/, $strfile); if (grep (/^@arr3[1]$/, @arr2)) { print "Entered in IF"; } else { print "Entered in ELSE"; } }
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|