- 论坛徽章:
- 0
|
#!/usr/bin/perl
use strict;
use warnings;
use Spreadsheet::WriteExcel;
my $filename='1.xls';
my $workbook=Spreadsheet::WriteExcel->new($filename);
my $worksheet=$workbook->add_worksheet();
my @a;
while(<DATA>){
if(/^[a-zA-Z]/){
my @b=split /\s{2,}/;
push @a,[@b];
}
}
$worksheet->write_col('A1',\@a);
__DATA__
1. Total power consumption
==========================
Power(Watts)
Power contribution Static Dynamic Total
----- ------------ ------ ------- -----
Internal power
Internal register power 240uW 275nW 240uW
Internal latch power 2.46uW 50.8nW 2.51uW
Internal memory power 0W 0W 0W
Other internal power 188uW 451nW 189uW
Total internal power 431uW 776nW 431uW
Pad power 0W 0W 0W
Clock power 13.3uW 35.2uW 48.5uW
Inferred Buffer power 23.5uW 480pW 23.5uW
Total power 467uW 36uW 503uW
2. Total power per supply
=========================
|
|