--_000_D225040F2D0F75448937B83D9527991A01231C7991denex1crick et_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
I am having problems generating output report from my below program. I want=
to include the header format indicated in the program as well. A new outpu=
t folder is being created but contains no data.
I am also getting the following warnings when I run the program (See far bo=
ttom). Any help is very appreciated!
#!/usr/bin/perl
use warnings;
use strict;
use FileHandle;
format DEVICE_REPORT =3D
[at] << [at] ||||||||||||||||||||| [at] ||||||||||||||||||||| [at] ||||||||||||||||||||| [at] |=
||||||||||||||||||||
my ($mkt, $mype, $cell, $sector, $rlptxat)
..
format DEVICE_REPORT_TOP =3D
[at] |||||||||||||||||||||||||||||||||||| Pg [at] <
"Smart Phone report", $%
Market Mobile Cell Sector Bytes
--------- -------- -------- -------- --------
..
# Market configurations has for cells
my %marketInfo =3D (
MCI =3D> { start =3D> 1,
end =3D> 299, },
STL =3D> { start =3D> 300,
end =3D> 599, },
ICT =3D> { start =3D> 800,
end =3D> 850, },
);
sub getMarket {
my $val =3D shift;
foreach my $k (keys %marketInfo) {
my ($start, $end) =3D [at] {$marketInfo{$k}}{qw/start end/};
return $k if $start <=3D $val and $val <=3D $end;
write(DEVICE_REPORT);
}
return "";
}
open(DEVICE_REPORT, ">Device.rpt");
while (<DATA>) {
chomp;
if (/;/) {
my [at] data =3D split /;/;
my $mkt =3D getMarket($data[31]);
my ($mtype,$cell,$sector,$rlptxat) =3D ($data[5],$data[31],$data[32],$=
data[44]);
# print "$mkt\t $mtype\t $cell\t $sector\t $rlptxat\n";
}
}
select(DEVICE_REPORT);
write(DEVICE_REPORT);
close(DEVICE_REPORT);
__DATA__
PACE | EVDOPCMD | 33.0 | 101218 | 07 |
8;1023240136;1218;0;1;00a000001a2bcdc7;0310003147702376;ac01 6d4a;;;5.6.128.=
8;0;;;;;43234169;43234349;;;10000;1;1;;0;;19;5.6.128.22;172. 30.151.5;304;3;=
304;3;;;;;15;175;15;175;15;175;1;1798;1251;0;0;2;19;20;;;;;1 ;1;1;0;128;5.6.=
128.8;;;;;;;301;5.6.128.8;;;8;304;3;;;;1;43244037;;;1;18;432 34169;0;;;;;;;;=
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1;;;;;;43234416; 0;0;304;3;21;19=
;175;15;405;1;1;1;1;0;125;1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;=
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;|;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;=
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;|
8;1023240137;1218;0;1;00a000001db74ace;;ac0174ca;43243423;16 78442111;5.6.12=
8.8;1;0;;43242544;43244207;43243423;43243647;;;1000;1;1;;0;; 19;5.6.128.26;;=
372;2;372;2;;43243012;0;43243562;15;175;15;175;15;175;1;;;;; 5;48;19;20;49;5=
0;;0;1;2;0;68;5.6.128.8;;;;;;;301;5.6.128.8;;;8;372;2;;;;1;4 3244207;;;1;18;=
43243423;0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;1;;;
Warnings I am getting:
Use of uninitialized value $mkt in formline at ./io.pl line 9, <DATA> line =
2.
Use of uninitialized value $mype in formline at ./io.pl line 9, <DATA> line=
2.
Use of uninitialized value $cell in formline at ./io.pl line 9, <DATA> line=
2.
Use of uninitialized value $sector in formline at ./io.pl line 9, <DATA> li=
ne 2.
Use of uninitialized value $rlptxat in formline at ./io.pl line 9, <DATA> l=
ine 2.
Chris Stinemetz
--_000_D225040F2D0F75448937B83D9527991A01231C7991denex1crick et_--
