|Keep It Simple, Stupid|
Re: How do I remove newline character from a number got from unix commandby marinersk (Curate)
|on Sep 04, 2013 at 12:14 UTC||Need Help??|
Updated: (Added notes, original solution the same)
Updated: (Expanded solution due to peer pressure) :-)
Don't have a Linux system up but presume chomp would do it:
I see choroba was faster on the post than I was, and also gave a more complete answer.
Okay, fine, I'll give in. Everyone is mentioning localtime, but my old eyes don't see the commensurate adjustment warning:
With some further explanations of my TLAs:
Some additional thoughts:
The original question was specifically about the newline on the OS response, so that's what my post covered. It was irresponsible of me to not mention, as so many other Monks have, the particular function you appeared to be attempting to perform was available via both native and module functionality.
But the other Monks did cover that, rather thoroughly. I love Perlmonks. :-)