Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: One to one file output idiom

by Eily (Monsignor)
on Jan 16, 2020 at 09:20 UTC ( #11111473=note: print w/replies, xml ) Need Help??


in reply to Re: One to one file output idiom
in thread One to one file output idiom

Is it just me or are the method names of this module really not helfpul? I had to loop spew in the dictionary because I wasn't sure of the implication, I knew of "spewing nonsense" but I didn't realize the word had such a negative connotation to it. And somehow I would understand spew to be the reverse action (getting data out of a file, not in). And I got what sibling does because I knew what to expect. Beyond that I guess it is a pretty short and "clean" (except for the confusing names) way to do what I want.

Also, here your code works because each file contains its own name, but I think it should be path(shift), without the -n option

Replies are listed 'Best First'.
Re^3: One to one file output idiom
by soonix (Canon) on Jan 16, 2020 at 10:04 UTC
    Well, since "slurp" is reading a file in, it makes sense to use the opposite of "slurp" for writing. So, for me, "spew" looks completely intuitive ,-)

    you seem to see it from the view of the file. Hmmm, yes, from an OO view the opposite might make sense…

      Oh I guess you're right. Although slurp isn't so much more explicit IMHO, I'm just used to it because it's commonly used with perl, but I don't think I've ever seen it used for any other language.

      I'm not a native speaker, but for me to "spit" seems as a more natural opposite to "slurp".

      To "spew" in contrast also means to vomit.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

        As a native speaker, I can tell you that "spew" here is completely natural. It's not a synonym of "vomit" and does not carry the negative overtones of that word. It's also not the same as "spit", for the same reason, as well as implying a different (greater) volume of matter being ejected. :-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2020-06-07 07:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (42 votes). Check out past polls.

    Notices?