K
king
I have a script as below.
"
#!/c/perl/bin
system("typeperf \"\\Processor\(\*\)\\% C1 Time\" -sc 1 > C1.txt");
system("typeperf \"\\Processor\(\*\)\\% C2 Time\" -sc 1 > C2.txt");
system("typeperf \"\\Processor\(\*\)\\% C3 Time\" -sc 1 > C3.txt");
sleep 1;
#open(C1,"C1.txt");
#$C1_ARR=<C1>;
#close(C1);
open C1, "<C1.txt";
$C1_CONTENT = do { local $/; <C1> };
print "$C1_CONTENT\n";"
Now in the $C1_CONTENT the content is as below.
""(PDH-CSV 4.0)","\\Test_PC\Processor(0)\% C1 Time","\\HACHARYX-MOBL
\Processor(1)\% C1 Time","\\HACHARYX-MOBL\Processor(_Total)\% C1 Time"
"09/03/2010 09:58:36.052","9.797092","11.412473","10.604782"
Exiting, please wait...
The command completed successfully."
I am trying to find a regex so that I can extract the exact three
values from the scalar and put in different variables and do some
operation. I want to keep finding values repeatably and values varies
but will be in same format. In this case the values are:
"9.797092","11.412473","10.604782"
Can anybody help in this.
"
#!/c/perl/bin
system("typeperf \"\\Processor\(\*\)\\% C1 Time\" -sc 1 > C1.txt");
system("typeperf \"\\Processor\(\*\)\\% C2 Time\" -sc 1 > C2.txt");
system("typeperf \"\\Processor\(\*\)\\% C3 Time\" -sc 1 > C3.txt");
sleep 1;
#open(C1,"C1.txt");
#$C1_ARR=<C1>;
#close(C1);
open C1, "<C1.txt";
$C1_CONTENT = do { local $/; <C1> };
print "$C1_CONTENT\n";"
Now in the $C1_CONTENT the content is as below.
""(PDH-CSV 4.0)","\\Test_PC\Processor(0)\% C1 Time","\\HACHARYX-MOBL
\Processor(1)\% C1 Time","\\HACHARYX-MOBL\Processor(_Total)\% C1 Time"
"09/03/2010 09:58:36.052","9.797092","11.412473","10.604782"
Exiting, please wait...
The command completed successfully."
I am trying to find a regex so that I can extract the exact three
values from the scalar and put in different variables and do some
operation. I want to keep finding values repeatably and values varies
but will be in same format. In this case the values are:
"9.797092","11.412473","10.604782"
Can anybody help in this.