in reply to How to keep the order of keys in hash

To keep the order of file names from the command line in your table creation, you would need to replace sort keys %hash with @_.

Chris

Replies are listed 'Best First'.
Re^2: How to keep the order of keys in hash
by thanos1983 (Parson) on Jul 09, 2014 at 19:44 UTC

    Hello Christoforo,

    Once more, you are absolutely right. If you do not mind can you point me out to the correct direction to understand what is the array that is loaded at @_. Because it dose not make sense to me at least so far why the sort keys %hash was not working correctly.

    Never the less thank you again your time and effort.

    Seeking for Perl wisdom...on the process...not there...yet!
      @_ is initialized when you call the function with the parameter @ARGV.

      Instead of using @_, you could use @ARGV if you wanted to.

        Hmmm it makes absolute sense thinking about it. By initializing the foreach function at the beginning and passing the ARGV arguments to it it contains in the correct sequence the keys. I did not even think about it for a second.

        Thanks again for your assistance.

        Seeking for Perl wisdom...on the process...not there...yet!