Skip to content

Dipin Krishna

I love to code. If you feel the same, then i have some cool codes for you. They are simple but good to get started.

  • Home
  • Blog
  • Privacy Policy
  • About
  • Contact
  • Home
  • Blog
  • Privacy Policy
  • About
  • Contact

Tag Archives: print

Home/Posts Tagged: print
perl

Perl: Function to print a HASH completely

Dec 15, 2010Dipin KrishnaPERLcompletely, hash, perl, print

Below is a perl function that i wrote to print a HASH completely. What i mean by ‘completely’ is that it will expand all hashes and arrays found within the given HASH. sub print_hash { my ($hash,$str) = @_; while( my ($k, $v) = each %{$hash}) { print $str."$k => $v\n"; if( $v =~ /hash/i

Read More

Search

Theme by Think Up Themes Ltd. Powered by WordPress.