Another newbie question:
From an array, how do I generate a CSV? I use a foreach loop, but it will add an extra "," after the last number, as the example below:
my @array = (1,2,3,4,5);
foreach my $num (@array){
print $num = $num . ",";
}
output:1,2,3,4,5,
How should I approach this...
Keven,
Thank you for the advice.
I have decided that I will actually parse out the strings and save them in a database. I can do SQL to analize the log.
Allen
Thank you so much for the input. Adding one more level of complexity, if the input were the following:
06/19 16:14:47: ERROR: error type 1
06/20 17:25:48: ERROR: error type 1
06/20 18:56:52: ERROR: error type 2
06/21 04:00:15: ERROR: error type 1
06/22 00:03:02: ERROR: error type 1
06/22...
Hey guys,
Perl newbie here. I need some advice.
Here is the senario: I have a log file that looks like the following:
06/19 16:14:47: ERROR: error type 1
06/20 17:25:48: ERROR: error type 1
06/20 18:56:52: ERROR: error type 1
06/21 04:00:15: ERROR: error type 1
06/22 00:03:02: ERROR: error...
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.