[11737] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 5337 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 9 07:07:36 1999

Date: Fri, 9 Apr 99 04:00:20 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 9 Apr 1999     Volume: 8 Number: 5337

Today's topics:
    Re: Accessing MS Access with perl <xrxoxtxhxdx@xrxoxtxhx.xnxextx>
    Re: Adding to @INC (Bart Lateur)
    Re: Can you stepthrough a Perl program? <Philip.Newton@datenrevision.de>
    Re: Cannot execute PerlScript in ASP <matthew.sergeant@eml.ericsson.se>
        ftp problem with NET::FTP <M.Roessiger@alcatel.de>
    Re: greping an associative array <kelly@pcocd2.intel.com>
    Re: HELP with Subsitution <dwight@trumbower.com>
    Re: HELP with Subsitution <dwight@trumbower.com>
    Re: Help! Missing first line..... <Philip.Newton@datenrevision.de>
    Re: Hotmail's Homepages stecomp@telusplanet.net
    Re: Latest AdminMisc and ActiveState's perl <xrxoxtxhxdx@xrxoxtxhx.xnxextx>
        Move from IIS, ASP, COM, Java to Linux, Apache, mod_per (Steve Moon)
        Perl COM <gary@wics.demon.co.uk>
        perl regular expression (Nick Allan)
    Re: pragma <Philip.Newton@datenrevision.de>
    Re: Privacy for slaves forced to use a proxy/firewall t (Ran)
    Re: Problems posting with Net::NNTP gavin@my-dejanews.com
    Re: random number ( -w ) <Philip.Newton@datenrevision.de>
    Re: Returning "undef" from a subroutine. Appears broken (Larry Rosler)
        Seeking Ace CGI/Perl Programmer for Serious LTR aciplus@my-dejanews.com
    Re: system-command under Win98 (Matti Johannes Kdrki)
        Where can find bulletin or guestboard source? (8717561)
        Win-32 / Unix CGI question <nospampjukel@usa.net>
        Y2K (yes, again - sorry!) <matthew.sergeant@eml.ericsson.se>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 9 Apr 1999 02:12:40 -0700
From: "Dave Roth" <xrxoxtxhxdx@xrxoxtxhx.xnxextx>
Subject: Re: Accessing MS Access with perl
Message-Id: <OtjP2.96$Lm4.30280@news1.giganews.com>

John Warner wrote in message <370A6C17.F9D479BD@tivoli.com>...
>Actually, getting the DBI modules to work from a Unix box to an MS server
is
>just like working with any other DBD module.  The important key is setting
>up the equivalent of a System DSN on your Linux box that points to the MS
>server.  (Not that I know how to do that--it's always been done by someone
>else ahead of me...anyone?)  Once the DSN is defined, you should be off to
>the races.
>
>Greg Griffiths wrote:
>
>> I suggest that you take a look at DBI as you are running on a Linux
>> server, although if you can get a windows server running take a look at
>> ODBC.pm from http://www.roth.net/odbc/ although I'm quite sceptical
>> about getting an MS Access db to run under a unix like environment.
>> either convert your DB or your server is probably the best bet, although
>> give it a try first, as I know that Access & Unix don't mix, although I
>> assume that includes Linux ?!
>>
>> Patrick wrote:
>> >
>> > Hi,
>> >
>> > Can someone tell me how to read a ms-access database with perl on a
>> > Linux (redhat 5.1) server.
>> >
>> > Thank,
>> > Patrick G.

John you are correct about the system DSN. However the problem here
comes from the issue that the MS Access uses a single tier ODBC driver.
Unlike SQL Serer a Linux box won't be able to submit a query to a
server process. Unless, that is, that you want to write some Win32
daemon which runs which your Linux box could submit queries to. Hmmmm.

I am unaware of any non Microsoft platform based Access ODBC driver.
dave

--
=================================================================
Dave Roth                                ...glittering prizes and
Roth Consulting                      endless compromises, shatter
http://www.roth.net                     the illusion of integrity
Win32, Perl, C++, ODBC, Training
rothd at roth dot net

Our latest Perl book is now available:
"Win32 Perl Programming: The Standard Extensions"
http://www.roth.net/books/extensions/





------------------------------

Date: Fri, 09 Apr 1999 07:27:14 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Adding to @INC
Message-Id: <370fa4a1.1460016@news.skynet.be>

Scott Ranzal wrote:

>I would like to add to the directories that have been established for
>searching for Perl libraries.  I am currently doing the additions within the
>scripts, but have several directories that I would like to add on a full
>time basis for every script.
>
>Is there a way to do this ?

Set the PERLLIB or (evrriding) the PERL5LIB environment variable to your
paths, in the same manner as the PATH environment variable is set.
Doesn't work if taint checking is on (-T).

	Bart.


------------------------------

Date: Fri, 09 Apr 1999 12:00:37 +0200
From: Philip Newton <Philip.Newton@datenrevision.de>
Subject: Re: Can you stepthrough a Perl program?
Message-Id: <370DCFC5.F075721B@datenrevision.de>

apriya@my-dejanews.com wrote:
> 
> I hope it works..

You mean you didn't try it out?

Cheers,
Philip


------------------------------

Date: Fri, 09 Apr 1999 09:15:12 +0100
From: Matt Sergeant <matthew.sergeant@eml.ericsson.se>
Subject: Re: Cannot execute PerlScript in ASP
Message-Id: <370DB710.7F6B9BAC@eml.ericsson.se>

ncollins1@my-dejanews.com wrote:
> 
> I installed ActivePerl on my WinNT (IIS 4.0) server.  I want to be able to
> send an mail message from a form.  For testing I hardcoded variable's values
> (once this works I will pass them from the form).  I am not able to run the
> below .asp page when the .html form is submitted.  However when I copied the
> PerlScript code into .pl file (deleted the <% and %> tags) and ran it from
> the command line the email was successfully send.  So my guess is that ASP
> does not know where to look for PerlScript on my computer.  How can I make
> ASP know about PerlScript location?

You need to give more information.

What version of ActivePerl?
What error message?
What makes you think it's because ASP doesn't know about the "PerlScript
location"?

-- 
<Matt email="msergeant@ndirect.co.uk" />

| Fastnet Software Ltd              |   Perl in Active Server Pages   |
| Perl Consultancy, Web Development |   Database Design   |    XML    |
| http://come.to/fastnet            |    Information Consolidation    |


------------------------------

Date: Fri, 09 Apr 1999 10:31:14 +0200
From: Martin Roessiger <M.Roessiger@alcatel.de>
Subject: ftp problem with NET::FTP
Message-Id: <370DBAD2.8680D45@alcatel.de>

hello,

I have some problems with the above perl-module:
What i want to do is, to put a  jcl-file from Unix (Solaris 5.5)to MVS (IBM
mainframe) . My script is like that:

      $ftp = Net::FTP->new("host");
      $ftp_status = $ftp->login("user","PW");
      $ftp_status = $ftp->ascii;

      $ftp_status = $ftp->quot("site filetype=jes");
      $ftp_status = $ftp->put("$jcl_act_file");
      @ftp_out = $ftp->dir;
      print "FTP-Out : \n@ftp_out\n";
      $ftp_status = $ftp->quit;

When i check the status of the subcommands , everything seems to be ok., but
there is no job done on remote host. Also the dir-subcommand
says "
FTP-Out : 
No jobs found on Held queue
When i comment the quot-subcommand and just put the file to the
remote host, i  can find it there, but it is empty , so
i assume that this is a problem in the transfer-mode ?

I would like to thank everybody , who has an idea about this
problem in advance.
-- 
************************************************************************
*  Kind regards        A l c a t e l   SEL                             *
*   Martin Roessiger   Dept. :   VS/EFB4                               * 
*                      Tel.  :   +49 711 821 41871                     *
*                      Email :   mailto:M.Roessiger@alcatel.de         *
************************************************************************


------------------------------

Date: 09 Apr 1999 00:32:52 -0700
From: Michael Kelly - FVC PCD VET ~ <kelly@pcocd2.intel.com>
Subject: Re: greping an associative array
Message-Id: <us2ogkymeor.fsf@fht002.fm.intel.com>

Ken Nagorski <rocket@nacs.net> writes:

> 
> I am new to perl, and programing for that matter, what I am trying to
> figure out is if you can grep an associative array same as a standard
> array as in grep(/$var/, @array); works, grep(/$var/, %array); does
> not.  Also I am having trouble loading an open file into an associative
> array,
>     open(FILE,  myfile);
>     @array = <FILE>;   works
> 
>     open(FILE, myfile);
>      %array =  <FILE>; doesn't, what am I missing? If someone could
> offer a little insight I would appreciate it.
> 
> Thank you
> Ken N
> 

	Ken,

	A hash is a list of keys pointing to a list of values.  There
is probably a way to load the hash as you are trying to do in your
example.  But I've not used it.  You don't grep a hash, you call out
the key and the value is returned.  The O'reilly book 'Advanced Perl
Programming' is the best for data structures.  Data structures are in
CH1, I have never read past CH1.


-- 
Not speaking for Intel
Michael Kelly (the one in Folsom)


------------------------------

Date: Fri, 9 Apr 1999 05:11:57 -0400
From: "Dwight Trumbower" <dwight@trumbower.com>
Subject: Re: HELP with Subsitution
Message-Id: <923649646.357668@proxy1.bigplanet.com>

I see why it doesn't work but orginally didn't. At one time I tried the
lookhead but got double |||| for one ||. I must of goofed something else up.

Thanks


Dmitry Epstein <mitiaNOSPAM@nwu.edu.invalid> wrote in message
news:370e6a28.42698282@news.acns.nwu.edu...
> On Thu, 8 Apr 1999 20:56:09 -0400, "Dwight Trumbower"
> <dwight@trumbower.com> wrote:
> >I'm using the following try to replace "| spaces |" with "||" in multiple
> >files.. The following doesn't quite work. It only does every other
instance.
> >ex: |         |         | sdffdff|     |  becomes ||       | sdffdff||.
It
> >should be ||| sdffdff||.
> <snip>
> >while (<>) {
> >    s/\| *\|/\|\|/g;      # string to search for and replace
>
> I guess you should use zero-width look-ahead and look-behind
> assertions:
>
> $s = '|         |         | sdffdff|     |';
> ($x = $s) =~ s/(?<=\|)\s+(?=\|)//g;
>
> The way you did it, after the first substitution is made for
> '|         |'
> the remaining part of the string is
> '         | sdffdff|     |'
> See why this doesn't work?
>
>
> Remove NOSPAM and .invalid from mitiaNOSPAM@nwu.edu.invalid




------------------------------

Date: Fri, 9 Apr 1999 05:20:18 -0400
From: "Dwight Trumbower" <dwight@trumbower.com>
Subject: Re: HELP with Subsitution
Message-Id: <923649654.516946@proxy1.bigplanet.com>

No insult taken. It took me a week to realize that '|' was not being
searched again. The funny thing is I test the original and it worked for the
file I was testing. I must not of had a repeating |  |  | in the file.

I'm going to have to start saving all versions of my scripts. At one time I
had  s/\| +(?=\|)/|/g; but it didn't work right. So apparently I had
something wrong. I just played with + vs * and I get the same result, sot
that wasn't it. My original script before yesterday used the +.


I love learning on the fly for production work. You always learn enough to
be dangerous but not enough to know exactly what you are doing.


Thanks for the help

--
Dwight Trumbower
Trumbower Computer Consulting




Sam Holden <sholden@pgrad.cs.usyd.edu.au> wrote in message
news:slrn7gr4b9.376.sholden@pgrad.cs.usyd.edu.au...
> On Thu, 8 Apr 1999 22:11:34 -0700, Larry Rosler <lr@hpl.hp.com> wrote:
> >
> >Sam also showed another solution, based on look-ahead, which with a
> >minor improvement I consider to be a superior choice:
> >
> >    s/\| +(?=\|)/|/g;
>
> Damn, I should have changed that star to a plus...
>
> Yet again I provide evidence that I almost always seem to write my posts
> backwards... I wrote the lookahead one first by simply adding the
> lookahead bit to the original, since that was the first solution that
jumped
> into my brain.
>
> Then I thought, that there was another obvious[1] solution without
lookahead...
> So I removed the /g and added the while - and created an infinite loop.
Then
> I changed the * to a + (I should have gone back and changed the first
solution
> too - oh well). I like showing that TMTOWTDI when possible - one day I'll
stop
> with the first solution I think of and then I might actually get to answer
> before Mr Rolser...
>
> 1. I hope that doesn't sound like I'm insulting the original poster. The
fact
> that the original didn't work because the '|' is both a starting and
ending
> character and thus gets 'gobbled up' by the first match is only obvious if
> you realise that that is how regular expressions work. It is not obvious
if
> you aren't very familiar with regular expressions (and how they work).
>
> --
> Sam
>
> I took the initiative in creating the Internet.
> --Al Gore




------------------------------

Date: Fri, 09 Apr 1999 12:26:11 +0200
From: Philip Newton <Philip.Newton@datenrevision.de>
Subject: Re: Help! Missing first line.....
Message-Id: <370DD5C3.F2FF068B@datenrevision.de>

David Efflandt wrote:
> 
> Try:
> 
> open(UPDF,"$workfile"); @upd=<UPDF>; close UPDF;

Still no error checking. And since he's going to do a foreach() on @upd,
he might as well read in the file line-by-line, as Jonathan noted.

Cheers,
Philip


------------------------------

Date: Fri, 09 Apr 1999 06:31:29 GMT
From: stecomp@telusplanet.net
Subject: Re: Hotmail's Homepages
Message-Id: <370DBA9B.B4AF2EBC@telusplanet.net>

has something to do with the placement of the comment characters <!-->
i read it somewhere and forgot, but there was a way to hide script
hopefully this note will jar someone elses memory.


Patrick Fong wrote:

> Hi
>
> I know the answer to this question may violate copyright laws, but perhaps
> someone could give me a hint about the answer.
>
> If anyone has been to Hotmail.com, and tried to view the source to their
> homepages, you will not be able to. How does someone protect other people
> from viewing the source to their homepages? (I have seen this question in
> a FAQ at irt.org and the answer is you cant).Perhaps someone would know? I
> am very interested in it because of the security issues involved in it.
>
> Oh btw, where can I find out about protecting pages from being viewed? As
> in password protect a page? I know of JavaScript capabilities and to some
> extent Perl. I have looked in developer.netscape.com and found nothing and
> also Perl.com. Perhaps someone who is doing WWW stuff professionally may
> be able to point me in the right direction.
>
> Tnx in advance
>
> P.
>
> *************************************************************************************
> So how?
>
> *************************************************************************************





------------------------------

Date: Fri, 9 Apr 1999 02:03:22 -0700
From: "Dave Roth" <xrxoxtxhxdx@xrxoxtxhx.xnxextx>
Subject: Re: Latest AdminMisc and ActiveState's perl
Message-Id: <3ljP2.92$Lm4.29563@news1.giganews.com>

Andrew Haveland-Robinson wrote in message
<371871f1.94134000@news.demon.co.uk>...
>I'm trying to get the latest version of AdminMisc to work with
ActiveState's
>Perl 514.
>
>I've installed N versions of perl and adminmisc, and found that the CORE
>version and Dave's latest adminmisc does what I want, but then I can't use
>some other modules that I need.
>The adminmisc supplied with the AS514 and PPM AdminMisc package are
>hopelessly out of date. (I need Win32::AdminMisc::GetUsers and
>Win32::NetAdmin::LocalGroupAddUsers which aren't in the bundled adminmisc)
>
>I've downloaded Dave Roth's latest version that claims to be for AS 511,
but
>it contains files that bear no apparent relation to what ActivePerl has in
>its directories. What AS version are these for then?
>
>From the readme:
>
>    - IF you are using the ActiveState version of Win32 Perl:
>        a) Copy the ADMINMISC.PM file into the directory perl\lib\win32\
>        b) Rename the file ADMINMISC_XXX.PLL to ADMINMISC.PLL
>        c) Make a directory: perl\lib\auto\win32\adminmisc\
>        d) Copy the ADMINMISC.PLL file into the directory in step c
>
>What are pll files? ActiveState uses dll files!
>
>What's the point of AdminMisc_Build_311.zip if it won't work with AS311?
>
>I had more luck with AdminMisc_Build_5_005.zip, which surprisingly works
>with AS514, but you'd never guess from the filename! It wants the files in
a
>different place to where the older bundled modules are already.
>Now AS justs needs to get CGI.pm v2.50 included in the next release.
>
>I think there's still some consolidation and synchronisation required here.
>
>Andy.

Andy,
Keep reading in the README file:

 - IF you are using the ActiveState 5.005 version of Win32 Perl:
    a)  Copy the ADMINMISC.PM file into the directory
          site\lib\win32\
    b)  Rename the file ADMINMISC_005.DLL to ADMINMISC.DLL
    c)  Make a directory:
          site\lib\MSWin32-x86-object\auto\win32\AdminMisc
    d) Copy the ADMINMISC.DLL file into the directory in step c

    ALTERNATIVELY if you are using ActivePerl (or core perl 5.005 with
    PERL_OBJECT defined):
    a) run the Perl Package Manager:
       perl ppm.pl install
http://www.roth.net/perl/packages/win32-adminmisc.ppd

The last option (using ppm.pl) is by far the easiest.

The latest binary (19990407) was built against ActivePerl build 509, not
511.

Cheers,
dave

--
=================================================================
Dave Roth                                ...glittering prizes and
Roth Consulting                      endless compromises, shatter
http://www.roth.net                     the illusion of integrity
Win32, Perl, C++, ODBC, Training
rothd at roth dot net

Our latest Perl book is now available:
"Win32 Perl Programming: The Standard Extensions"
http://www.roth.net/books/extensions/





------------------------------

Date: Fri, 09 Apr 1999 10:17:25 GMT
From: smoon@no.spam.davisvision.com (Steve Moon)
Subject: Move from IIS, ASP, COM, Java to Linux, Apache, mod_perl, Java?
Message-Id: <VskP2.517$zE3.14835@typhoon.nycap.rr.com>

Hi,

I currently have a system that uses Java Middleware to connect to a back-end 
host using 3270 screen scraping. The UI is all done in vbscript and ASP pages. 
ASP can instantiate the java objects using COM, so getting data in and out is 
quite easy. This works quite well, but in the spirit of fixing things that 
ain't broke:

I would _LOVE_ to move this system over to Perl (vbscript sucks) and at the 
same time dump NT in favor of Unix -- probably Linux.

How can I instantiate the java objects from within Perl, and more specifically, 
from within mod_perl? 

Any help appreciated in advance.

Thanks!
Steve-



------------------------------

Date: Fri, 9 Apr 1999 11:53:31 +0100
From: "Gary Land" <gary@wics.demon.co.uk>
Subject: Perl COM
Message-Id: <923655221.12120.0.nnrp-10.c2debcd8@news.demon.co.uk>


We have been using a PerlCOM.Script object through VB 4.
When closing the VB4 application PerlCOM.DLL GPFs.

Tried testing with this simple VB4 program and it still GPFs on exit.


Dim objPerl

Set objPerl = CreateObject("PerlCOM.Script")

Set objPerl = Nothing


This example means that No subPerlCom objects have been used.  The PerlCom
is actually doing nothing except instancing and then destroying, so it
should not crash?

Tried the PRK service pack from Active State now we cannot actually register
the PerlCom object.

Help needed.

system info:
Perl 5.005
win 95
VB4






------------------------------

Date: 9 Apr 1999 08:53:57 GMT
From: guardian@silas-2.cc.monash.edu.au (Nick Allan)
Subject: perl regular expression
Message-Id: <7ekf75$lj9$1@towncrier.cc.monash.edu.au>


Hi all
I hope someone can help me with a perl regular expression.
I'm trying to do the following
I want to get a regular expression that will do the following. I have a string
such as
Content-Type: Text/Plain
Which is a valid string and do not want to match on it, but I have another
string
Content-Type: Multi/Mixed
which is an invalid string. Actually anything that has Content-Type: and does
not have Text/Plain after it is invalid.
How do I get a regexp to only match on content-Type: not text/Plain?

Thanks in advance for any suggestions.

Regards nick



------------------------------

Date: Fri, 09 Apr 1999 12:32:13 +0200
From: Philip Newton <Philip.Newton@datenrevision.de>
Subject: Re: pragma
Message-Id: <370DD72D.E1971224@datenrevision.de>

Sam Holden wrote:
> 
> A simple 'The cgi is written in perl.' is the most common.

Although why people persist in wanting to write Common Gateway
*Interfaces* in Perl (or any other language for that matter) is beyond
me (and beyond the topic of this froup).

Cheers,
Philip


------------------------------

Date: Fri, 09 Apr 1999 08:44:45 GMT
From: ran@netgate.net    (Ran)
Subject: Re: Privacy for slaves forced to use a proxy/firewall to access the net?
Message-Id: <923647485.631.6@news.remarQ.com>

In <7ejqpi$ibv$1@nnrp1.dejanews.com>, foj@nym.alias.net writes:

>All the tight-assed admin will see is a link to a certain IP address or web
>site, and packets that look like gibberish in the data area.

And,  of course,  s/he will immediately lose all interest in what's 
contained in those packets.

>Employees have a copyright over their emails

Not the ones produced on company time,  they don't.  And not the ones 
produced "off the clock" using company resources,  if you happen to live
in California (and probably most other jurisdictions, but that happens
to be where I work, so that's the one I familiarized myself with).

> - and yet employers monitor
>them. 

Which has nothing to do with copyright.

>I consider
>uncensored net access at my work to be a requirement for my presence.

How nice of the folks at DejaNews to provide that little perk.  You
should stay on their good side:  you're not likely to find it at many 
other employers.  Of course,  they make you put their little banner ad 
on everything you post,  but that's a small price to pay for all that 
free porn,  eh?

Um,  you *do* work for DejaNews,  right?  You're not posting this from 
there,  using a proxy server in Italy,  and directing email replies to 
an anonymous remailer,  because *you* want help circumventing a firewall
at work,  right?  Of *course* you aren't.

>I want the same to be available to all who are locked away in little cubicals

Personally,  I'd expect them to be a lot more interested in key-making 
machines than websurf-cloaking...

>It seems there are a lot of similarities between totalitarian countries and
>father-knows-best tight-assed companies who censor their employees Internet
>activities.

Only to someone so abysmally ignorant and self-centered he has no idea 
how soft a life he's got.

>It's time for the cubical slaves to fight back!

Hmmm,  what sort of tactics could cubical slaves use?  Get someone to 
stack them into a big tower,  so they could tip over and fall on their 
enemies?

>Yes it IS going to happen in my case, and I'm going to fight for the
>availability of such technologies for others as well.

No doubt the people trying to avoid being captured and tortured by the 
secret police will be eternally grateful for your sharing the tools you 
developed so you could sneak out for a little mid-afternoon 
cyber-nookie...

>Learn to trust your employees enough to leave them alone.

Learn to be worthy of that trust,  by not skulking around like a thief, 
trying to learn how to steal what you can't obtain through honest
negotiation.

Ran




------------------------------

Date: Fri, 09 Apr 1999 10:46:31 GMT
From: gavin@my-dejanews.com
Subject: Re: Problems posting with Net::NNTP
Message-Id: <7eklq6$849$1@nnrp1.dejanews.com>

Hi,

why when you add text to your array "@lines" are you spelling the elements
as "$linhas"? Is that just a typo?

Gavin


In article <3709EA65.4C31E13F@despodata.pt>,
  =?iso-8859-1?Q?Jo=E3o?= Bonina <joaob@despodata.pt> wrote:
> This is a multi-part message in MIME format.
> --------------117A856122D5615B4C75737F
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> --------------117A856122D5615B4C75737F
> Content-Type: message/rfc822
> Content-Transfer-Encoding: 8bit
> Content-Disposition: inline
>
> X-Mozilla-Status2: 00000000
> Message-ID: <3709DA32.581EA4B9@despodata.pt>
> Date: Tue, 06 Apr 1999 10:56:02 +0100
> From: =?iso-8859-1?Q?Jo=E3o?= Bonina <joaob@despodata.pt>
> X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.0.36 i686)
> X-Accept-Language: en
> MIME-Version: 1.0
> Newsgroups: comp.lang.perl.modules
> Subject: Problems posting with Net::NNTP
> Content-Type: text/plain; charset=iso-8859-1
> Content-Transfer-Encoding: 8bit
>
> 	Hi!
> 	I'm writing a perl script for posting and using the Net::NNTP module.
> According to Perl Cookbook, all I would need was
>
> 	$newsserver->post( @lines )
> 		or die "Can't post: $!\n";
>
> but I always get the "Can't post" error message and no errno value.
> 	The @lines table goes like this:
>
> $linhas[0] ="Relay-Version: version 0.1; site mysite.pt";
> $linhas[1] ="Posting-Version: version 0.1; site mysite.pt";
> $linhas[2] ="From: joaob\@despodata.pt (Joco Bonina)";
> $linhas[3] ="Date: $data";
> $linhas[4] ="Newsgroups: alt.test";
> $linhas[5] ="Subject: test-pl";
> $linhas[6] ="Reply-To: joaob\@despodata.pt";
> $linhas[7] ="Organization: myorg";
> $linhas[8] =" ";
> $linhas[9] ="This is";
> $linhas[10] ="a test";
> $linhas[11] =".";
>
> 	If anyone had the patience to get to this point so far, please would
> you tell me what am I missing here? Thanks in advance!
>
> --------------117A856122D5615B4C75737F--
>
>

------------------------------<>
Gavin Kuiper

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


------------------------------

Date: Fri, 09 Apr 1999 12:02:16 +0200
From: Philip Newton <Philip.Newton@datenrevision.de>
Subject: Re: random number ( -w )
Message-Id: <370DD028.239057D4@datenrevision.de>

Daniel Grisinger wrote:
> 
> YHBT

add: YHL

> HAND

U2

Cheers,
Philip


------------------------------

Date: Thu, 8 Apr 1999 23:10:13 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Returning "undef" from a subroutine. Appears broken in my latest version.
Message-Id: <MPG.1177399b20d1a773989875@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <ixk7lrmygok.fsf@rational.com> on Thu, 8 Apr 1999 20:56:43 
GMT, Tim Butler <tbutler@rational.com >says...
>    Should the test below print "defined" or "undefined?" I think the
> latter, but my latest perl build prints the former. I just want to
> make sure I'm right, and that the "foo_perl" below is broken.
> 
> Thanks!
> 
> ----------
> #!/usr/local/bin/perl
> 
> sub func {
>     return undef;
> }
> 
> %f = func();
> 
> if (defined %f) { 
> 	print "defined\n"; 
> } else {
> 	print "undefined\n";
> }

The test should print "defined", because the hash %f is defined.  It has 
one element, whose key is the null string, and whose value is undef.

This would be a lot clearer if you ran your test with the '-w' flag, 
which would inform you that there was an odd number of assignments to 
the hash and that an uninitialized value was used on the same line.  
(That diagnostic should be 'an undefined value', but that is a different 
thread.)

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Fri, 09 Apr 1999 09:23:29 GMT
From: aciplus@my-dejanews.com
Subject: Seeking Ace CGI/Perl Programmer for Serious LTR
Message-Id: <7ekgud$4dl$1@nnrp1.dejanews.com>

Seeking Ace CGI/Perl Programmer for Serious LTR

Me: Innovative consumer-oriented Website, featuring free tips in 21 different
categories, delivered automatically by email: daily, weekly or MWF.
CGI-challenged, financially stable.

You: Mature, responsible, expert CGI/Perl programmer, experienced with
subscription delivery systems. Willing to adopt the results of previous
relationship, interested in serious LTR. Must be available immediately.

Reply to posting address here. References required.

http://www.CyberTip4theDay.com/

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


------------------------------

Date: 9 Apr 1999 05:54:47 GMT
From: makarki.NOSPAM@news.hit.fi (Matti Johannes Kdrki)
Subject: Re: system-command under Win98
Message-Id: <7ek4n7$ocu$1@news.hit.fi>

David Cassell (cassell@mail.cor.epa.gov) wrote:
: > starting the Explorer. My perl script stops for about ten seconds and it
: > seems that the Perl interpreter is doing nothing. What is causing that
: > delay? And how can I get rid of it?
: > 
: > Thanks in advance for all help. This 'feature' is very annoying.
:
: Yes, I can believe that.  The feature is not in Perl but in your system.
: You shouldn't be seeing a noticeable difference in time.  How many megs
: of
: RAM memory do oyu have on your system?  There could be any number of
: causes, but one possibility I have seen before is using enough RAM that
: the system has to do some swapping to disk first before opening the next
: program.  And writing to disk is of course a big bottleneck.

I have 64 megabytes RAM and the system is not doing any swapping when
system() tries to launch Explorer.

After a few tests I noticed that the problem isn't with Perl Interpreter
itself. The delay occures only when I'm using Tk module. The module is
downloaded from ActiveStates own package library.

Is there some Tk specific way to call system() ?


--

Matti J. Kdrki


------------------------------

Date: 9 Apr 1999 08:45:58 GMT
From: szlee@csie.nctu.edu.tw (8717561)
Subject: Where can find bulletin or guestboard source?
Message-Id: <7ekeo6$jlv$2@netnews2.csie.nctu.edu.tw>

	I hear many source codes are free in internet

	but i can't find them ,

	can anyone tell me where i can find them.. 

	thankx a lot .. 

	

--
===========================================================================
=									  =
= Name!JRoman Lee ('u7s?A)		     			          =
= E-mail!Jszlee@csie.nctu.edu.tw				          =
=    	 								  =
= Dep!JComputer Science and Information Engineering			  =
=      National Chiao-Tung University					  =	
=									  =
===========================================================================


------------------------------

Date: Fri, 9 Apr 1999 10:32:09 +0200
From: "Peter Jukel" <nospampjukel@usa.net>
Subject: Win-32 / Unix CGI question
Message-Id: <7ekdl8$7f5$1@news3.saix.net>

Hi there

can anyone tell me if it is possible to develop a CGI perl script on a
Windows 95 machine and run it on a UNIX web server?

Regards

Peter




------------------------------

Date: Fri, 09 Apr 1999 09:18:59 +0100
From: Matt Sergeant <matthew.sergeant@eml.ericsson.se>
Subject: Y2K (yes, again - sorry!)
Message-Id: <370DB7F3.6DC4C186@eml.ericsson.se>

Someone mailed me directly the other day (like I'm some kind of
authority on the subject!) asking me for a statement as to whether perl
was y2k compliant. I gave the standard answer, and the URL on
www.perl.com.

Then they asked me to fax a company letter letter headed statement
stating what I had said. Obviously my company isn't in that business
(scares the pants off me being liable for some company's y2k compliance)
and I don't want to do that, so can someone give me some clues as to
what to tell them - or alternatively I can just ignore this person...

-- 
<Matt email="msergeant@ndirect.co.uk" />

| Fastnet Software Ltd              |   Perl in Active Server Pages   |
| Perl Consultancy, Web Development |   Database Design   |    XML    |
| http://come.to/fastnet            |    Information Consolidation    |


------------------------------

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 5337
**************************************

home help back first fref pref prev next nref lref last post