Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Sanity check: Tiny wrapper script for /bin/mail

by RichardK (Parson)
on Nov 29, 2013 at 15:30 UTC ( #1064973=note: print w/replies, xml ) Need Help??

in reply to Sanity check: Tiny wrapper script for /bin/mail

looks reasonable, but couldn't you just use exec on a one liner?

perl -e "exec('/bin/mail',@ARGV) if @ARGV";

Replies are listed 'Best First'.
Re^2: Sanity check: Tiny wrapper script for /bin/mail
by Corion (Pope) on Nov 29, 2013 at 15:33 UTC

    I thought the same, but the idea is to see if input is available on STDIN, not @ARGV :-).

      Doh! Well spotted -- I completely missed that, sorry for the noise.

        Not to worry, I tried quite a few... less thought out approaches myself. My wrapper script could ofcourse be golfed down to a completely unreadable oneliner but I decided to go for readability instead. My co-workers are creative bastards and would certainly come up with a way to get back at me. :-)

        -- FloydATC

        Time flies when you don't know what you're doing

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1064973]
[james28909]: so if you subtracting as you loop, be aware that you will eventually be subtracting into a past month, or year <.<
[james28909]: dontcha love it!
[james28909]: Today would be scalar localtime. Yesterday would be scalar localtime - 1. sunday - monday would variate scalar localtime - ?
[james28909]: oops s/sunday - monday/sunday - saturday/
[james28909]: my mind is blown haha
[james28909]: hmm, i haz idea!

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2017-04-29 03:57 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (531 votes). Check out past polls.