Hi, Im trying to have all numeric values from a sting and join them with pipe string is
EEH_ErrorCode=( 15, /* Component */ 65 /* Error */) and my output should be 15|65
while ($flag == 0 ){ if ($str =~ m/\)/ ) { $flag = 1; } else{ my @array=split(/' '/,$str); if(defined $array[0] ){ $array[0] =~ s/[^0-9]//g}else{$array[0] +=''}; if(defined $array[1] ){ $array[1] =~ s/[^0-9]//g}else{$array[1] +=''}; } }
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |