Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^8: chop vs chomp

by Moron (Curate)
on May 11, 2007 at 17:09 UTC ( #614968=note: print w/replies, xml ) Need Help??


in reply to Re^7: chop vs chomp
in thread chop vs chomp

Your example looks fine. But you see if chomp had never come along, people wouldn't be having to focus so lopsidedly on this issue at all - they'd be taking a balanced view of data quality and would not dream of doing this - this is another of my objections - it's the tail of the input line wagging the dog!!
__________________________________________________________________________________

^M Free your mind!

Replies are listed 'Best First'.
Re^9: chop vs chomp
by eric256 (Parson) on May 11, 2007 at 17:42 UTC

    So....the fault is mine? None of my data files have a trailing new line, and I wouldn't dream of assuming that a newline meant a complete record even if they did. You on the other hand always have a trailing newline and assume it is significant? If my data never (and I do mean never) has a trailing newline then I should be fixing all those horrible tools that are providing me incomplete data. (/me heads off to slap newlines on all his csv files and apologize.). Sorry I didn't realize that soo many of my tools are broken and you are absolutely correct, ALL FILES MUST END IN \n.

    You talk of lopsided focus and yet you don't seem to be able to see that not everyone deals (or wants to deal with, or even should have to deal with) files that have a trailing newline. I've conceded many times now that in some cases you might in fact be right, it is only your blanket (lopsided) claim that chomp is ALWAYS bad that I take issue with. Ah well, it is done, you are of your opinion, and you showed me a use for chomps return value. Thank you for that, I can only hope that maybe you will see a little bit of the other side of the coin here and not right off programmers for using a specific tool when it fits their task (not your task).


    ___________
    Eric Hodges

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2018-11-13 04:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (149 votes). Check out past polls.

    Notices?