...$ticTblCnts[$tableIndex] = [ TicketTable ($combin, \@tic_vars) ] ;
$tableIndex++;
}
}
}
I am dereferencing this way:
my @ticTblDeref = ();
foreach (@ticTblCnts) {
push (@ticTblDeref,@$_);
}
????????
Nick
I got a Biz Degree! How the h*ll did I get here?
Yup, that was it Paul. I tried to get cute and initialize all my counters in the same line. Sometimes we should leave well enough alone.
my $changes = 0;
my $power = 0;
my $telco = 0;
my $application = 0;
my $server = 0;
my $other = 0;
I got a Biz Degree! How the h*ll did I get here?
...);
print (OUT "application,$application\n" );
print (OUT "other,$other\n\n" );
Here's the output I am getting:
problemType chart:
type, number
changes,635
server,
power,119
telco,334
application,
other,484
Any help is appriciated.
Nick
I got a Biz Degree! How the h*ll did I get here?
Ok Paul...how about this one:
my $date = "03-20-2005";
my ($month,$day,$year) = split (/-/, $date);
Is $month an integer or string?
I got a Biz Degree! How the h*ll did I get here?
Hello all,
How can I tell for sure if the variable I am operating on is a string or an integer?
Can't 01 also be a string "01"??
Thanks
I got a Biz Degree! How the h*ll did I get here?
IC!
@{$h{$k}}{@types} = map {defined($_)? $_: 0} @{$h{$k}}{@types};
"if" defined($_) ? "then" map $_ to our array
"else" map a 0.
nice.
Nick
I got a Biz Degree! How the h*ll did I get here?
...array. Here there needs to be something in the default loop variable.
but this part I don't get:
? $_: 0 [3eyes] #HUH?????
and the last part:
@{$h{$k}}{@types}
just reading in the same array we are writtig to, effectively filtering it.
Nick
I got a Biz Degree! How the h*ll did I get...
...normal
network, 323, 20, 0
switch, 70, 1, 3
As far as the $cri variable. That is short for "criticality" which is really what the variable represents. Bottom line, this program is over 1000 lines now and I am running low on variable names.
Nick
I got a Biz Degree! How the h*ll did I get...
...I just cut and pasted the applicable code. The braces are in my real code.
Sorry for the confusion.
BTW..this is the last big hurdle I have to get over to complete this 4 month project and then we can ALL forget about ticket charts!
[thumbsup2]
I got a Biz Degree! How the h*ll did I get here?
...Types and counts
devTypes, critical, warning, normal
network, 323, 20, 0
switch, 70, 1, 3
I would still like to know what the:
@{$h{$k}}{@types} = map {defined($_)? $_: 0} @{$h{$k}}{@types};
is doing. I will look up the map command.
NIck
I got a Biz Degree! How the h*ll did I get here?
...device table. Hence my problem, I only want to generate 1 record, either find a match from the @device $log_name with the $logical_name from the @problem loop and assign the real value from the @device list or "else" assign defaults.
Thanks,
Nick
I got a Biz Degree! How the h*ll did I get...
...found, populate the %merge hash with the real values, if not found, assign defaults to all variables.
The way my loop is working, it only gets to the first entry in @device as the "last" command is always encountered.
Thanks,
Nick
I got a Biz Degree! How the h*ll did I get...
...= map {defined($_)? $_: 0} @{$h{$k}}{@types};
print LOG join(", ", ($k, @{$h{$k}}{@types})), "\n";
}
I am getting:
Problem Types and counts
devTypes, critical, warning, normal
critical, 0, 0, 0
normal, 0, 0, 0
warning, 0, 0, 0
Nick
I got a Biz Degree! How the h*ll did I get here?
...@{$h{$k}}{@types} = map {defined($_)? $_: 0} @{$h{$k}}{@types};
print LOG join(", ", ($k, @{$h{$k}}{@types})), "\n";
}
ouput:
Problem Types and counts
devType, critical, warning, normal
network,323,20,
router,70,1,3
Thanks,
Nick
I got a Biz Degree! How the h*ll did I get here?
Thanks Kevin and Mike. I already used Kevin's code in my script and I DO need to:
How can I do that using Kevin's code?
Thanks,
Nick
I got a Biz Degree! How the h*ll did I get here?
...(I threw some routers in the array above):
Problem Types and counts
server,critical 310960
pc,critical 2535
I was getting ready to create another foreach loop for the normal and warning tickets, and thought there may be a better way.
Thanks
I got a Biz Degree! How the h*ll did I get here?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.