The difference is that his if-else actually does something to the data while your if-else is practically a no-op (i.e. it does nothing except testing the values)
Are you sure that what you see as 'N/A' on the screen is not really "N/A\n" or ' N/A '? Also you test $h[$i], but print $h[1].
In reply to Re^3: N/A replacement not working
by jethro
in thread N/A replacement not working
by baperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |