Re: run cmd, writing output to log file

2021-10-07 Thread hput
Ken Slater writes: [...] snip >> --- --- ---=--- --- --- >> At first glace, looks like $log was used instead of instead of $fh. >> Andy Bach writes: > What Ken said: > > while (<$ch>) { > print $fh "$Pad

Re: run cmd, writing output to log file

2021-10-05 Thread Andy Bach
t;> writing a perl script, an awful lot of useful info has flew right out >> of my pea brain. >> >> I was pretty sure I have written perl scripts that wrote to log files >> with out problems but the script below does not. Instead if throws >> this error: >> >>

Re: run cmd, writing output to log file

2021-10-05 Thread Ken Slater
On Tue, Oct 5, 2021 at 3:35 PM reader wrote: > Whenever I don't do scripting for longish periods, next time I start > writing a perl script, an awful lot of useful info has flew right out > of my pea brain. > > I was pretty sure I have written perl scripts that wrote to

run cmd, writing output to log file

2021-10-05 Thread reader
Whenever I don't do scripting for longish periods, next time I start writing a perl script, an awful lot of useful info has flew right out of my pea brain. I was pretty sure I have written perl scripts that wrote to log files with out problems but the script below does not. Instead if t

Re: Problem installing Log::Log4perl using Strawberry Perl on Windows

2013-11-25 Thread Shaji Kalidasan
o God. --- On Tuesday, 26 November 2013 3:47 AM, Matt McAdory wrote: I would hazard a guess that C:\Users\SHAJIK~1\.cpanm\work\1385391045 5000\build.log will hold the cookie crumbs you might be after. after that I might look at http://search.cpan.org/dis

Re: Problem installing Log::Log4perl using Strawberry Perl on Windows

2013-11-25 Thread Matt McAdory
I would hazard a guess that C:\Users\SHAJIK~1\.cpanm\work\1385391045 5000\build.log will hold the cookie crumbs you might be after. after that I might look at http://search.cpan.org/dist/Log-Log4perl/lib/Log/Log4perl/FAQ.pm#How_can_I_install_Log::Log4perl_on_Microsoft_Windows ? and then ask

Problem installing Log::Log4perl using Strawberry Perl on Windows

2013-11-25 Thread Shaji Kalidasan
Dear Perlers, I tried installing Log::Log4perl on Windows (Strawberry Perl Version 5.18.1) but I could not install using both 'cpan' and 'cpanm' but finally managed to install using --force. Is this a known problem? Here is the output message (from console). I am using Str

Re: Perl Script for parsing log files.

2013-05-08 Thread Shlomi Fish
@lines[ $_ - LIMIT .. $_ + > UPPERLIMIT ], $/; > } 1. You're using « $lines[$_] » too much - you should assign it to a variable. 2. There's a lot of duplicate code in the «print OUTFILE join " " => '*', @lines[ $_ - LIMIT .. $_ + UPPERLIMIT ], $/;» > elsif ($lines[

Re: Perl Script for parsing log files.

2013-05-08 Thread Ed Davis
} > elsif ($lines[$_] =~ m{\bfail\b}i) > { > print OUTFILE join " " => '*', @lines[ $_ - LIMIT .. $_ + UPPERLIMIT > ], $/; > } > else > { > print " No Errors found \n"; > } >

Re: Perl Script for parsing log files.

2013-05-07 Thread Asad
\b}i) { print OUTFILE join " " => '*', @lines[ $_ - LIMIT .. $_ + UPPERLIMIT ], $/; } else { print " No Errors found \n"; } Please review if the above code seems ok . Also want to know how to get this to UI(html page) interface for example a html page w

Re: Perl Script for parsing log files.

2013-04-13 Thread timothy adigun
Hi, On Sat, Apr 13, 2013 at 4:50 PM, Asad wrote: > Hi All , > > Greetings ! > >I have completed O'Reily first book Learning Perl . Started writing > small perl programs . However I basically do log file analysis , hence was > thinking is there any perl

Re: Perl Script for parsing log files.

2013-04-13 Thread David Precious
On Sat, 13 Apr 2013 21:20:30 +0530 Asad wrote: >I have completed O'Reily first book Learning Perl . Started > writing small perl programs . However I basically do log file > analysis , hence was thinking is there any perl code around in any of > the book or if anyone

Perl Script for parsing log files.

2013-04-13 Thread Asad
Hi All , Greetings ! I have completed O'Reily first book Learning Perl . Started writing small perl programs . However I basically do log file analysis , hence was thinking is there any perl code around in any of the book or if anyone already developed for the foll

Re: Need help to develop a log file in Perl

2011-04-26 Thread Bob goolsby
Mornin' -- You might check Log::Log4perl on CPAN. It will most likely do what you want might out of the box (the Easy Mode) and will make your life a lot easier by taking care of such 'trivia' as time-stamps, severity-levels, etc. B On Tue, Apr 26, 2011 at 7:49 AM, Khabz

Re: Need help to develop a log file in Perl

2011-04-26 Thread Jim Gibson
At 4:49 PM +0200 4/26/11, Khabza Mkhize wrote: I have different Web based scripts when they run update SQL Data Base. Now I need to audit every update sql in my database and store all logs to data file. I dont mind about size of a file since I will create different file foreach item Audited. I wi

Need help to develop a log file in Perl

2011-04-26 Thread Khabza Mkhize
I have different Web based scripts when they run update SQL Data Base. Now I need to audit every update sql in my database and store all logs to data file. I dont mind about size of a file since I will create different file foreach item Audited. I will be writing to a file username, date/time, item

Re: Perl... Logging to console and Log file

2011-01-13 Thread Robert Wohlfarth
Thu, Jan 13, 2011 at 2:15 AM, vasanth wrote: > Kindly help me regarding the issue Im facing with the below perl > script, > > I have a below script which send the message to Console. > > I need to modify this script it send message to a Log file. > > Please find

Re: Perl... Logging to console and Log file

2011-01-13 Thread shawn wilson
On Jan 13, 2011 4:19 AM, "vasanth" wrote: > > Hi friends, > > Kindly help me regarding the issue Im facing with the below perl > script, > > I have a below script which send the message to Console. > > I need to modify this script it send message to a Log

Perl... Logging to console and Log file

2011-01-13 Thread vasanth
Hi friends, Kindly help me regarding the issue Im facing with the below perl script, I have a below script which send the message to Console. I need to modify this script it send message to a Log file. Please find the below steps which i performed to send a message to log. Orginal Script

Re: finding interspersed transaction start and end times in log files

2010-11-19 Thread Jim Gibson
save the transaction data }else{ # no start time found for end :( } > > How would you go about this in Perl? Also, it is possible that there > might be a Start in one log file, and the matching End would be in the > next log file. How do you account for those situations.

Re: finding interspersed transaction start and end times in log files

2010-11-19 Thread Shawn H Corey
On 10-11-19 02:25 PM, Al Oomens wrote: How would you go about this in Perl? Also, it is possible that there might be a Start in one log file, and the matching End would be in the next log file. How do you account for those situations. Since each transaction number is unique, I would use it as

finding interspersed transaction start and end times in log files

2010-11-19 Thread Al Oomens
rt 201011191127 - T124 - Start 201011191129 - T124 - End 201011191130 - T123 - End How would you go about this in Perl? Also, it is possible that there might be a Start in one log file, and the matching End would be in the next log file. How do you account for those situations. -- A

Re: split log file

2010-10-18 Thread Shlomi Fish
Hi Agnello, On Monday 18 October 2010 15:01:56 Agnello George wrote: > I know the problem is solved but Could the script be done like this ?? > OK, I'll answer it. > #!/usr/bin/perl > > use strict; > use warnings; > > > while (my $line = ) { Why are you using *DATA and __DATA__ for the data

Re: split log file

2010-10-18 Thread Agnello George
On Sat, Oct 16, 2010 at 2:11 PM, Shlomi Fish wrote: > On Thursday 14 October 2010 16:54:32 yo RO wrote: > > Hello I need to split a log file per days > > I have a file in txt format and I want to create a file with all data > > from one day in one file > > I will give

Re: split log file

2010-10-18 Thread Agnello George
0;11:12\\trafic info 3_23_2010;11:34\\trafic info On Sat, Oct 16, 2010 at 2:11 PM, Shlomi Fish wrote: > On Thursday 14 October 2010 16:54:32 yo RO wrote: > > Hello I need to split a log file per days > > I have a file in txt format and I want to create a file with all data > > f

Re: split log file

2010-10-18 Thread yo RO
On Oct 16, 10:41 am, shlo...@iglu.org.il (Shlomi Fish) wrote: > On Thursday 14 October 2010 16:54:32 yo RO wrote: > > > > > Hello I need to split a log file per days > > I have a file in txt format and I want to create a file with all data > > from one day in on

Re: split log file

2010-10-16 Thread Parag Kalra
use strict; use warnings; my %log; while(){ chomp; my ($key, $value) = split /;/, $_; push @{$log{$key}}, $value; } foreach my $k (keys %log){ open my $k_fh, '>', "$k.log" or die "Could not open the file - $k.log : $! \n"; foreach my $v

Re: split log file

2010-10-16 Thread Shlomi Fish
On Thursday 14 October 2010 16:54:32 yo RO wrote: > Hello I need to split a log file per days > I have a file in txt format and I want to create a file with all data > from one day in one file > I will give example > > I have this imput > 3_21_2010;11:12\\trafic info >

Re: split log file

2010-10-16 Thread Rob Coops
On Thu, Oct 14, 2010 at 4:54 PM, yo RO wrote: > Hello I need to split a log file per days > I have a file in txt format and I want to create a file with all data > from one day in one file > I will give example > > I have this imput > 3_21_2010;11:12\\trafic info > 3_21

split log file

2010-10-16 Thread yo RO
Hello I need to split a log file per days I have a file in txt format and I want to create a file with all data from one day in one file I will give example I have this imput 3_21_2010;11:12\\trafic info 3_21_2010;11:34\\trafic info 3_21_2010;13:21\\trafic info 3_22_2010;11:12\\trafic info

Re: parsing a log file with junk characters

2010-07-04 Thread perl_haxor 123
Hi, Thanks a lot for the solution.i'l give it a try. Thanks, Monnappa On Fri, Jul 2, 2010 at 6:29 PM, Chas. Owens wrote: > On Fri, Jul 2, 2010 at 07:59, perl_haxor 123 wrote: > > Hi All, > > > > I have been asked to parse the log file

Re: parsing a log file with junk characters

2010-07-02 Thread Chas. Owens
On Fri, Jul 2, 2010 at 07:59, perl_haxor 123 wrote: > Hi All, > >     I have been asked to parse the log file (find the attached file) > which logs every keystroke, if you look at the log file you will see lot of > characters like RETURN, BACKSCAPE etc etcIs there a

parsing a log file with junk characters

2010-07-02 Thread perl_haxor 123
Hi All, I have been asked to parse the log file (find the attached file) which logs every keystroke, if you look at the log file you will see lot of characters like RETURN, BACKSCAPE etc etcIs there a way by which i can make sense of this log file, so that i can write a script

Re: mod_perl: access full request, log it, etc

2009-08-23 Thread Bruce Ferrell
; SOAPAction: "/something_else" > > ... but the actual SOAP envelope is missing. How do I get hold of the > WHOLE request? > > Thanks :) > > Dan > > I'm not sure if this will help but try it and see. where the apache log files are defined: CustomLog

mod_perl: access full request, log it, etc

2009-08-23 Thread Dan
Hi all. I'm setting up a mod_perl & soap server, and a friend is writing a java client. As I commented to him, it's a bit like the blind leading the blind at this point :) His request is causing mod_perl to complain about not being able to serialize the request, with an error in XML::Parser. I w

Re: No newlines when writing to a log file

2009-04-30 Thread John W. Krahn
Dave Thacker wrote: Hi folks, Hello, I've created a log file in my code, and I print various strings to it as I go through my program. The problem is that everything is showing up on one line for each iteration of my main loop, even though I have newlines in the string. I'm ge

Re: No newlines when writing to a log file

2009-04-30 Thread Chas. Owens
On Thu, Apr 30, 2009 at 16:03, Dave Thacker wrote: snip > print LOG "The log starts here\n"; snip one line snip >    print "Contacting $host\n"; snip a second line snip >    my $ftp=Net::FTP->new($host,Debug=>0, Timeout=>360) or print LOG "Can&#x

No newlines when writing to a log file

2009-04-30 Thread Dave Thacker
Hi folks, I've created a log file in my code, and I print various strings to it as I go through my program. The problem is that everything is showing up on one line for each iteration of my main loop, even though I have newlines in the string. I'm getting: The log starts here Can&#

Re: Log::Dispatch and Data::Dumper

2009-04-25 Thread Chas. Owens
On Sat, Apr 25, 2009 at 21:45, Dan Fish wrote: > I use Log::Dispatch frequently to set up both file and email logging.  In > the past I have also used it with Data::Dumper for logging in debug mode > doing something like: > > > > $dispatcher->log(level => 'debug

Log::Dispatch and Data::Dumper

2009-04-25 Thread Dan Fish
I use Log::Dispatch frequently to set up both file and email logging. In the past I have also used it with Data::Dumper for logging in debug mode doing something like: $dispatcher->log(level => 'debug', message =>sprintf("%s",Data::Dumper(\$somevar))); This

perl script to log on to website

2009-01-29 Thread ben perl
Is there a way i can use perl to log on to my cell phone provider website and download the minutes i have used and email me if i am going over certain minutes? Thanks, -Ben

Re: prepend date to log

2008-11-06 Thread Chas. Owens
On Wed, Nov 5, 2008 at 11:11, <[EMAIL PROTECTED]> wrote: > hi, > I'm administering a server running apache/mod_perl. > it runs a lot of old web applications who write to STDERR (print > STDERR "log message...";). > as they are a large number for me is a problem

Re: prepend date to log

2008-11-06 Thread Jeff P.
--- On Wed, 11/5/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > From: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > Subject: prepend date to log > To: beginners@perl.org > Cc: [EMAIL PROTECTED] > Date: Wednesday, November 5, 2008, 4:11 PM > open (STDERR, ">

prepend date to log

2008-11-06 Thread ivan . longhi
hi, I'm administering a server running apache/mod_perl. it runs a lot of old web applications who write to STDERR (print STDERR "log message...";). as they are a large number for me is a problem to find where the code is located, but I see a lot of lines of debugging in my apache e

Re: matching elements from array and print the results line by line from log file

2008-10-30 Thread Brian
slow_leaner wrote: On Oct 28, 2:51 pm, [EMAIL PROTECTED] (Andy Cravens) wrote: -Original Message- From: slow_leaner [mailto:[EMAIL PROTECTED] Sent: Tue 10/28/2008 11:58 AM To: [EMAIL PROTECTED] Subject: matching elements from array and print the results line by line from log file Hi

Re: matching elements from array and print the results line by line from log file

2008-10-30 Thread slow_leaner
On Oct 28, 2:51 pm, [EMAIL PROTECTED] (Andy Cravens) wrote: > -Original Message- > From: slow_leaner [mailto:[EMAIL PROTECTED] > Sent: Tue 10/28/2008 11:58 AM > To: [EMAIL PROTECTED] > Subject: matching elements from array and print the results line by line from > lo

Re: matching elements from array and print the results line by line from log file

2008-10-28 Thread John W. Krahn
ny regular expressions at once" please help me. Here is my code. #!/usr/bin/perl -w open ( FILE, " /var/log/cisco.log " ) || die "can't open cisco.log file!"; @cisco.log = ; close (FILE); @array = qw( BPDUGUARD FAN_FAIL ); # more then 2 elements in array while (<

RE: matching elements from array and print the results line by line from log file

2008-10-28 Thread Andy Cravens
-Original Message- From: slow_leaner [mailto:[EMAIL PROTECTED] Sent: Tue 10/28/2008 11:58 AM To: beginners@perl.org Subject: matching elements from array and print the results line by line from log file Hi, I have a list of element in array that I would like to match the pattern in

matching elements from array and print the results line by line from log file

2008-10-28 Thread slow_leaner
Hi, I have a list of element in array that I would like to match the pattern in logs file. I have hard time take element from array and matching it. More then weeks now and don't know where to find in man page. please help me. Here is my code. #!/usr/bin/perl -w open ( FILE, " /var/log

Re: Log::Log4perl

2008-10-16 Thread Deviloper
-Object in each thread that want to use Log4Perl in. (I guess this is the saved thing at all... but ram usage and i/o behaviour might change, and race conditions on the logfile (if you only use one in total) may occure. You will notice that by cutted lines in the log.)   Bye, D. Rob Coops <[EM

Re: Log::Log4perl

2008-10-15 Thread Rob Coops
a single > request > > at a time is not realy optimal usage so threads where introduced in order > to > > process up to 10 requests at the same time, which speeds things up quite > a > > bit, but... > > > > Does Log4perl work well with threads? > > > &

Re: Log::Log4perl

2008-10-15 Thread Chas. Owens
ts at the same time, which speeds things up quite a > bit, but... > > Does Log4perl work well with threads? > > - It seems to as I am not seeing any errors > - All threads log to the same file which so far every time contains all > lines expected > - The Log4perl documen

Log::Log4perl

2008-10-15 Thread Rob Coops
as I am not seeing any errors - All threads log to the same file which so far every time contains all lines expected - The Log4perl documentation does not state clearly if it is thread safe or not I have looked at the Log4perl source code and at the Log::Log4perl::Appender::File module

Re: Get the last entry of log file

2008-09-23 Thread Olteanu Eugen
Maybe this helps : tail -1 file and redirect the output to a file. On Mon, Sep 22, 2008 at 10:46 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: > Mr. Shawn H. Corey wrote: > >> On Wed, 2008-09-17 at 13:18 +0100, Stewart Anderson wrote: >> >>> How about a system(tail -x inputfile >> mylastfile)

Re: Get the last entry of log file

2008-09-22 Thread John W. Krahn
Mr. Shawn H. Corey wrote: On Wed, 2008-09-17 at 13:18 +0100, Stewart Anderson wrote: How about a system(tail -x inputfile >> mylastfile)type call to get the last line and then open the mylastfile to work on the line there? The UNIX utility tail(1) still reads the entire file. The

Re: Get the last entry of log file

2008-09-17 Thread John W. Krahn
Manasi Bopardikar wrote: I have a log file- [ snip ] How can I get the last entry of this file? use File::ReadBackwards; my $bw = File::ReadBackwards->new( 'log_file' ) or die "can't read 'log_file' $!"; my $last_line = $bw->readline;

RE: Get the last entry of log file

2008-09-17 Thread Mr. Shawn H. Corey
On Wed, 2008-09-17 at 13:18 +0100, Stewart Anderson wrote: > How about a system(tail -x inputfile >> mylastfile)type call to > get the last line and then open the mylastfile to work on the line > there? > The UNIX utility tail(1) still reads the entire file. -- Just my 0.0002 mil

Re: Get the last entry of log file

2008-09-17 Thread Mr. Shawn H. Corey
On Wed, 2008-09-17 at 13:55 +0200, Rob Coops wrote: > my $last_line; > while( <> ){ > $last_line = $_; > } > > Sure... depends on the size of the log, though. Do that for a log that > is > say 500MB in size and you are in for quite a wait as it will loop over >

Re: Get the last entry of log file

2008-09-17 Thread Hridyesh Pant
try this... perl -ne'$l = $_; END { print $l }' /tmp/1.txt --Hridyesh Stewart Anderson wrote: From: Rob Coops [mailto:[EMAIL PROTECTED] Sent: 17 September 2008 12:55 To: Mr. Shawn H. Corey Cc: Manasi Bopardikar; beginners@perl.org Subject: Re: Get the last entry of log file my

RE: Get the last entry of log file

2008-09-17 Thread Stewart Anderson
> From: Rob Coops [mailto:[EMAIL PROTECTED] > Sent: 17 September 2008 12:55 > To: Mr. Shawn H. Corey > Cc: Manasi Bopardikar; beginners@perl.org > Subject: Re: Get the last entry of log file > > my $last_line; > while( <> ){ > $last_line = $_; > } > &

Re: Get the last entry of log file

2008-09-17 Thread Rob Coops
my $last_line; while( <> ){ $last_line = $_; } Sure... depends on the size of the log, though. Do that for a log that is say 500MB in size and you are in for quite a wait as it will loop over each line in the file will it not? On Wed, Sep 17, 2008 at 1:46 PM, Mr. Shawn H. Corey &

Re: Get the last entry of log file

2008-09-17 Thread Mr. Shawn H. Corey
On Wed, 2008-09-17 at 15:41 +0530, Manasi Bopardikar wrote: > I have a log file- > > | 15 Sep 2008 - 06:37 | TWikiGuest | view | TWiki.WebHome | Mozilla | > 10.88.68.26 | > > | 15 Sep 2008 - 06:37 | TWikiGuest | view | TWiki.TWikiFAQ | Mozilla | > 10.88.68.26 | >

Re: Get the last entry of log file

2008-09-17 Thread Rob Coops
m/([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/ Should do the trick I guess of course there are fancier ways but this will do the trick... Regards, Rob On Wed, Sep 17, 2008 at 12:11 PM, Manasi Bopardikar < [EMAIL PROTECTED]> wrote: > I have a log file- > > | 15 S

Get the last entry of log file

2008-09-17 Thread Manasi Bopardikar
I have a log file- | 15 Sep 2008 - 06:37 | TWikiGuest | view | TWiki.WebHome | Mozilla | 10.88.68.26 | | 15 Sep 2008 - 06:37 | TWikiGuest | view | TWiki.TWikiFAQ | Mozilla | 10.88.68.26 | | 15 Sep 2008 - 06:38 | TWikiGuest | view | TWiki.TWikiTutorial | Mozilla | 10.88.68.26 | | 15 Sep 2008

Re: Extracting data from log and reformating

2008-08-19 Thread John W. Krahn
John W. Krahn wrote: Kashif Salman wrote: How can I capture "Start" as well? putting brackets around it like so doesn't work: /^(Start)/ && <> =~ /^(\d+)\/(\d+)\/(\d+)/ && print "$1=> 20$4-$2-$3"; I know it seems pointless to capture start but it doesn't always say "Start" so I want to capt

Re: Extracting data from log and reformating

2008-08-19 Thread John W. Krahn
Kashif Salman wrote: How can I capture "Start" as well? putting brackets around it like so doesn't work: /^(Start)/ && <> =~ /^(\d+)\/(\d+)\/(\d+)/ && print "$1=> 20$4-$2-$3"; I know it seems pointless to capture start but it doesn't always say "Start" so I want to capture it. for simplicity l

Re: Extracting data from log and reformating

2008-08-19 Thread Kashif Salman
On Fri, Aug 15, 2008 at 9:03 AM, Chris Charley <[EMAIL PROTECTED]> wrote: > On Wed, Aug 13, 2008 at 10:05 AM, John W. Krahn <[EMAIL PROTECTED]> wrote: >> >> Kashif Salman wrote: >>> >>> Greetings, >>>> >>>> >>> Hel

Re: Extracting data from log and reformating

2008-08-15 Thread Chris Charley
On Wed, Aug 13, 2008 at 10:05 AM, John W. Krahn <[EMAIL PROTECTED]> wrote: Kashif Salman wrote: Greetings, Hello, I have a log file like so, and I am trying to get the date on the next line after "Start..." line. So for the log below I'd like to get the output 04

Re: Extracting data from log and reformating

2008-08-14 Thread Kashif Salman
On Wed, Aug 13, 2008 at 10:05 AM, John W. Krahn <[EMAIL PROTECTED]> wrote: > Kashif Salman wrote: > >> Greetings, >> > > Hello, > > I have a log file like so, and I am trying to get the date on the next >> line >> after "Start..." line. S

Re: Extracting data from log and reformating

2008-08-13 Thread Kashif Salman
On Wed, Aug 13, 2008 at 10:05 AM, John W. Krahn <[EMAIL PROTECTED]> wrote: > Kashif Salman wrote: > >> Greetings, >> > > Hello, > > I have a log file like so, and I am trying to get the date on the next >> line >> after "Start..." line. S

Re: Extracting data from log and reformating

2008-08-13 Thread John W. Krahn
Kashif Salman wrote: Greetings, Hello, I have a log file like so, and I am trying to get the date on the next line after "Start..." line. So for the log below I'd like to get the output 04/06/05 05/06/05 06/06/05 But I also need to re-format that so the end result becomes:

Extracting data from log and reformating

2008-08-13 Thread Kashif Salman
Greetings, I have a log file like so, and I am trying to get the date on the next line after "Start..." line. So for the log below I'd like to get the output 04/06/05 05/06/05 06/06/05 But I also need to re-format that so the end result becomes: 2005-04-06 2005-05-06 2005-0

Re: Getopt::Long and Log::StdLog problem

2008-08-05 Thread rafailowski
Mr. Shawn H. Corey wrote: On Tue, 2008-08-05 at 08:57 +0200, rafailowski wrote: Thx but adding __END__ return me this error, anyway the problem is solve with a BEGIN block (cf.Rob Dixon). $ perl test.pl --log-level=debug Name "main::STDLOG" used only once: possible typo at

Re: Getopt::Long and Log::StdLog problem

2008-08-05 Thread Mr. Shawn H. Corey
On Tue, 2008-08-05 at 08:57 +0200, rafailowski wrote: > Thx but adding __END__ return me this error, anyway the problem is solve > with a BEGIN block (cf.Rob Dixon). > > $ perl test.pl --log-level=debug > Name "main::STDLOG" used only once: possible typo at > /usr

Re: Getopt::Long and Log::StdLog problem

2008-08-04 Thread rafailowski
Mr. Shawn H. Corey wrote: On Mon, 2008-08-04 at 20:47 -0400, Mr. Shawn H. Corey wrote: On Tue, 2008-08-05 at 01:33 +0200, rafailowski wrote: Yes, without argument, the error is normal : $ perl test.pl Use of uninitialized value in hash element at /usr/local/share/perl/5.10.0/Log

Re: Getopt::Long and Log::StdLog problem

2008-08-04 Thread rafailowski
Rob Dixon wrote: rafailowski wrote: I have a problem with Getopt::Long and Log::StdLog. An example script, i always have the following error : Use of uninitialized value in hash element at /usr/local/share/perl/5.10.0/Log/StdLog.pm line 57 level => $cmd_args_ref->{"log_level&

Re: Getopt::Long and Log::StdLog problem

2008-08-04 Thread Mr. Shawn H. Corey
On Mon, 2008-08-04 at 20:47 -0400, Mr. Shawn H. Corey wrote: > On Tue, 2008-08-05 at 01:33 +0200, rafailowski wrote: > > Yes, without argument, the error is normal : > > > > $ perl test.pl > > Use of uninitialized value in hash element at > > /usr/local/share/

Re: Getopt::Long and Log::StdLog problem

2008-08-04 Thread Rob Dixon
rafailowski wrote: > > I have a problem with Getopt::Long and Log::StdLog. > > An example script, i always have the following error : > Use of uninitialized value in hash element at > /usr/local/share/perl/5.10.0/Log/StdLog.pm line 57 > > level => $cmd_args_ref->

Re: Getopt::Long and Log::StdLog problem

2008-08-04 Thread Mr. Shawn H. Corey
On Tue, 2008-08-05 at 01:33 +0200, rafailowski wrote: > Yes, without argument, the error is normal : > > $ perl test.pl > Use of uninitialized value in hash element at > /usr/local/share/perl/5.10.0/Log/StdLog.pm line 57. > Use of uninitialized value in string at test.pl line

Re: Getopt::Long and Log::StdLog problem

2008-08-04 Thread rafailowski
Mr. Shawn H. Corey wrote: On Tue, 2008-08-05 at 01:05 +0200, rafailowski wrote: Hi all, I have a problem with Getopt::Long and Log::StdLog. An example script, i always have the following error : Use of uninitialized value in hash element at /usr/local/share/perl/5.10.0/Log/StdLog.pm line

Re: Getopt::Long and Log::StdLog problem

2008-08-04 Thread Mr. Shawn H. Corey
On Tue, 2008-08-05 at 01:05 +0200, rafailowski wrote: > Hi all, > > I have a problem with Getopt::Long and Log::StdLog. > > An example script, i always have the following error : > Use of uninitialized value in hash element at > /usr/local/share/perl/5.10.0/Log/StdLog.

Getopt::Long and Log::StdLog problem

2008-08-04 Thread rafailowski
Hi all, I have a problem with Getopt::Long and Log::StdLog. An example script, i always have the following error : Use of uninitialized value in hash element at /usr/local/share/perl/5.10.0/Log/StdLog.pm line 57 level => $cmd_args_ref->{"log_level"} is always unde

Re: program fails to write some entries in log

2008-07-10 Thread icarus
ture 2008/July/09 and places xfile1 there. > > Then it creates a log with the steps done. > > > So...in the system the result is 2008/July/09/xfile1 > > The log entry looks like "xfile1 => 2008/July/09" > > > problem: When I send an INT signal (Control+C)

Re: program fails to write some entries in log

2008-07-10 Thread Rob Dixon
John W. Krahn wrote: > Rob Dixon wrote: >> John W. Krahn wrote: >>> #extract year, month, day when $xfile was last modified >>> # eg 2008/July/9 >>> my $dir = strftime '%Y/%b/%-d', localtime( ( lstat $xfile )[9] ) >> I hoped that was what I was looking for, but the forma

Re: program fails to write some entries in log

2008-07-10 Thread John W. Krahn
Rob Dixon wrote: John W. Krahn wrote: #extract year, month, day when $xfile was last modified # eg 2008/July/9 my $dir = strftime '%Y/%b/%-d', localtime( ( lstat $xfile )[9] ) I hoped that was what I was looking for, but the format %- creates nothing and the 'd' is s

Re: program fails to write some entries in log

2008-07-10 Thread Rob Dixon
John W. Krahn wrote: > > #extract year, month, day when $xfile was last modified > # eg 2008/July/9 > my $dir = strftime '%Y/%b/%-d', localtime( ( lstat $xfile )[9] ) I hoped that was what I was looking for, but the format %- creates nothing and the 'd' is simply. >

Re: program fails to write some entries in log

2008-07-10 Thread John W. Krahn
icarus wrote: what this does: it classifies a file based on its modification date. example: xfile1 is dated July 9, 2008. If it doesn't exist, the program creates a directory structure 2008/July/09 and places xfile1 there. Then it creates a log with the steps done. So...in the syste

Re: program fails to write some entries in log

2008-07-10 Thread Rob Dixon
icarus wrote: > what this does: it classifies a file based on its modification date. > > example: xfile1 is dated July 9, 2008. If it doesn't exist, the > program creates a > directory structure 2008/July/09 and places xfile1 there. > Then it creates a log with the steps

program fails to write some entries in log

2008-07-10 Thread icarus
what this does: it classifies a file based on its modification date. example: xfile1 is dated July 9, 2008. If it doesn't exist, the program creates a directory structure 2008/July/09 and places xfile1 there. Then it creates a log with the steps done. So...in the system the result is 2008

Re: Funky Characters in Log files

2008-06-28 Thread Jeff Peng
On Sat, Jun 28, 2008 at 7:47 PM, Travis Thornhill <[EMAIL PROTECTED]> wrote: > I know there have probably been a thousand posts on this topic, and I > apologize in advance for skipping over them and deleting them. > > I have instances of strange characters in logs, and I'd like to be able to > pr

Funky Characters in Log files

2008-06-28 Thread Travis Thornhill
I know there have probably been a thousand posts on this topic, and I apologize in advance for skipping over them and deleting them.   I have instances of strange characters in logs, and I'd like to be able to print them properly.   Here's an example of a few lines:   L 06/27/2008 - 18:37:18: "[P

Parse IRC log

2008-06-26 Thread rara
Hello all, I need to parse IRC logs for IPs. The format would be @ then host followed by either ) or ], some may contain unwanted spaces. If the host is not an IP, I would need to have it converted to an IP. The resulting IPs would then have to be looped through Net::DNSBLLookup, with and

Re: log level

2008-05-25 Thread gypsy
"Chas. Owens" wrote: > On Sat, May 24, 2008 at 2:28 PM, gypsy <[EMAIL PROTECTED]> wrote: > > I downloaded a perl script from http://www.tahina.priv.at/~cm/spam/ and > > it logs its activity. I wish to have my logs exclude level 'debug'. > > > > Things tried: > > 1) Contact author -> no reply > > 2

Re: log level

2008-05-25 Thread David Moreno
Yeah. D. On Sun, 2008-05-25 at 00:36 -0400, Chas. Owens wrote: > On Sat, May 24, 2008 at 2:28 PM, gypsy <[EMAIL PROTECTED]> wrote: > > I downloaded a perl script from http://www.tahina.priv.at/~cm/spam/ and > > it logs its activity. I wish to have my logs exclude level 'debug'. > > > > Things tr

Re: log level

2008-05-24 Thread Chas. Owens
On Sat, May 24, 2008 at 2:28 PM, gypsy <[EMAIL PROTECTED]> wrote: > I downloaded a perl script from http://www.tahina.priv.at/~cm/spam/ and > it logs its activity. I wish to have my logs exclude level 'debug'. > > Things tried: > 1) Contact author -> no reply > 2) Alter syslog.conf "mail.*" to "ma

log level

2008-05-24 Thread gypsy
I downloaded a perl script from http://www.tahina.priv.at/~cm/spam/ and it logs its activity. I wish to have my logs exclude level 'debug'. Things tried: 1) Contact author -> no reply 2) Alter syslog.conf "mail.*" to "mail.info" and restart syslogd -> No Joy 3) Remove "-d" from the startup parame

Re: Log error

2008-05-13 Thread John W. Krahn
quot;) { print " Label is not locked\n"; } else { print "Label is locked\n Unlocking the label\n"; `/usr/atria/bin/cleartool unlock lbtype:$depl_lbl`; if($?){print "Label unlocking failed\n Check the same and try once again\n";exit 1;} else{print "

Re: Log error

2008-05-13 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > > I have written once Perl script to perform certain task. In that script > I have defined one function to create the log file. > > The issue is that whenever I am running that script it is executing fine > but the moment it reaches to log () fun

Log error

2008-05-12 Thread Irfan.Sayed
Hi All, I have written once Perl script to perform certain task. In that script I have defined one function to create the log file. The issue is that whenever I am running that script it is executing fine but the moment it reaches to log () function it throws me following error. Can&#

Re: log missing images

2008-05-12 Thread Gunnar Hjalmarsson
[ Please don't top-post! ] Hildreth, Steve wrote: Gunnar Hjalmarsson wrote: Hildreth, Steve wrote: What I am looking for is a parameter that I can add to my PERL script that will specify the file call that resulted in the log entry. How about showing us the Perl (not PERL) script you

  1   2   3   4   5   6   >