[29367] in Perl-Users-Digest
Perl-Users Digest, Issue: 611 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 3 00:09:53 2007
Date: Mon, 2 Jul 2007 21:09:05 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 2 Jul 2007 Volume: 11 Number: 611
Today's topics:
Re: best Excel module <rvtol+news@isolution.nl>
Re: best Excel module cartercc@gmail.com
Re: FAQ 8.49 How do I add a directory to my include pat (David Combs)
Re: Help finding CGI files on Unix server <ts@dionic.net>
Re: Help finding CGI files on Unix server <lambik@kieffer.nl>
Overriding a class method with an object method <koszalekopalek@interia.pl>
Re: Overriding a class method with an object method anno4000@radom.zrz.tu-berlin.de
Re: PERL and Active DIrectory gaz_5_m@yahoo.co.uk
Re: PERL and Active DIrectory QoS@domain.invalid
Re: perl and php <spamtrap@dot-app.org>
Re: Problem with PERL function <rvtol+news@isolution.nl>
Reading time from an excel sheet. <rajendra.prasad@in.bosch.com>
Re: unlurking <invalid@invalid.nyet>
Re: unlurking <mritty@gmail.com>
Re: unlurking <notvalid@cox.net.invalid>
Re: unlurking <invalid@invalid.nyet>
Re: unlurking <noreply@gunnar.cc>
Re: unlurking <sbryce@scottbryce.com>
Re: unlurking <tadmc@seesig.invalid>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 2 Jul 2007 22:57:37 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: best Excel module
Message-Id: <f6bvtq.ek.1@news.isolution.nl>
Bart Lateur schreef:
> Direct manipulation of Excel files, in pure Perl, using
> SpreadSheet::Write::Excel and SpreadSheet::ParseExcel
I assume one needs to use both modules to be able to "change"
or "update" an xls-file, like:
SS::PE to read an existing xls-file, and
SS::WE to create (and populate) a fresh xls-file.
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: Mon, 02 Jul 2007 20:20:52 -0700
From: cartercc@gmail.com
Subject: Re: best Excel module
Message-Id: <1183432852.129192.60320@n60g2000hse.googlegroups.com>
On Jul 2, 4:57 pm, "Dr.Ruud" <rvtol+n...@isolution.nl> wrote:
> I assume one needs to use both modules to be able to "change"
> or "update" an xls-file, like:
> SS::PE to read an existing xls-file, and
> SS::WE to create (and populate) a fresh xls-file.
Many thanks, this has been helpful.
Dr. Ruud, I swing only one way -- I only create the rubbish, the users
collect.
CC
------------------------------
Date: Tue, 3 Jul 2007 00:29:23 +0000 (UTC)
From: dkcombs@panix.com (David Combs)
Subject: Re: FAQ 8.49 How do I add a directory to my include path (@INC) at runtime?
Message-Id: <f6c592$9t2$1@reader2.panix.com>
In article <070620071638564794%brian.d.foy@gmail.com>,
brian d foy <brian.d.foy@gmail.com> wrote:
>In article <1181222423.284810.52310@p77g2000hsh.googlegroups.com>, Brad
>Baxter <baxter.brad@gmail.com> wrote:
>
>> On Jun 6, 9:03 pm, PerlFAQ Server <b...@stonehenge.com> wrote:
>> > 8.49: How do I add a directory to my include path (@INC) at runtime?
>> >
>> > Here are the suggested ways of modifying your include path:
>> >
>> > the PERLLIB environment variable
>> > the PERL5LIB environment variable
>> > the perl -Idir command line flag
>> > the use lib pragma, as in
>> > use lib "$ENV{HOME}/myown_perllib";
>> >
>> > The latter is particularly useful because it knows about machine
>> > dependent architectures. The lib.pm pragmatic module was first included
>> > with the 5.002 release of Perl.
>>
>> Pedantic nit:
>>
>> s/latter/last/;
>
>I'll make that fix on the next pass. Thanks,
>
Lots of times the word "final" seems to be much clearer
in its meaning than is "last", eg
The last time he went swimming (or on a date, or had breakfast,
or went to a YAPC, ...)
vs
The final time he went swimming (or on a date, or had breakfast,
or went to a YAPC, ...)
Well, maybe.
David
PS: likewise "may", compared to "is allowed to" and "might perhaps" -- especially
in, uh, language manuals. :-)
------------------------------
Date: Mon, 02 Jul 2007 21:12:45 +0100
From: Tim Southerwood <ts@dionic.net>
Subject: Re: Help finding CGI files on Unix server
Message-Id: <46895c3d$0$642$5a6aecb4@news.aaisp.net.uk>
bassintro coughed up some electrons that declared:
>
> Im on an HP-UX box and dont have locate or slocate, just basic unix
I don't know HP-UX, but are you sure there isn't a package for it?
Or I guess you could install the GNU version from source, but only if you
decide it's worth it. There's nothing special about it that would stop it
working in HP-UX.
Usually, one sets up a cron job to re-index overnight and then enjoy the
convenience of "locate somepattern" in record fast time.
HTH
Tim
------------------------------
Date: Mon, 2 Jul 2007 22:54:45 +0200
From: "Lambik" <lambik@kieffer.nl>
Subject: Re: Help finding CGI files on Unix server
Message-Id: <468965b0$0$37733$5fc3050@dreader2.news.tiscali.nl>
"bassintro" <bassintro@gmail.com> wrote in message
news:1183393480.471812.229840@q75g2000hsh.googlegroups.com...
> Help!
> I need a way to find all the cgi files on my server and simply list
> their name and dir.
>
> I have been using the find command...
> find . -type f -name '*.*htm*' -exec grep cgi {} \;
>
> However, I need a better way to do this and be more specific. I also
> don't want to have to go into each vhost html dir and run this command
> everytime.
>
Maybe something like (untested):
#!/usr/bin/perl
use strict;
use warnings;
use File::Find;
my @exec_files;
find sub {
push @exec_files, $File::Find::name if (-x && -T);
}, "/"; # or dir with vhosts
foreach (@exec_files) {
print $_,"\n";
}
------------------------------
Date: Mon, 02 Jul 2007 13:33:29 -0700
From: Koszalek Opalek <koszalekopalek@interia.pl>
Subject: Overriding a class method with an object method
Message-Id: <1183408409.632160.283690@q69g2000hsb.googlegroups.com>
Hello,
A method in the base class can be overridden in the derived class.
My question is: can an _object_ override a method in its base class?
Here is a simple class P with two methods: new() and meth(). I would
like to create an object of class P that uses its own method meth().
#!/usr/bin/perl
use strict;
use warnings;
{
package P;
sub new
{
my $class = shift;
my $self = {@_};
bless $self, $class;
return $self;
};
sub meth
{
my $self = shift;
print "This is a class method.\n";
};
};
my $obj = P->new(
meth => sub { print "This is an object method.\n" }
);
$obj->meth;
The code above will (obviously) print
This is a class method.
I would like it to call the sub defined in the object $obj and print
This is an object method.
I came up with the following solution (this is a new implementation
of method meth() in the class P):
sub meth
{
my $self = shift;
if ($self->{meth}) {
&{$self->{meth}};
} else {
print "This is a class method.\n";
};
};
Is there a more elegant way?
K.
------------------------------
Date: 2 Jul 2007 21:11:06 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: Overriding a class method with an object method
Message-Id: <5et7vaF39qr8sU1@mid.dfncis.de>
Koszalek Opalek <koszalekopalek@interia.pl> wrote in comp.lang.perl.misc:
> Hello,
>
> A method in the base class can be overridden in the derived class.
> My question is: can an _object_ override a method in its base class?
> Here is a simple class P with two methods: new() and meth(). I would
> like to create an object of class P that uses its own method meth().
>
> #!/usr/bin/perl
> use strict;
> use warnings;
> {
> package P;
>
> sub new
> {
> my $class = shift;
> my $self = {@_};
> bless $self, $class;
> return $self;
>
> };
>
> sub meth
> {
> my $self = shift;
> print "This is a class method.\n";
>
> };
> };
>
> my $obj = P->new(
> meth => sub { print "This is an object method.\n" }
> );
>
> $obj->meth;
>
> The code above will (obviously) print
> This is a class method.
> I would like it to call the sub defined in the object $obj and print
> This is an object method.
>
> I came up with the following solution (this is a new implementation
> of method meth() in the class P):
>
> sub meth
> {
> my $self = shift;
> if ($self->{meth}) {
> &{$self->{meth}};
> } else {
> print "This is a class method.\n";
> };
>
> };
So you want a method that behaves one way when called as an object
method and another way if called as a class method?
You need a check that finds out what the invocant is (class or method)
without failing in one of the cases. That is the problem with your
approach -- it dies when called as a class method. Instead, check
whether the invocant is a reference. If it is, assume an object,
otherwise the class name. Untested:
sub meth {
my $whatever = shift;
if ( ref $whatever ) {
# got an object
$whatever->{ meth}->();
} else {
# class method call
print "This is an object method.\n";
}
}
Anno
------------------------------
Date: Mon, 02 Jul 2007 14:35:58 -0700
From: gaz_5_m@yahoo.co.uk
Subject: Re: PERL and Active DIrectory
Message-Id: <1183412158.624139.264210@k79g2000hse.googlegroups.com>
On Jun 28, 3:41 pm, Q...@domain.invalid wrote:
> gaz_...@yahoo.co.uk wrote in message-id: <1183058740.045092.304...@k79g2000hse.googlegroups.com>
>
> > Hi folks,
>
> > I was just wondering if anyone was using PERL to any great effect to
> > query Active DIrectory.
>
> > I'm in the middle of a fairly large project at work that requires
> > getting (constantly changing) info from AD. I was doing the same
> > things on a daily basis so thought it best to try and script it.
>
> > Is there any way to directly interrogate AD from within PERL. At the
> > moment, the only way I have been able to figure out is to use the
> > Windows Admin Pak to call:
>
> > open query, "dsquery group -name "x" | dsget group -members |";
>
> > from within the script and then use the piped output of the open
> > command to strip out the data that I want.
>
> > It works OK, just takes a hell of a long time!
>
> > The other issue I get is the default return size that is set in our AD
> > environment, 1000, so groups with any larger than 1000 users return
> > nothing.
>
> > I know you can get round this with VB, but PERL is my language of
> > choice! :-)
>
> > Anyone with any tips?
>
> Yeah you probably want to use Net::LDAP
> it is part of the perl-ldap package
> btw this will work with all major directory services
> Netscape, AD, NDS, and Solaris Directory
Thanks for that. I've been having a look at the LDAP library in PERL
but I'm not as proficient in OO coding as I used to be :-) so it might
take a little time.
One of the reasons I'm looking to change is the speed issues piping
things out to dsget and dsquery. Does using LDAP prove quite speedy
(especially for large queries)?
------------------------------
Date: Tue, 03 Jul 2007 01:47:53 GMT
From: QoS@domain.invalid
Subject: Re: PERL and Active DIrectory
Message-Id: <dVhii.14445$MR5.7744@trndny02>
gaz_5_m@yahoo.co.uk wrote in message-id: <1183412158.624139.264210@k79g2000hse.googlegroups.com>
>
> On Jun 28, 3:41 pm, Q...@domain.invalid wrote:
> > gaz_...@yahoo.co.uk wrote in message-id: <1183058740.045092.304...@k79g2000hse.googlegroups.com>
> >
> > > Hi folks,
> >
> > > I was just wondering if anyone was using PERL to any great effect to
> > > query Active DIrectory.
> >
> > > I'm in the middle of a fairly large project at work that requires
> > > getting (constantly changing) info from AD. I was doing the same
> > > things on a daily basis so thought it best to try and script it.
> >
> > > Is there any way to directly interrogate AD from within PERL. At the
> > > moment, the only way I have been able to figure out is to use the
> > > Windows Admin Pak to call:
> >
> > > open query, "dsquery group -name "x" | dsget group -members |";
> >
> > > from within the script and then use the piped output of the open
> > > command to strip out the data that I want.
> >
> > > It works OK, just takes a hell of a long time!
> >
> > > The other issue I get is the default return size that is set in our AD
> > > environment, 1000, so groups with any larger than 1000 users return
> > > nothing.
> >
> > > I know you can get round this with VB, but PERL is my language of
> > > choice! :-)
> >
> > > Anyone with any tips?
> >
> > Yeah you probably want to use Net::LDAP
> > it is part of the perl-ldap package
> > btw this will work with all major directory services
> > Netscape, AD, NDS, and Solaris Directory
>
> Thanks for that. I've been having a look at the LDAP library in PERL
> but I'm not as proficient in OO coding as I used to be :-) so it might
> take a little time.
>
> One of the reasons I'm looking to change is the speed issues piping
> things out to dsget and dsquery. Does using LDAP prove quite speedy
> (especially for large queries)?
Speed will largely be determined by things like the network and the
server.. that said it would likely be quickest to query the nearest DC.
------------------------------
Date: Mon, 02 Jul 2007 17:59:31 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: perl and php
Message-Id: <m2abuefovw.fsf@dot-app.org>
skywriter14 <sumonsmailbox@gmail.com> writes:
> Please tell me why there are tons of web sites made with PHP as
> compared to Perl or any other language, if PHP is worse than Perl and
> Ruby. How does it survive?
The same way McDonald's survives - by catering to people who don't realize
and/or don't care just how terrible it really is.
sherm--
------------------------------
Date: Mon, 2 Jul 2007 22:48:50 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Problem with PERL function
Message-Id: <f6bvhn.p8.1@news.isolution.nl>
Peter J. Holzer schreef:
> a perl string is essentially an array of 32 bit integers
> (but the utf-8 encoding may
> make accesses slow and updates in the middle even slower).
Yes, that is another projection of Perl strings. Putting substrings
(like with length 256 characters) in a Perl array would probably be less
slow.
Or use pack/unpack with the 'N' or 'J' template.
my $iMax = 1234567890; # maximum index +1
my $N = 256; # chunk size
my $B = 4; # octets per value
my @buf = (chr(0) x ($B*$N)) x (int($iMax/$N) + ($iMax%$N)?1:0);
my $i = 54321;
for ( substr $buf[int($i/$N)], ($i%$N)*$B, $B ) {
my $v = unpack 'N', $_;
$v ++;
$_ = pack 'N', $v;
}
(untested)
For the 'J' template, you would have to set $B dynamically, like from
length(pack("J", 0)).
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: Tue, 3 Jul 2007 09:18:34 +0530
From: "rajendra" <rajendra.prasad@in.bosch.com>
Subject: Reading time from an excel sheet.
Message-Id: <f6cg50$9jr$1@news4.fe.internet.bosch.com>
Hello All,
There is an excel sheet which has list of events given in time. I'm trying
to read this time using win32 module
When I do so, I get the time in General format (0.36525874).
But I want to read in hh-mm-ss. How can I achieve this?.
With Rgds,
Raj
------------------------------
Date: Mon, 2 Jul 2007 17:35:48 -0400
From: "Wade Ward" <invalid@invalid.nyet>
Subject: Re: unlurking
Message-Id: <JpKdnf4qX9ts8hTbnZ2dnUVZ_vCknZ2d@comcast.com>
"John Mason Jr" <notvalid@cox.net.invalid> wrote in message
news:138g2bj4v0dm579@news.supernews.com...
> Wade Ward wrote:
>> "Scott Bryce" <sbryce@scottbryce.com> wrote in message
>> news:sKudnR-Nm_42uhrbnZ2dnUVZ_v-tnZ2d@comcast.com...
>>> http://search.cpan.org/~gbarr/libnet-1.21/Net/NNTP.pm
> If you want both STDOUT & STDERR in the same file try >filename 2>&1
>
> Did you change
> my $nntp = Net::NNTP->new('news.example.com', { Debug=> => 1} );
>
> to have the name or ip address of your nntp server?
Changed that and still have "can't call method group."
#!/usr/bin/env perl
use strict;
use warnings;
use Net::NNTP;
my $nntp = Net::NNTP->new('newsgroups.comcast.net', { Debug => 1} );
$nntp->group('comp.lang.perl.misc')
or die "failed to set group c.l.p.m.\n";
my $msg_ids_ref = $nntp->newnews(time() - 24*60*60);
die "Failed to retrieve message ids\n" unless @{$msg_ids_ref};
open my $ofh, '>', 'articles.txt'
or die "Cannot open articles.txt: $!";
for my $msg_id (@{$msg_ids_ref}) {
$nntp->article($msg_id, $ofh)
or die "Failed to retrieve article $msg_id\n";
}
close $ofh;
__END__
Perl.exe is complaining about line 10, which is:
$nntp->group('comp.lang.perl.misc')
, which, I think we can all agree, exists. (?)
What did it avail me to put in my own newsserver if I don't also give it a
username and password?
--
Wade Ward
------------------------------
Date: Mon, 02 Jul 2007 17:07:06 -0700
From: Paul Lalli <mritty@gmail.com>
Subject: Re: unlurking
Message-Id: <1183421226.621074.45620@q69g2000hsb.googlegroups.com>
On Jul 2, 5:35 pm, "Wade Ward" <inva...@invalid.nyet> wrote:
> Perl.exe is complaining about line 10, which is:
> $nntp->group('comp.lang.perl.misc')
> , which, I think we can all agree, exists. (?)
> What did it avail me to put in my own newsserver if I don't also give it a
> username and password?
Does your NNTP server *need* a username and password? Mine does not,
which is why I didn't authenticate myself in my example.
As I said, the script I posted was to give you a start. It's time for
you to read the documentation for Net::NNTP, rather than asking
everyone to spoon-feed you the solution step by step.
Paul Lalli
------------------------------
Date: Mon, 02 Jul 2007 20:18:25 -0400
From: John Mason Jr <notvalid@cox.net.invalid>
Subject: Re: unlurking
Message-Id: <138j5eik8t84295@news.supernews.com>
Wade Ward wrote:
> "John Mason Jr" <notvalid@cox.net.invalid> wrote in message
> news:138g2bj4v0dm579@news.supernews.com...
>> Wade Ward wrote:
>>> "Scott Bryce" <sbryce@scottbryce.com> wrote in message
>>> news:sKudnR-Nm_42uhrbnZ2dnUVZ_v-tnZ2d@comcast.com...
>
>>>> http://search.cpan.org/~gbarr/libnet-1.21/Net/NNTP.pm
>
>> If you want both STDOUT & STDERR in the same file try >filename 2>&1
>>
>> Did you change
>> my $nntp = Net::NNTP->new('news.example.com', { Debug=> => 1} );
>>
>> to have the name or ip address of your nntp server?
> Changed that and still have "can't call method group."
> #!/usr/bin/env perl
> use strict;
> use warnings;
> use Net::NNTP;
>
> my $nntp = Net::NNTP->new('newsgroups.comcast.net', { Debug => 1} );
$nntp -> authinfo ( USER, PASS) or die "Authentication problem\n";
>
> $nntp->group('comp.lang.perl.misc')
> or die "failed to set group c.l.p.m.\n";
Perl.exe is complaining about line 10, which is:
> $nntp->group('comp.lang.perl.misc')
> , which, I think we can all agree, exists. (?)
> What did it avail me to put in my own newsserver if I don't also give it a
> username and password?
See above &
<http://search.cpan.org/~gbarr/libnet/Net/NNTP.pm>
John
------------------------------
Date: Mon, 2 Jul 2007 20:54:12 -0400
From: "Wade Ward" <invalid@invalid.nyet>
Subject: Re: unlurking
Message-Id: <GuWdnQ9ENozsAxTbnZ2dnUVZ_jednZ2d@comcast.com>
"Paul Lalli" <mritty@gmail.com> wrote in message
news:1183421226.621074.45620@q69g2000hsb.googlegroups.com...
> On Jul 2, 5:35 pm, "Wade Ward" <inva...@invalid.nyet> wrote:
>
>> Perl.exe is complaining about line 10, which is:
>> $nntp->group('comp.lang.perl.misc')
>> , which, I think we can all agree, exists. (?)
>> What did it avail me to put in my own newsserver if I don't also give it
>> a
>> username and password?
>
> Does your NNTP server *need* a username and password? Mine does not,
> which is why I didn't authenticate myself in my example.
>
> As I said, the script I posted was to give you a start. It's time for
> you to read the documentation for Net::NNTP, rather than asking
> everyone to spoon-feed you the solution step by step.
I've looked at whatever I could google with (NNTP scripts Perl)
chased perl links:
http://pub.ks-and-ks.ne.jp/prog/perl-bin.html
, and tried to make this work a hundred different ways without success
#!/usr/bin/env perl
#use strict;
use warnings;
use Net::NNTP;
my $nntp = Net::NNTP->new('newsgroups.comcast.net', { Debug => 1} );
$USER = 'zaxfuuq';
$PASS = 'redacted';
$nntp -> authinfo ( USER, PASS) or die "Authentication problem\n";
$nntp->group('comp.lang.perl.misc')
or die "failed to set group c.l.p.m.\n";
my $msg_ids_ref = $nntp->newnews(time() - 24*60*60);
die "Failed to retrieve message ids\n" unless @{$msg_ids_ref};
open my $ofh, '>', 'articles.txt'
or die "Cannot open articles.txt: $!";
for my $msg_id (@{$msg_ids_ref}) {
$nntp->article($msg_id, $ofh)
or die "Failed to retrieve article $msg_id\n";
}
close $ofh;
__END__
I don't seem to be able to get the value of USER or PASS into authinfo
properly. I'll check out a perl reference from the library tomorrow.
--
WW
------------------------------
Date: Tue, 03 Jul 2007 03:09:19 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: unlurking
Message-Id: <5etm3mF3abli4U1@mid.individual.net>
Wade Ward wrote:
>
> #!/usr/bin/env perl
> #use strict;
--^
> use warnings;
> use Net::NNTP;
>
> my $nntp = Net::NNTP->new('newsgroups.comcast.net', { Debug => 1} );
> $USER = 'zaxfuuq';
> $PASS = 'redacted';
>
> $nntp -> authinfo ( USER, PASS) or die "Authentication problem\n";
---------------------^-----^
> I don't seem to be able to get the value of USER or PASS into authinfo
> properly.
Don't post non-working code here that doesn't pass strictures!
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Mon, 02 Jul 2007 19:47:53 -0600
From: Scott Bryce <sbryce@scottbryce.com>
Subject: Re: unlurking
Message-Id: <FdidnXh2U8FaNxTbnZ2dnUVZ_vShnZ2d@comcast.com>
Wade Ward wrote:
> #!/usr/bin/env perl
> #use strict;
> use warnings;
> use Net::NNTP;
>
> my $nntp = Net::NNTP->new('newsgroups.comcast.net', { Debug => 1} );
I am on Comcast, and that is not what I use as the news server name.
Also, ask Perl to tell you whether this succeeds.
my $nntphost = 'news.comcast.net';
my $nntp = Net::NNTP->new($nntphost) or die "Cannot contact $nntphost: $!";
> $USER = 'zaxfuuq';
> $PASS = 'redacted';
>
> $nntp -> authinfo ( USER, PASS) or die "Authentication problem\n";
<code snipped>
> I don't seem to be able to get the value of USER or PASS into authinfo
> properly. I'll check out a perl reference from the library tomorrow.
You defined variables to contain your user name and password, but then
you didn't use them.
Have you read the docs for Net::NNTP yet? You have been given the URL twice.
------------------------------
Date: Tue, 03 Jul 2007 03:21:45 GMT
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: unlurking
Message-Id: <slrnf8jg2f.ob9.tadmc@tadmc30.sbcglobal.net>
Wade Ward <invalid@invalid.nyet> wrote:
> #use strict;
You lose all of the benefits of strict when you comment it out.
Had you uncommented it, then it would have exposed a bug
in your program.
Ask perl to help you
You can ask perl itself to help you find common programming mistakes
by doing two things: enable warnings (perldoc warnings) and enable
"strict"ures (perldoc strict).
You should not bother the hundreds/thousands of readers of the
newsgroup without first seeing if a machine can help you find your
problem. It is demeaning to be asked to do the work of a machine. It
will annoy the readers of your article.
> $USER = 'zaxfuuq';
> $PASS = 'redacted';
>
> $nntp -> authinfo ( USER, PASS) or die "Authentication problem\n";
> I don't seem to be able to get the value of USER or PASS
Possibly because those do not *have* any values.
Scalar variable names in Perl start with a dollar sign.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 611
**************************************