The ($h[$i] eq 'N/A') ? 0 : $h[$i]; is working ok. The question is what do you want to do with this? As of now the result will be lost ... You need to save it into some var and act on it or print it.
Which one of the prints returns the N/A? If it's the first one $h[0] = ($h[$i] eq 'N/A') ? 0 : $h[$i]; otherwise $h[1] = ($h[$i] eq 'N/A') ? 0 : $h[$i];
In reply to Re^3: N/A replacement not working
by duyet
in thread N/A replacement not working
by baperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |