Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
It is a string of 5 cloumn names, and I want to shorten them to the following:"(PDH-TSV 4.0) (Eastern Daylight Time"(240)" "\\PLAGUE\Memory\Pages/sec" "\\PLAGUE\Network Interface(3Com EtherLink PCI)\Bytes Total/sec" "\\PLAGUE\PhysicalDisk(_Total)\Disk Transfers/sec" "\\PLAGUE\Processor(_Total)\% Processor Time"
My idea was to split them on \t push them onto an array, and format each element with the following code:Date/Time Memory\Pages/sec Bytes Total/sec Disk Transfers/sec % Processor Time
I'm stuck on the remaining 4 elements of the array any suggestions? Thanks#!C:\Perl\bin\Perl -w open (LOG, "$Perf_rev") || die "Error: Couldn't open $Perf_rev : $!\n"; # don't include Header (No numerical data) my $header = <LOG>; @header = split(/\t/, $header); $header[1] =~ s/^\".*\"$/Date\/Time/; print $header[1];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: REGEXP Help
by arunhorne (Pilgrim) on Jun 24, 2002 at 13:24 UTC | |
|
Re: REGEXP Help
by bronto (Priest) on Jun 24, 2002 at 13:39 UTC | |
|
Re: REGEXP Help
by particle (Vicar) on Jun 24, 2002 at 13:37 UTC |