Note: The archives category content is an automatically generated focus channel and does not neccessarily reflect the opinions of this blog. No responsibility is taken for the external links presented here, follow at your own discretion.
The archives content is never scraped from sites - but an abstract obtained from search engines.
| Problem |
Solution |
Example |
Reference |
Recommended |
Split can also be used to generate a hash, from a string. In this instance split looks at two things, the key to value separator (in this case an equals sign) and the comma to separate groups.
|
|
| Problem |
Solution |
Example |
Reference |
Recommended |
$str="mouse=one,cat=two,dog=three"; %ash=split /,|=/, $str; while(($k,$v)=each(%ash)) { print $k."=>".$v."\n"; } Produces: cat=>two dog=>three mouse=>one
|
Leave a Reply