I am using the split function to load an array,
some of the records will split in 2 others only once
if it splits in 2 I need to only keep the 2 record but if it splits once, I keep the 1st record. The problem that I ran into is when the second element [1] in the array is empty, I get an error, is there a way of me knowing the number of times the string was split? this way I only search for element 2 when it splits more than once....
code:
@splitarray = split (/ /,$tmpholder);
Error:
Use of uninitialized value in string ne at Adm4_System_Processes_Restart.pl line 99, <PROCFILE> line 100.
Any help would be greatly appreciated.....I am stuck
Veteq
some of the records will split in 2 others only once
if it splits in 2 I need to only keep the 2 record but if it splits once, I keep the 1st record. The problem that I ran into is when the second element [1] in the array is empty, I get an error, is there a way of me knowing the number of times the string was split? this way I only search for element 2 when it splits more than once....
code:
@splitarray = split (/ /,$tmpholder);
Error:
Use of uninitialized value in string ne at Adm4_System_Processes_Restart.pl line 99, <PROCFILE> line 100.
Any help would be greatly appreciated.....I am stuck
Veteq