Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^4: "Safe" print?

by dd-b (Monk)
on May 14, 2013 at 19:17 UTC ( #1033535=note: print w/replies, xml ) Need Help??


in reply to Re^3: "Safe" print?
in thread "Safe" print?

And that's right where I am (CENTOS 6 packaged Perl).

I know and heartily approve the "//" operator (except when I somehow get confused and use backslashes), but don't want to have to write special code each time I print something that I can't prove is defined quickly. However, the Dumper suggestion (and related) is useful, I'm just embarrassed I didn't think of it myself (that's for complex structures! In debugging!).

Replies are listed 'Best First'.
Re^5: "Safe" print?
by ambrus (Abbot) on May 14, 2013 at 21:13 UTC
    don't want to have to write special code each time I print something

    Then write a subroutine and call that every time.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033535]
help
Chatterbox?
[Corion]: Cosmic37: Basically, you read one file into a hash, keyed by your key, and then match the lines from the second file to that hash
[Cosmic37]: note that the two files only have datetimes which may match whereas other data per line is different format in file1 and file2 - is that really intersection?
[jedikaiti]: Hi Monks
[Corion]: Cosmic37: Well, if you want to use only parts of a line for the key, see split or whatever other mechanism to extract the key from the line
[Corion]: Hi jedikaiti!
[Cosmic37]: is there a webpage for full CB for this chat rather than side panel chat?
[Cosmic37]: thank you for advice
[Cosmic37]: peach greets jedi
[Cosmic37]: ok this one works better fullpage chat
[Cosmic37]: test

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2017-06-29 16:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (672 votes). Check out past polls.