473,499 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filter arry

Hello,

I have a logfile and I want to make statistics of it. I have my logfile put
i a array and ech ellement of the array is a virus detection. I want to
create a log in the follow format: month: XXX detectet virus: 999.

How can I solve this in PERL:

Logfile part which is a ellement in a array:

Wed Jan 28 15:22:33 2004
Sender: <jack@xx>
Recipient list: <sandra@yy>
MessageID: 10752997486
Virus: W32/Mydoom@MM
Action: Deleted and Quarantined
Partfile: doc.zip

My current script to put each virusevent in a ellement of a array:
open (logfile, "c:/temp/log-antivirus/log.log") or die "Fout!...:$!\n";
while (<logfile>)
{
$string .= $_;
}
@array = split(/\n{2,}/, $string); # opsplitsen logfile op lege regels
print $array[1]; #print one virusdetection
#print "\n\@array has " . ($#array + 1) . " elements.";
Jul 19 '05 #1
0 2249

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
12219
by: Robin Cull | last post by:
Imagine I have a dict looking something like this: myDict = {"key 1": , "key 2": , "key 3": , "key 4": } That is, a set of keys which have a variable length list of associated values after...
1
7829
by: Robert Neville | last post by:
I would like to add filter functionality to my database whether through the Main form or the subform. This question may be rudimentary, yet I have not less experience with filtering data outside...
0
6451
by: CSDunn | last post by:
Hello, I have a problem with field filtering between an Access 2000 Project form (the application is called CELDT), and the report that shows the results of the filter. Both the form and the...
3
6592
by: Richard | last post by:
Hi, I have a form based on a table. When I filter the form I want to run a report based on the same table with the same filter as the form. No problem until I want to filter a combo box where...
8
6510
by: dick | last post by:
I am just trying to print/report the results of a "filter by selection" which is done by right-clicking a form, filling in values, and "applying the filter." I have searched the newsgroups, and...
2
5016
by: Salad | last post by:
I have a log file with a list of records. The log file can be unfiltered or filtered. I have a command button to call a data entry form from the log. At first I was only going to present the...
2
2475
by: Mike Sweetman | last post by:
I have a form Form1 which when the Advanced Filter/Sort is used creates a form(maybe) with a title 'Form1Filter1 : Filter'. When I apply the filter to Form1 it is applied, but the value of...
6
5723
by: Gilles Nambert | last post by:
Hi, I come form VB and i'm used to Redim statement to modifiy the size of an arry dunamically, keeping his content, and i dont't find how to do this simple operation in C# ? Thanks and best...
5
3249
by: abfab | last post by:
Hello, I'm new to VB, and I realy don't get the arrays. I have to write a program that takes an arry of string as a parameter and adds "sir" to each string. I need to use "get upper bound." Can...
0
850
by: hermitking | last post by:
Hi I need a way to load a text file in to an arry the way i got it working is just gives me 1 leter of the word beacuse i have it pick a radom number to get the variable.
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7229
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5485
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4921
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3108
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
311
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.