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

The sample layout file is at the top of the listing. I'll update and include some sample input data.

I'm currently coding without subroutines because I'm still learning. I know the code could be more elegant, and definitely more efficient, but I can't start by banging my head against the keyboard and praying it works. :)

Warnings is off because that's a shop standard for code that gets pushed to production. I simply hadn't included it when posting.

  • Comment on Re^2: How to get contents from an array inside a hash

Replies are listed 'Best First'.
Re^3: How to get contents from an array inside a hash
by karlgoethebier (Abbot) on Dec 05, 2014 at 21:46 UTC
    "...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»