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

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

by choroba (Chancellor)
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]
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ