Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: How do I remove newline character from a number got from unix command

by choroba (Abbot)
on Sep 04, 2013 at 12:13 UTC ( #1052311=note: print w/ replies, xml ) Need Help??


in reply to How do I remove newline character from a number got from unix command

As to why: because date appends it to its output.

As to how: chomp

Update: As to TIMTOWTDI and portability: localtime

1900 + (localtime)[5]
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: How do I remove newline character from a number got from unix command
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (17)
As of 2014-07-28 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (207 votes), past polls