Advertisement
Guest User

Untitled

a guest
May 28th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. use strict;
  2.  
  3. my @a=qw( 1.0.1 );#1.0.0 2.3.0 0.2 2.3);
  4. my %hash=();
  5. my $x={};
  6. foreach my $str(@a){
  7. my @split=split(/\./,$str);
  8. $x = \%hash; $x = $x->{$_} for @split;
  9. print Dumper($x);
  10.  
  11. }
  12. ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement