in reply to Using split, splice, and join to remove time from scalar context return of localtime()

You're forgetting that POSIX has a strftime routine that can generate the desired format directly rather than mushing up a string.

The cake is a lie.
The cake is a lie.
The cake is a lie.

  • Comment on Re: Using split, splice, and join to remove time from scalar context return of localtime()
  • Download Code

Replies are listed 'Best First'.
Re^2: Using split, splice, and join to remove time from scalar context return of localtime()
by jffry (Hermit) on Dec 17, 2009 at 22:09 UTC

    Got it. Thanks!

    use POSIX qw (strftime); $now = strftime('%a %b %e %Y', localtime);