traverse a hash


/ Published in: Perl
Save to your folder(s)



Copy this code and paste it in your HTML
  1. sub make_dirs {
  2. my ($href, $path) = @_;
  3. foreach (keys %$href) {
  4. make_dirs($href->{$_}, "$path$_/");
  5. }
  6. print $path;
  7. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.