http://www.perlmonks.org?node_id=947206


in reply to Storing a Hash Made of Two Arrays in Another Hash

if ($line =~ m/^\D/){
That matches every line of the input you have shown. The elsif clause is never entered. Therefore, we can not reproduce your results with your input data and code. See http://sscce.org.

Replies are listed 'Best First'.
Re^2: Storing a Hash Made of Two Arrays in Another Hash
by BJ_Covert_Action (Beadle) on Jan 10, 2012 at 18:07 UTC

    Yeah, the sample input I was giving was just a template. Here, try this:

    Heading1 Heading2 Heading3 100 200 300 400 500 600

    You're still going to have to replace those spaces with tab characters to make the parsing work on that though.