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
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
"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
"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."
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.
> >
>
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
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.
>
> >
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
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/
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
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";
> }
>
>
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
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
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
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
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
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
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
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
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
> 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
>
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
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
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
-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
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: $!";
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
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
> -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
29 matches
Mail list logo