How do I approach this?
Posted on 2005-04-19
I am working on a small project (which will expand) in order to learn how to user Perl. I have prior software experience so I understand all of the usual methodologies but I do not understand how to make the most efficient use of Perl's powerful features. This is the beginning of this adventure. I hope you can help.
Here's the start:
I have a filename that looks like the following: Server01__NEWFIRST.2005.02.14.16.10.rpy
The date/timestamp in that name is as follows: yyyy.mm.dd.hh.mm
From that I want to create this:
Now how in the world do I perform this using the regular expressions? I have the Perl 5 by example book in softcopy and I have been reading through the regular expression stuff but I still do not understand how to apply as there are very few examples.
Any help in educating me is greatly appreciated. A solution is great, but I would like help in learning how the solution comes about.
Thanks in advance.