my $Str = "AAAA001BBBB001CCCC000DDDD023EEEE012"; my %H; while($Str) { my $s = substr($Str, 0, 4, ''); my $i = substr($Str, 0, 3, ''); %H{$s} = $i; } [download]
Output: AAAA -> 001 BBBB -> 001 CCCC -> 000 DDDD -> 023 EEEE -> 012 [download]
www.com | www.net | www.org
5.003 (Camel Book 2nd Edition) 5.6 (Camel Book 3rd Edition) 5.8 (stable version for >5 years) 5.10 (many new features now in common use) 5.16 (Camel Book 4th Edition) 5.18 (hash overhaul) 5.26 (no "." in @INC) 5.36 (subroutine signatures) Dynamic (no standard; code dictates VERSION) Other (discuss in comments)
Results (37 votes). Check out past polls.