Skip to content

Instantly share code, notes, and snippets.

@ovntatar
Last active December 17, 2015 01:59
Show Gist options
  • Save ovntatar/5532122 to your computer and use it in GitHub Desktop.
Save ovntatar/5532122 to your computer and use it in GitHub Desktop.
Hash as subroutine argument!
#!/usr/bin/env perl
sub getArguments { ref( $_[0] ) ? shift() : ( @_ % 2 ) ? {} : {@_}; };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment