Hi List I would like to process a file which has the following structure.
SCGR SC DEV DEV1 NUMDEV DCP STATE REASON 1 0 31 1 SCGR SC DEV DEV1 NUMDEV DCP STATE REASON 2 0 31 1 SCGR SC DEV DEV1 NUMDEV DCP STATE REASON 3 0 31 1 SCGR SC DEV DEV1 NUMDEV DCP STATE REASON 4 0 31 1 Condition is if any field is empty (In this case DEV and DEV1) those has to be replaced by the keyword "NULL". When I am trying to split the line based on whitespace @elements = split(/\s+/,$line); in $element[2] entire blank space is coming upto NUMDEV1. so while printing I am not getting the proper output. How to resolve this problem? Best Regards Anirban.