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
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 warnings;
...
### Start some logging ###
my $lo
13 matches
Mail list logo