Re: date info

2008-08-06 Thread michael wang
On 8/6/08, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: > On Wed, 2008-08-06 at 08:00 -0500, michael wang wrote: > > Hi, > > > > if I have something like 20080503, how can I get the date a year ago, > > such as 20070503 in perl? > >

date info

2008-08-06 Thread michael wang
Hi, if I have something like 20080503, how can I get the date a year ago, such as 20070503 in perl? Thanks, michael

Re: Perl Audit Reports

2008-07-08 Thread michael wang
you may start with perl module File::Find to get all dir and files, and also look at perldoc -f stat to get file time and size informatiom. On 7/1/08, Kingmaker <[EMAIL PROTECTED]> wrote: > > I am new to perl . I need to write a perl script to generate an audit > report of a root directory and all

Re: How to measure the efficiency, load & performance of a script?

2008-05-20 Thread michael wang
look at perldoc -m Benchmark On 5/20/08, Richard Lee <[EMAIL PROTECTED]> wrote: > > timbo wrote: > >> Hi all, >> >> I was just wondering if any general tools / modules exist to help >> measure the efficiency of any code. >> I know that the Learning Perl books cover the theory but was wanting >> to

Re: Ragged Hierarchy

2007-12-20 Thread michael wang
On 12/20/07, banker123 <[EMAIL PROTECTED]> wrote: > > I have a text file with a ragged hierarchy as shown below, I would > like to structure the data in a different format (also shown below) > please help. Also the data below is just an example the actual data > file is much larger and the hierarc

Re: Calcualting Avg.

2007-12-07 Thread michael wang
Hi On 12/7/07, Mike Tran <[EMAIL PROTECTED]> wrote: > > Hi All, > > > > I'm not very familiar with Perl yet, so could someone help me with this > please? I have a file which has two columns one called Basenumber the > other Rating (Rating.txt), how do I loop through and get an average for > the Ra

Re: Splitting two numbers joined by a minus sign

2007-11-09 Thread michael wang
if the minus sign always there, then use s/// seems faster than split, like while(){ s/(\d)-/$1\t-/; print "$_"; } On 11/9/07, Paul Lalli <[EMAIL PROTECTED]> wrote: > > On Nov 9, 2:09 am, [EMAIL PROTECTED] (Rob Dixon) wrote: > > > > Why have you decided that the OP's solution doesn't p