Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Inserting Current time and date into an HTML file.

by balajinagaraju (Sexton)
on Nov 23, 2012 at 06:20 UTC ( #1005215=perlquestion: print w/ replies, xml ) Need Help??
balajinagaraju has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have a task to perform and i am seeking some advice, we are building a java source using an ant script and it generates the javadoc for the complete source.Now we want to insert the build date and time inside the html files of the javadoc and we want to use perl script and insert the date and time into html files. Is there a better way to do this? or how exactly i can accomplish this task. Please guide.

Comment on Inserting Current time and date into an HTML file.
Re: Inserting Current time and date into an HTML file.
by Anonymous Monk on Nov 23, 2012 at 06:49 UTC
    Seriously?

    perl -CSDL -MARGV::readonly -pi.orig -e "use constant JID => scalar gmtime; s{\Q<!--junkid-->\E}{JID()}ge; " bunch of files to stamp

      Hi , Thanks for your response, can you please elaborate on what exactly the code is doing?.

        Hi , Thanks for your response, can you please elaborate on what exactly the code is doing?.

        What do you think it is doing?

        I think the code does nothing. It similar to this code which might do something Write to existing file with character insert

Re: Inserting Current time and date into an HTML file.
by roboticus (Canon) on Nov 23, 2012 at 15:05 UTC

    balajinagaraju:

    As much as I like perl, why insert yet another tool into the mix? Is something wrong with doing it in ant?

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

      As much as I like perl, why insert yet another tool into the mix?

      Because he's fishing for answers, doesn't care how it happens

        Dear Anonymous Monk , I consider this as a great forum for learning, and i am here to learn things as i am new to things. I don't want to fish for answers instead i want to know how things are done. Please if you can't guide anyone , don't discourage them. I appreciate your valuable time put in to provide your comments.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2014-09-22 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (189 votes), past polls