Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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

by editholla (Initiate)
on Jan 06, 2016 at 17:17 UTC ( [id://1152095]=note: print w/replies, xml ) Need Help??


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. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1152095]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-25 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found