Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Multiline Hash - how to get rid of formatting?

by Anonymous Monk
on Apr 30, 2012 at 08:37 UTC ( #968024=note: print w/ replies, xml ) Need Help??


in reply to Re: Multiline Hash - how to get rid of formatting?
in thread Multiline Hash - how to get rid of formatting?

If you want a newline you must use \n as in your second example,

Could have fooled me, see Re: Multiline Hash - how to get rid of formatting?


Comment on Re^2: Multiline Hash - how to get rid of formatting?
Re^3: Multiline Hash - how to get rid of formatting?
by tospo (Hermit) on Apr 30, 2012 at 09:26 UTC
    hmmm, I must admit that I learned something today: after many years of working with Perl I never knew that newlines from your source code are preserved in double-qouted strings but it seems they really are.
    OK, forget the bit about HAVING to put the \n in your strings although I would still advice to do that if you want nelines because it is a nightmare having to figure out how where the spaces end and where there is an actual newline when editing your code.
    However, the main point of my reply remains valid: don't try to stuff formatting into your data structure unless you really have to. Format the data as and when you need to print it and store it as pure data. I also think that it is true that the OP hasn't got the right data structure yet to present his data.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (12)
As of 2014-07-28 14:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (200 votes), past polls