Hi,
I have a Comma Separated Value , constant, I wish to create and array of each value which is a hash value pair.
I'm currently using the following code and it works fine, I just get a feeling there is a better way
cheers, 1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
I have a Comma Separated Value , constant, I wish to create and array of each value which is a hash value pair.
I'm currently using the following code and it works fine, I just get a feeling there is a better way
Code:
my @reg_type = split(/,/,REG_TYPE);
for(@reg_type){
$_ = {'Regulation' => $_};
}
cheers, 1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!