in reply to Re^2: How to get contents from an array inside a hash
in thread How to get contents from an array inside a hash

"...banging my head against the keyboard and praying..."

Stop praying and head banging; it doesn't help. Start to break it down into smaller pieces instead - at least four subs ;-)

A sketch in a hurry:

  1. get_options() # use GetOpt::Long
  2. create_hash()
  3. update_chars()
  4. format_layout()

..or so.

Update: I forgot to update, sorry.

Consider also to put your stuff in a module.

Please see perlmod, perlnewmod and Simple Module Tutorial how to accomplish this.

And it is a good idea to study some sources on cpan.

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»