in reply to Re: Chomping Lines, Storing as Hash, and Printing "keys" from Hash
in thread Chomping Lines, Storing as Hash, and Printing "keys" from Hash

Corion,

My bad, Corion. I am in my second week of Perl (and mostly programming as a whole) and I am struggling. Let me try to explain in more detail.

**UPDATE**:

I figured it all out. Thank you, Corian. After you reminded me to step through my process, I ended up figuring out the solution on my own.

  • Comment on Re^2: Chomping Lines, Storing as Hash, and Printing "keys" from Hash

Replies are listed 'Best First'.
Re^3: Chomping Lines, Storing as Hash, and Printing "keys" from Hash
by poj (Abbot) on Jan 06, 2016 at 20:02 UTC

    Take a look at here-doc in Quote and Quote like Operators

    #!perl use strict; my %data = ( 11111=>1,22222=>2 ); open FILEPNP,'>','zzzzz.tmp' or die "$!"; for my $k (keys %data){ print FILEPNP <<EOF; <div> <a href="/$k.html">$k</a> </div> EOF }
    poj
Re^3: Chomping Lines, Storing as Hash, and Printing "keys" from Hash
by Laurent_R (Canon) on Jan 06, 2016 at 18:50 UTC
    After you reminded me to step through my process, I ended up figuring out the solution on my own.
    Very good, you've just learned something that will be very useful to you many many times, perhaps even during an entire life of a programmer. :)