Re: Logging STDERR and other output

2007-09-01 Thread Peter Scott
On Thu, 30 Aug 2007 10:57:20 -0300, Adriano Ferreira wrote: > On 8/30/07, Peter Scott <[EMAIL PROTECTED]> wrote: >> Why are you using a BEGIN block? Why not just make it the first >> executable statement? Do you have any other 'use' statements in the >> program? > > Because otherwise it would be

Re: Logging STDERR and other output

2007-09-01 Thread Peter Scott
On Thu, 30 Aug 2007 17:25:28 +0100, Beginner wrote: > On 30 Aug 2007 at 10:07, Mumia W. wrote: > >> On 08/30/2007 09:37 AM, Beginner wrote: >> > q2) Will our $logfile now be a shared variable across all my modules? >> Try it and see. > > No. It's not. Yes. It is. It was declared (three posts

Re: Logging STDERR and other output

2007-08-31 Thread Dr.Ruud
"Beginner" schreef: > Log::Handler looks pretty comprehensive. Consider also Log::Log4Perl. http://search.cpan.org/~mschilli/Log-Log4perl/lib/Log/Log4perl/FAQ.pm -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

Re: Logging STDERR and other output

2007-08-31 Thread Dr.Ruud
"Beginner" schreef: > Adriano Ferreira: >> use lib qw(/etc/perl); > > use lib ('/etc/perl'); The idiom adivised by Adriano is more flexible. See `perldoc lib`. Example: use lib qw( /usr/local/cvs_tree/lib /etc/perl ); -- Affijn, Ruud "Gewoon is een tijger."

Re: Logging STDERR and other output

2007-08-30 Thread Beginner
On 30 Aug 2007 at 10:07, Mumia W. wrote: > On 08/30/2007 09:37 AM, Beginner wrote: > > [...] > > > > I tried the INIT option and that worked also and I liked the fact > > that my `perl -c myscript.pl` sent it's output to screen and not my > > log file and I can use a scalar for logfile. > > >

Re: Logging STDERR and other output

2007-08-30 Thread Mumia W.
On 08/30/2007 09:37 AM, Beginner wrote: [...] I tried the INIT option and that worked also and I liked the fact that my `perl -c myscript.pl` sent it's output to screen and not my log file and I can use a scalar for logfile. q1) Does this still give me the effect of getting any errors from t

Re: Logging STDERR and other output

2007-08-30 Thread Beginner
On 30 Aug 2007 at 10:59, Adriano Ferreira wrote: > On 8/30/07, Beginner wrote: > > > > BEGIN { unshift @INC, '/etc/perl'; > > This is better done with > > use lib qw(/etc/perl); use lib ('/etc/perl'); Well that seems to work :-). > which doesn't need the surrounding "BEGIN" block. > > >

Re: Logging STDERR and other output

2007-08-30 Thread Adriano Ferreira
On 8/30/07, Beginner <[EMAIL PROTECTED]> wrote: > On 30 Aug 2007 at 6:32, Peter Scott wrote: > > > On Thu, 30 Aug 2007 10:32:01 +0100, Beginner wrote: > > > I want all the output plus any error messages to got to a log file. I > > > used the BEGIN block to direct STDERR into the file: > > > > > > B

Re: Logging STDERR and other output

2007-08-30 Thread Adriano Ferreira
On 8/30/07, Peter Scott <[EMAIL PROTECTED]> wrote: > On Thu, 30 Aug 2007 10:32:01 +0100, Beginner wrote: > > I want all the output plus any error messages to got to a log file. I > > used the BEGIN block to direct STDERR into the file: > > > > BEGIN { > > open(STDERR, ">>/usr/local/myreports/

Re: Logging STDERR and other output

2007-08-30 Thread Beginner
On 30 Aug 2007 at 6:32, Peter Scott wrote: > On Thu, 30 Aug 2007 10:32:01 +0100, Beginner wrote: > > I want all the output plus any error messages to got to a log file. I > > used the BEGIN block to direct STDERR into the file: > > > > BEGIN { > > open(STDERR, ">>/usr/local/myreports/repo

Re: Logging STDERR and other output

2007-08-30 Thread Peter Scott
On Thu, 30 Aug 2007 10:32:01 +0100, Beginner wrote: > I want all the output plus any error messages to got to a log file. I > used the BEGIN block to direct STDERR into the file: > > BEGIN { > open(STDERR, ">>/usr/local/myreports/report.log") || die "Can't > write to file: $!\n"; > } > >

Re: Logging STDERR and other output

2007-08-30 Thread Mumia W.
On 08/30/2007 04:32 AM, Beginner wrote: Hi, I want all the output plus any error messages to got to a log file. I used the BEGIN block to direct STDERR into the file: BEGIN { open(STDERR, ">>/usr/local/myreports/report.log") || die "Can't write to file: $!\n"; } use strict; use war

Re: Logging module in RHEL distro

2007-04-25 Thread Chas Owens
On 4/26/07, Nath, Alok (STSD) <[EMAIL PROTECTED]> wrote: Hi, I am using perl which comes with RHEL distribution. I think the perl version is 5.8.5. I am not seeing any modules specific for message logging. Does it have any ? I am prohibited from installin

Re: logging into web page with credintials

2007-02-08 Thread Owen
On Thu, 8 Feb 2007 11:15:46 -0800 "Sukhdev Bainiwal" <[EMAIL PROTECTED]> wrote: > I get compilation errors at line where I pass in my credentials; is my > syntax ok. > > my $url = "http://abcs:8080/abcs/jsp/login.jsf"; > > > > my $request = new HTTP::Request( 'POST' => $url, $userName => "yy

Re: Logging to a Server via ftp.

2003-11-17 Thread John
Thanks a lot Yupapa.com! - Original Message - From: "Yupapa.com" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, November 16, 2003 11:18 PM Subject: Re: Logging to a Ser

Re: Logging to a Server via ftp.

2003-11-17 Thread Yupapa.com
a relevant script? > > > - Original Message - > From: "Wiggins d'Anconia" <[EMAIL PROTECTED]> > To: "John" <[EMAIL PROTECTED]> > Cc: "Perl Beginners" <[EMAIL PROTECTED]> > Sent: Sunday, November 16, 2003 5:28 PM > S

Re: Logging to a Server via ftp.

2003-11-16 Thread R. Joseph Newton
John wrote: > Yes, logging into. > > Have you got a relevant script? You should probably check in with news://nntp.perl.org/perl.jobs and let people there know that you have a job available. This is a list for people who are interested inlearning to use Perl. Joseph -- To unsubscribe, e-mail

Re: Logging to a Server via ftp.

2003-11-16 Thread Wiggins d'Anconia
age - From: "Wiggins d'Anconia" <[EMAIL PROTECTED]> To: "John" <[EMAIL PROTECTED]> Cc: "Perl Beginners" <[EMAIL PROTECTED]> Sent: Sunday, November 16, 2003 5:28 PM Subject: Re: Logging to a Server via ftp. John wrote: What is the module and

Re: Logging to a Server via ftp.

2003-11-16 Thread John
Yes, logging into. Have you got a relevant script? - Original Message - From: "Wiggins d'Anconia" <[EMAIL PROTECTED]> To: "John" <[EMAIL PROTECTED]> Cc: "Perl Beginners" <[EMAIL PROTECTED]> Sent: Sunday, November 16, 2003 5:28 PM Sub

Re: Logging to a Server via ftp.

2003-11-16 Thread Wiggins d'Anconia
John wrote: What is the module and some examples to do tha bove job? Thanks in advance. I am assuming you mean "Logging into a server via ftp"... Net::FTP Or did you really mean "Logging to a server via ftp"... http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

Re: logging

2003-10-28 Thread Wiggins d Anconia
> My co-worker wrote a perl script on a WIN 2000 Advance server that > monitors my E10K 8 Unix domains. It executes every 15 minutes and then the > output attempts are logged in the /var/adm/messages on my unix domains > each time. How do I redirect this output to another log of its own to keep >

Re: logging issue

2003-08-09 Thread Quenten Griffith
Disregard I had an extra space after the glob $file part once I made it (glob $file) instead of (glob $file ) it worked. Odd very odd. --- Quenten Griffith <[EMAIL PROTECTED]> wrote: > Hello all, > > For somereason I have a bit of code that will not > write out to the log file when it finds my ar

Re: Logging to a file or FH?

2003-06-23 Thread deb
Cool. I didn't know about the IPC::Open3 module. Will look at it. Thanks for the pointer! deb At 15:04:25, on 06.23.03: Cracks in my tinfoil beanie allowed John W. Krahn to seep these bits into my brain:, > Deb wrote: > > > > I've got a script which opens a filehandle to write print statments

Re: Logging to a file or FH?

2003-06-23 Thread John W. Krahn
Deb wrote: > > I've got a script which opens a filehandle to write print statments to a file. > But, I'm also running some system commands, and I would also like to send > stdout and stderr to that filehandle. I could just echo text to a file, or I > could use a filehandle. Which would be "bette

RE: logging data to text file help!!

2002-09-12 Thread Winchester, Derek S (Derek)
-Original Message- From: Winchester, Derek S (Derek) [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 12:22 PM To: [EMAIL PROTECTED] Subject: logging data to text file I have composed this perl script and I would like the results from each command to append a log file. Is

RE: Logging details

2002-05-13 Thread John Edwards
You could either redirect all STDERR output to a file, or pass all error info to a sub routine. For the second method you could do... if (system ($cmd)) { &fatalError("Error $!\n"); } sub fatalError { my $error = shift; open ERROR ">>error.txt" or die "Can't append to error.txt: $!";

Re: Logging IP address to a file from the web.

2002-01-28 Thread Dave Runkle
On Mon, 21 Jan 2002, Michael Pratt wrote: > I cant seem to get this to work is there something Im missing? > > $logfile = '/logs/ipaccess.log'; > $date = scalar localtime; > > open(IPLOG, ">>$logfile" Check your quotes - do you know the difference between single- and double-quotes? Are you usi

Re: logging out a user

2001-10-30 Thread Pete Sergeant
Find out your Perl PID, find out the user who's running it, and kill their session using `kill`? +Pete "Bob Showalter" <[EMAIL PROTECTED]> wrote in message 2E4528861499D41199D200A0C9B15BC031B508@FRISTX">news:2E4528861499D41199D200A0C9B15BC031B508@FRISTX... > > -Original Message- > > Fro

RE: logging out a user

2001-10-30 Thread Bob Showalter
> -Original Message- > From: Matthew Blacklow [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 29, 2001 7:33 PM > To: [EMAIL PROTECTED] > Subject: logging out a user > > > Hi Guys, > > Got a bit of a conundrum here. I have a perl script that does various > things for any user who runs