CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
string manipulation


New User

Jul 20, 2011, 5:32 AM

Post #1 of 2 (16737 views)
string manipulation Can't Post

Greetings - new here. I'm not new to Perl, but only experienced enough to be considered a beginner. Anyhow, I need to manipulate a date string but I haven't been able to figure it out after multiple attempts. I want to be able to print the date starting with a "V", followed by the year, the month in a two-digit format, and the day in a two-digit format; like VYYYYMMDD. Example would be (for today's date) V20110720.

Veteran / Moderator

Jul 20, 2011, 6:15 AM

Post #2 of 2 (16734 views)
Re: [1cor29] string manipulation [In reply to] Can't Post

use POSIX 'strftime'; 

my $datestamp = strftime('V%Y%m%d', localtime);
print $datestamp;


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives