[7981] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1606 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 9 09:09:21 1998

Date: Fri, 9 Jan 98 06:01:13 -0800
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 Jan 1998     Volume: 8 Number: 1606

Today's topics:
     Re: [Help] How to span a perl PACKAGE over multiple sou tobez@plab.ku.dk
     Re: Arrgghhhhh! There must be a simple solution to this (James Robshaw)
     Re: Camel Critiques: PERL: THE PROGRAMMER'S COMPANION <joseph@5sigma.com>
     controlling browser window propertys? <mikael.henrikson@edt.ericsson.se>
     Crypt() on Win32 (Jasper)
     Help! Perl.lib corrupt/invalid when compiling embeded p <pxharding@csi.com>
     How to read/write data to com port under Linux (Fred J Keller)
     How to setup IIS to run perl? <itsam@polyu.edu.hk>
     Re: How to setup IIS to run perl? (Jeremy D. Zawodny)
     Re: How to setup IIS to run perl? <webmaster@fccj.cc.fl.us>
     How to view NT Eventviewer in Perl <angyny@interport.net>
     Re: Interprocess Communication <ajaym@hooked.net>
     Re: language <webmaster@fccj.cc.fl.us>
     Re: match weirdness - $_++ vs. $_ + 1 <kortbein@iastate.edu>
     NT and Security / Registry <fgint@dial.oleane.com>
     once again print SOCK "Whatever"; <bugalats@trick.informatik.uni-stuttgart.de>
     Pattern Matching <AndieC@msn.com>
     Re: Pattern Matching <rjc@liddell.cstr.ed.ac.uk>
     Re: Perl CGI - Apache 1.2 (Fred J Keller)
     Re: Perl programming with NT4.0: sendmail problem <dformosa@st.nepean.uws.edu.au>
     Perl Resources <orangutan@grungyape.com>
     Pipes in Perl5 on WindowsNT jola@hem.passagen.se
     Re: Pipes in Perl5 on WindowsNT (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
     Re: print SOCK "Whatever"; <bugalats@trick.informatik.uni-stuttgart.de>
     Re: recomended Perl books ? <pdcawley@bofh.org.uk>
     Re: Review of CGI/Perl book <joseph@5sigma.com>
     Server error 500 <turboman34@hotmail.com>
     Re: Simple array initialisation question <webmaster@fccj.cc.fl.us>
     simple perl script to add directory to PATH if not ther (Randy Bey)
     Sockets on NT , a problem... <bob@b-tech.net>
     Re: Telnet client written in perl <webmaster@fccj.cc.fl.us>
     Re: Testing for valid RegExps? (Clay Irving)
     Re: Unix perl shell ??? (Justin Vallon)
     Win32::NetResource::NetShareGetInfo Return always 0 <fgint@dial.oleane.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Fri, 09 Jan 1998 12:30:32 +0100
From: tobez@plab.ku.dk
Subject: Re: [Help] How to span a perl PACKAGE over multiple source files ?
Message-Id: <34B60A58.6237@plab.ku.dk>

Tarang K. Patel wrote:

>  As per subject line, I desire to create a "package" that spans multiple
>  source files. According to the Camel book one can do just this but does
>  not show how ?

No problems:

file1.pm
---
package A;
 ...
sub f1 {..}
 ...

file2.pm
package A;
 ...
sub f2 {..}
 ...

main.pl
use file1;
use file2;
# or, probably, require them
print A::f1() + A::f2();


The same works if A represent an object.

>  Also if one can have "multiple" packages source in a single module (.pm)
>  file then :
> 
>   1) How does one declare the "use" statement ?

use File::Name;

>   2) What is the naming convention that one has to follow for the packages
>      aftre the first package ?

None.

>  file1
>  ------
> 
>  package Visual::A;
>  ..
> ....
>  (some_perl_code)
>  ....
>  package B;
>  ....
>  ....
>  (some_perl_code)
>  ....
>  package C;
> 
> 
>  file 2
>  ------
> 
>  use Visual::A;

Don't use Visual::A, use file1 instead.

>   3) How do I ensure the symbol tables for "package C" are accessed here ?

C::names

Hope this help,

Anton.

P.S.  One of my .pm files contains 28 separate packages.  It works all
right.


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

Date: Fri, 09 Jan 1998 09:14:08 GMT
From: james@NOSPAMrobshaw.zynet.co.uk (James Robshaw)
Subject: Re: Arrgghhhhh! There must be a simple solution to this script error
Message-Id: <694ps4$c3h$1@sol.zynet.net>

james@NoSpamrobshaw.zynet.co.uk (James Robshaw) wrote:

>Can anyone please point me in the right direction.
>
>I have a perl script that works fine until I try to edit this particular
>line from=20
>
><SNIP>

Many thanks to all that replied.

My problem is now solved, and I have now learnt something new!

James.




james@NOSPAMrobshaw.zynet.co.uk


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

Date: Fri, 09 Jan 1998 02:00:21 -0700
From: "Joseph N. Hall" <joseph@5sigma.com>
Subject: Re: Camel Critiques: PERL: THE PROGRAMMER'S COMPANION
Message-Id: <34B5E720.B5DE24DF@5sigma.com>

I should amend this comment.  I stopped by a bookstore and browsed
a copy again.  Only about 2 minutes, but I decided the layout was 
reasonable.  I don't like the single quote characters, but that's minor.
I must have been thinking of some other hideously ugly book, because
at worst the Companion looks just "plain."  Whether it makes sense or
not I can't say yet, but nothing obviously stupid jumped out at me
(as I said it passed the "laugh test").  A pretty good sign.

	-joseph

Joseph N. Hall wrote:
> 
> I remember thinking it was hideously ugly.  On the other hand,
> I have always had great respect for Wiley's choices of titles
> and authors.  (But never for Wiley's cover designers.)  Its
> innards did pass the "laugh test."  I guess I'll have to take
> another look.
> 
>         -joseph
>          http://www.effectiveperl.com


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

Date: Fri, 09 Jan 1998 09:23:07 +0100
From: Mikael Henrikson <mikael.henrikson@edt.ericsson.se>
Subject: controlling browser window propertys?
Message-Id: <34B5DE6B.E1F11CDB@edt.ericsson.se>

Hi...
I wan't my PERL-script to redirect the user and change the browser
(Netscape or IE) window propertys (such as toolbar, locationbar). Can I
do this from a PERL-script??? If so, how?

/Mikko




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

Date: Fri, 09 Jan 1998 07:24:08 GMT
From: jasper@webminds.nl (Jasper)
Subject: Crypt() on Win32
Message-Id: <34b5ce17.570450@news.cs.utwente.nl>

I saw some questions about a Unix-like Crypt() for Win32 boxes, so
here's how to do it:

1) Get the Win32::Api from
http://www.divinf.it/dada/perl/api/Win32API-0.011.zip and install it
in your Perl 5.004 or ActiveWare 300 (or higher).
2) Get the Password.DLL from
ftp://ftp.cat-soft.com/add-ons/passwd/Passwd.zip and install it in
your Windows/System or Winnt/System32 directory
3) And this is the script to do the trick:

----------------------------- Begin script ----------------------
#!/usr/local/bin/perl
#
# Crypt() for Win32 with salt on first two characters of plaintext
password (just like Unix)

use Win32::API;

$clearpass = "";

$GetCryptPass = new Win32::API("passwd.dll", "Crypt", [P, P], P);
$cryptpass = $GetCryptPass->Call($clearpass, substr($clearpass, 0,
2));

exit;
----------------------------- End script ----------------------

And that's all folks, have fun!

Cheers,

Jasper Veltman
Webminds Internet Services
http://www.webminds.nl
jasper@webminds.nl


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

Date: Fri, 09 Jan 1998 13:27:42 +0000
From: Piers <pxharding@csi.com>
Subject: Help! Perl.lib corrupt/invalid when compiling embeded perl under VC++ 5.0
Message-Id: <34B625CD.9AC6F4E6@csi.com>

HI,

I am trying to compile a simple ( pod example ) embeded perl program
with V C++ 5.0, and the Binary distribution of Perl ( for NT ) 5.004_2.
I get the following error message at linking time:

C:\perl\bin\Perl.dll : fatal error LNK1136: invalid or corrupt file
Or
C:\perl\bin\Perl.lib : fatal error LNK1136: invalid or corrupt file

Any suggestions welcome.

Cheers.



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

Date: Fri, 09 Jan 1998 11:35:02 GMT
From: fred@ywl.com (Fred J Keller)
Subject: How to read/write data to com port under Linux
Message-Id: <34b60ab0.3947130@news.in.net>

I am trying to develop a perl program that will communicate with a
Davis Instruments weather station via the comm port on a PC running RH
Linux 4.2.  As a newbee to both Perl and Linxu I need some direction
on the preferred approach to access the serial port.

Thanks in advance,

Fred


Fred
fred@ywl.com

Yellow Wood Llamas
Specializing in Pure Bolivian and Bolivian North American Crosses
http://www.ywl.com/yw/yw.htm


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

Date: Fri, 9 Jan 1998 17:11:38 +0800
From: "Samuel Shum" <itsam@polyu.edu.hk>
Subject: How to setup IIS to run perl?
Message-Id: <694p23$m071@hkpa05.polyu.edu.hk>

Hello,
   I am new to "Perl" and I have some ".pl" files to run on NT. I got an
error "Not supported" from the IIS. Did I miss something? I have heard that
I need a "Perl for Win32" to run on my server. After I installed it, the
server still gives me the same error message. How can I configure my IIS to
work with perl? Thanks in advance.

--
BR,
Samuel

================================
Samuel Shum
Multimedia Production Centre
The Hong Kong Polytechnics University
Email: itsam@polyu.edu.hk
Homepage: www.polyu.edu.hk/mpc





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

Date: Fri, 09 Jan 1998 13:29:51 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: How to setup IIS to run perl?
Message-Id: <34ba262d.1364987758@igate.hst.moc.com>

[original author automagically cc'd via e-mail]

On Fri, 9 Jan 1998 17:11:38 +0800, "Samuel Shum" <itsam@polyu.edu.hk>
wrote:

[comp.lang.perl is dead. Don't post there.]

>Hello,
>   I am new to "Perl" and I have some ".pl" files to run on NT. I got an
>error "Not supported" from the IIS. Did I miss something? I have heard that
>I need a "Perl for Win32" to run on my server. After I installed it, the
>server still gives me the same error message. How can I configure my IIS to
>work with perl? Thanks in advance.

Check Microsoft's support knowledge-base. It's explained there.

Jeremy
-- 
Jeremy D. Zawodny                 jzawodn@wcnet.org
Web Server Administrator          www@wcnet.org
Wood County Free Net (Ohio)       http://www.wcnet.org/


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

Date: Fri, 09 Jan 1998 08:19:20 -0500
From: "Bill Jones, FCCJ Webmaster" <webmaster@fccj.cc.fl.us>
Subject: Re: How to setup IIS to run perl?
Message-Id: <34B623D8.40CCCF3B@fccj.cc.fl.us>

This is a multi-part message in MIME format.
--------------CB7B1A513D5A97DADC75C7D5
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Samuel Shum wrote:

> Hello,
>    I am new to "Perl" and I have some ".pl" files to run on NT. I got an
> error "Not supported" from the IIS. Did I miss something? I have heard that
> I need a "Perl for Win32" to run on my server. After I installed it, the
> server still gives me the same error message. How can I configure my IIS to
> work with perl? Thanks in advance.
>
> --
> BR,
> Samuel
>
> ================================
> Samuel Shum
> Multimedia Production Centre
> The Hong Kong Polytechnics University
> Email: itsam@polyu.edu.hk
> Homepage: www.polyu.edu.hk/mpc

 Did you install ActiveState's Perl?
http://www.activestate.com
HTH,
Bill

--------------CB7B1A513D5A97DADC75C7D5
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Bill Jones
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Bill Jones
n:              Jones;Bill
org:            FCCJ
adr:            501 W. State St.;;MCCS Rm. 270;Jacksonville;FL;32202;USA
email;internet: webmaster@fccj.cc.fl.us
title:          Webmaster
tel;work:       (904) 632-3089
tel;fax:        (904) 632-3007
tel;home:       Pager: 1 (904) xxx-xxxx
x-mozilla-cpt:  ;0
x-mozilla-html: TRUE
version:        2.1
end:            vcard


--------------CB7B1A513D5A97DADC75C7D5--



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

Date: Fri, 09 Jan 1998 07:27:36 +0800
From: Angy <angyny@interport.net>
Subject: How to view NT Eventviewer in Perl
Message-Id: <34B560E8.2D92@interport.net>

Hi, I want to view NT Eventviewer in my Perl script. I know there
is a Win32::Eventviewer (?), but how does it use?

Angy


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

Date: 9 Jan 1998 07:34:21 GMT
From: "ajay mittal" <ajaym@hooked.net>
Subject: Re: Interprocess Communication
Message-Id: <01bd1cd1$3a86d760$0ae1a9ce@ajju>

i remember NT and solaris have different values for
AF_INET and SOCK_STREAM (2nd and 3rd parameters of socket call)
but when u use Socket package that package takes care of the diff.

let me know if you want more info
-ajay

> if (socket(S,2,1,6)) { print "socket ok\n"; } else { die $!; }



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

Date: Thu, 08 Jan 1998 09:09:59 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
To: Hans M|ller <mcom-handel@t-online.de>
Subject: Re: language
Message-Id: <34B4DE36.5714@fccj.cc.fl.us>

Hans M|ller wrote:
> 
> I'm using a NT-Server and want to get the perl engine? 5.004_02. Where
> I can find? Is "perl" freeware?. If not: what the costs are?
>  
> I hope you can help me.
> 
> --
> Greetings from Hessen
> Hans M|ller

Perl is free.  look for WinNT version at http://www.activestate.com
Get Build 315 or better...


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

Date: Fri, 09 Jan 1998 02:31:46 -0600
From: Josh Kortbein <kortbein@iastate.edu>
Subject: Re: match weirdness - $_++ vs. $_ + 1
Message-Id: <884334375.1154613260@dejanews.com>

In article <34b58963$4$ofn$mr2ice@speaker>,
  bsa@void.apk.net (Brandon S. Allbery KF8NH; to reply, change "void" to
"kf8nh") wrote:
>
> In <693og7$c98$1@news.iastate.edu>, on 01/08/98 at 11:46 PM,
>    kortbein@iastate.edu (Josh Kortbein) said:
> +-----
> | @b = map ($_++, @a);
> +--->8
>
> $_ is the actual list item, not a copy of it; the ++ and -- operators change
> what they're operating on.  Thus, you're incrementing every element of @a and
> storing the old value (since you're using post-increment) in @b.
>
> In general, it's a very bad idea to apply operations that have side effects to
> the iteration variable of map(), grep(), or foreach(){}.
>

Followup/end to my question: as Brandon and others pointed out to me, the
auto??crement operators have extra "features" I had never encountered
before (i.e., they return things, in addition to modifying variable
values!). Also, I guess I had never really known that $_ is value-only.

Hmmm. And in retrospect, I see that I meant "map" in the subject, not
"match." How did that get in there? :)

Well, I had already done some simpler tests on my own - I then started
look at map() from the point of view,

"Gee... how might I obfuscate code with this?"

:)

Thanks all,

Josh

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: 9 Jan 1998 12:09:52 GMT
From: "Didier JEANROBERT" <fgint@dial.oleane.com>
Subject: NT and Security / Registry
Message-Id: <01bd1cf7$47a61b10$b00402c2@fgi04084>

somebody know how to apply a security strategie on the registry with perl ?

for example : 

apply everyone full control to to
HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools

a solution exist ?




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

Date: Fri, 9 Jan 1998 09:33:07 +0100
From: Tobias Bugala <bugalats@trick.informatik.uni-stuttgart.de>
Subject: once again print SOCK "Whatever";
Message-Id: <Pine.SOL.3.95.980109092843.1864I-100000@tick>

For givin' you a better imagination of my problem:

My script should make some dialogue between my machine and a POP3 server.

I open the Socket-Connection and wait for the answer which comes correctly
to me. (Well, I can print it out..)
Afterwards I use the command

print SOCK "USER <username>\n";

to login. My probem is: there is no response.
It should be "+Ok <user> gets mail......" but there comes nothing. So,
where is the misstake? Telnetting functions...

TOBI



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

Date: Fri, 9 Jan 1998 12:42:18 -0000
From: "Andie Crossland" <AndieC@msn.com>
Subject: Pattern Matching
Message-Id: <eq1hMxPH9GA.270@upnetnews02.moswest.msn.net>

I am trying to pattern match a string e.g.

"This is a \"perl\" script"

Is this possible to do it in one pattern match?
I can only think of

m/"[^"]*"/

but this will only match
"This is a \"

Can this be done?
Thanks,

Andie.




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

Date: 09 Jan 1998 13:14:05 +0000
From: Richard Caley <rjc@liddell.cstr.ed.ac.uk>
Subject: Re: Pattern Matching
Message-Id: <eyhn2h5x00y.fsf@liddell.cstr.ed.ac.uk>

In article <eq1hMxPH9GA.270@upnetnews02.moswest.msn.net>, Andie Crossland (ac) writes:

ac> I am trying to pattern match a string e.g.
ac> "This is a \"perl\" script"

I think:

	m/"((\\")|[^"])*"/

(any number of either an escaped double quote or something other than a
double quote) will do it. 


-- 
rjc@cstr.ed.ac.uk			_O_
					 |<



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

Date: Fri, 09 Jan 1998 11:43:41 GMT
From: fred@ywl.com (Fred J Keller)
Subject: Re: Perl CGI - Apache 1.2
Message-Id: <34b70d4b.4613590@news.in.net>

On Thu, 8 Jan 1998 10:04:49 -0500, "Rich Capenegro"
<rcapenegro@brookdale.cc.nj.us> wrote:

>I am having problems running ANY Perl scripts with Apache 1.2 under
>FreeBSD. Whenever I run a Perl script The server returns Internal Server
>Error, and in the error log it says Premature end of script headers.  I know
>the scripts work because I ran them with Personal Web Server under Win 95.
>Any help will be GREATLY appreciated!  Thanks in advance.
>
>Rich
>rcapenegro@brookdale.cc.nj.us
>
Make sure you uploaded the script in ASCII mode--not BINARY.

Fred

>
>


Fred
fred@ywl.com

Yellow Wood Llamas
Specializing in Pure Bolivian and Bolivian North American Crosses
http://www.ywl.com/yw/yw.htm


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

Date: 9 Jan 1998 11:16:43 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Perl programming with NT4.0: sendmail problem
Message-Id: <884344586.182916@cabal>

In <qz$9801081648@qz.little-neck.ny.us> Eli the Bearded <*@qz.to> writes:

[...]

>Isn't POP3 just for reading mail?

Some versons of POP3 allow the posting of mail as well.

--
Please excuse my spelling as I suffer from agraphia see the url in my header. 
Never trust a country with more peaple then sheep. 
Support NoCeM http://www.cm.org/                   
I'm sorry but I just don't consider 'because its yucky' a convincing argument


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

Date: Fri, 9 Jan 1998 08:35:14 -0500
From: "Franklin L. Petersen" <orangutan@grungyape.com>
Subject: Perl Resources
Message-Id: <695916$qh3$1@cletus.bright.net>

Can someone give me a short list of very good resources (ie: examples and
clear descriptions) for Perl on the net?

I am new, just wrote my first simple script,
http://www.grungyape.com/perl/perl_order.html

and need a good reference source.  I learn from doing, so the best for me is
to tear up scripts and redo them so I understand the language.

Thanks!
Frank

orangutan@grungyape.com




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

Date: Fri, 09 Jan 1998 08:43:45 +0100
From: jola@hem.passagen.se
Subject: Pipes in Perl5 on WindowsNT
Message-Id: <34B5D531.7E06281@hem.passagen.se>

Hi!
I got a reply from Sarathy (thanks by the way), but I have some more
questions:

At [Fri, 2 Jan 1998 10:12:12 -0500 (EST)]
Gurusamy Sarathy <gsar@engin.umich.edu> wrote:
>This is a well-known bug in file associations.  Which is why I
>recommend using batchfile wrappers exclusively (they don't have
>this problem).

Is there no way to avoid using batchfile-wrapping? 
Is the bug in Win-NT or in the Perl.exe? (If the answer is Win-NT, then
how come batch-file works...?)
What about an IIS web-server: The same problem in its script-calling
too, or not?

Thanks in advance again!

/Jonas.

Original message:
> I have a problem with "Pipes" in Perl5 on Windows NT 4.0 (SP3).
> 
> Examples:
> This works:            echo hello | perl.exe myprog.pl
> This doesn't work:     echo hello | myprog.pl
> In the second example, myprog.pl is started but the 'hello' never gets
> to the program.
> The same goes for "myprog.pl <mytextfile.txt" which also doesn't work.
> 
> The myprog.pl program:
> $myin = <STDIN>;
> print $myin . "\n";
> 
> My current filetype association for Perl:
> .pl=plfile
> plfile="e:\winprog\Perl\bin\perl.exe" "%1" %*
>


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

Date: Fri, 09 Jan 98 07:40:05 -0500
From: bsa@void.apk.net (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
Subject: Re: Pipes in Perl5 on WindowsNT
Message-Id: <34b61c39$1$ofn$mr2ice@speaker>

In <34B5D531.7E06281@hem.passagen.se>, on 01/09/98 at 08:43 AM,
   jola@hem.passagen.se said:
+-----
| Is the bug in Win-NT or in the Perl.exe? (If the answer is Win-NT, then how
| come batch-file works...?)
+--->8

PERL.EXE doesn't have the concept of file associations; CMD.EXE does.  (Or
more likely, the Win32 API does and CMD.EXE just provides access to it.)

Why do batch files work?  They run PERL.EXE directly instead of relying on the
buggy file association method to start it, so the connection to the pipe isn't
lost.

-- 
use 5.004;sub AUTOLOAD{print$_{$_.++$x{$_}}}sub new{my%x;%_=map{++$a%2?$_.++$x{
$_}:$_}split(//,pack('N*',unpack('w*',unpack('u*','M@H*HP\'2"@\C`88+SE/!EA(F!'.
"A'6\$LZV0+(3;C9QRA9NAPG2&D\\G(88:KL=A0\n4AN.5W\"\"&\\[W>;H>3S>0\@A\\N\@PB\$`")
)));bless{}}$b=(new main);map{$b->_}split(//,' Brandon S. Allbery KF8NH') # :-)



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

Date: Fri, 9 Jan 1998 09:17:42 +0100
From: Tobias Bugala <bugalats@trick.informatik.uni-stuttgart.de>
To: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: print SOCK "Whatever";
Message-Id: <Pine.SOL.3.95.980109091547.1864G-100000@tick>

On 8 Jan 1998, Tom Christiansen wrote:

>  [courtesy cc of this posting sent to cited author via email]
> 
> In comp.lang.perl.misc, 
>     Tobias Bugala <TobiasBugala@swol.de> writes:
> :but if I want to reply by
> :print SOCK "Anything";
> :I don't get an answer. If I type exactly the same strings in a
> :telnet-session it works.
> 
> No, you don't type the same thing.  You forgot a newline.
> 
> --tom
> -- 
> 	Tom Christiansen	tchrist@jhereg.perl.com
> 
>     echo "I can't find the O_* constant definitions!  You got problems."
>             --The Configure script from the v5.0 perl distribution
> 
> 
I did. My exact command is:

print SOCK "USER <username>\n";

I also tried 

print SOCK "USER <username>";
print SOCK chr 13;
print SOCK chr 10;


So I did the new line or is it different?

TOBI



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

Date: 09 Jan 1998 10:56:46 +0000
From: Piers Cawley <pdcawley@bofh.org.uk>
Subject: Re: recomended Perl books ?
Message-Id: <54zpl5rk41.fsf@gunnar.aladdin.net>

Tue, 06 Jan 1998 14:56:39 -0500 Douglas Clifton <doug1@net-link.net> comp.lang.perl.misc
> Randal Schwartz wrote:
> > Jeffrey Friedl's MRE is a Very Good Book. I've been hacking
> > regular expressions for 20 years now (using Unix since 1977), and
> > I *still* learned a surprising amount of stuff from this book.
> > Congrats, Jeffrey!
> 
> MRE is a great regexp text.

Seconded (thirded, whatevered).

> We are well on our way to acquiring the entire O'Reilly library...

Isn't everybody? I'm still amazed that they've managed to keep the
quality up there as they're growing -- I don't think I've read any of
their books that is a waste of bookshelf space, and most stay on the
desk and don't reach the bookshelf.

-- 
Piers Cawley -- Systems Genie for Aladdin
If a `religion' is defined to be a system of ideas that contains
unprovable statements, then Godel taught us that mathematics is not
only a religion, it is the only religion that can prove itself to be
one. -- John Barrow


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

Date: Fri, 09 Jan 1998 01:42:31 -0700
From: "Joseph N. Hall" <joseph@5sigma.com>
Subject: Re: Review of CGI/Perl book
Message-Id: <34B5E2F2.2D0E965@5sigma.com>

You hit the nail on the head.

There are other good things that can be said about Perl 5, but
as a source of preexisting solutions, it can't be beat.

	-joseph

Anthony David wrote:
> Every problem they had I would solve for them with a module.


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

Date: Fri, 9 Jan 1998 02:47:24 -0500
From: "Ken" <turboman34@hotmail.com>
Subject: Server error 500
Message-Id: <ehXMmNNH9GA.172@upnetnews02.moswest.msn.net>

Hi,
    Recently, I try to use perl to write cgi-script in my web page, but I
got a error message return. So, I wrote exactly one of the perl script from
the book and also a html form inorder to use the script; and I still getting
the same error message.  The following is the error message:

500 Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.
Please contact the server administrator, mluo@giti.com and inform them of
the time the error occurred , and anything you might have done that may have
caused the error.

Error: HTTPd: malformed header from script /cgi-bin/greeting.pl

The code is fine in my Pc when I compiled it.  If you know what's the
problem is, please e-mail me: skywing@email.msn.com Thanks a lot!





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

Date: Thu, 08 Jan 1998 09:19:17 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
To: Keith Oborn <keith@so-net.co.uk>
Subject: Re: Simple array initialisation question
Message-Id: <34B4E062.33B5@fccj.cc.fl.us>

Keith Oborn wrote:
> 
> This will doubtless seem dumb, but so what--
> 
> I have a variable, $users, which contains a string like this:
> 
> fred,joe,bert
> 
> I need to produce an array that contains the above, equivalent to
> simply saying @userarray = (fred,joe,bert).
> 
> For the life of me I can't see how--.
> 
> Mail me an answer, someone?

How about @users = $users?

Is this a CGI or data file being read?
If it's a CGI, then I recommend CGI.pm module.

HTH,
Bill


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

Date: Fri, 09 Jan 1998 13:32:07 GMT
From: randolph.a.bey@norwest.com (Randy Bey)
Subject: simple perl script to add directory to PATH if not there already
Message-Id: <34b626c8.54268804@relay>

Greetings,
I am hoping to someday be able to do this myself, but.....
does anyone have a perl script that adds a directory to a PATH if the
directory is not already in the PATH? So that it could be invoked as
in:

eval `add_to_path.pl /some/directory`

to add "/some/directory" to your path if it wasn't already there, or
just output your PATH if it already was?

Bonus points awarded for adequate comments to help teach a neophyte.
Randy Bey
randolph.a.bey@norwest.com
Disclaimer:
All words and opinions are my own and Norwest Services is not
responsible for any of the above, and would trade me for a burnt-out
match, if push came to shove.


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

Date: Fri, 9 Jan 1998 21:45:28 +1100
From: "Bob Reynolds" <bob@b-tech.net>
Subject: Sockets on NT , a problem...
Message-Id: <34b600e8.0@139.134.5.33>

I'm playing with the code below...

all i get out of it is +OK from the pop server on connect...

i dont get anything from my other inputs and it hangs on while<S> ...

Any ideas?? where am i going wrong???


cheers


$port = '110';
$server = 'mail.MY-ISP-GOES-HERE.com';

use Socket;
$sockaddr = 'S n a4 x8';
chop($hostname='hostname');

($name, $aliases, $proto) = getprotobyname('tcp');
($name, $aliases, $port) = getservbyname($port, 'tcp');
($name, $aliases, $type, $len, $thisaddr) = gethostbyname($hostname);
($name, $aliases, $type, $len, $thataddr) = gethostbyname($server);
$this = pack($sockaddr, 2, 0, $thisaddr);
$that = pack($sockaddr, 2, 110, $thataddr);
socket(S, 2, 1, $proto) || die "socket: $!";
bind(S, $this) || die "bind: $!";
connect(S, $that) || die "connect: $!";
select(S); $| = 1; select(stdout);

print S "user xxxx\n";
print S "pass yyyy\n";


while (<S>)
{
     print;
}
print "closing \n";
close (S);




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

Date: Thu, 08 Jan 1998 09:17:03 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
To: Stefan Herz <e9427662@stud2.tuwien.ac.at>
Subject: Re: Telnet client written in perl
Message-Id: <34B4DFDD.7900@fccj.cc.fl.us>

Stefan Herz wrote:
> 
> Hi There !
> 
> I need a telnet client (for MS NT), which is written in perl.
> Does anboy know, where to find such a telnet client ?
> 
> TIA Tom

Will this Telnet client need to operate independently of it's
user/program?

If so, then I would recommend looking at http://expect.nist.gov

HTH,
Bill


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

Date: 9 Jan 1998 08:45:54 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Testing for valid RegExps?
Message-Id: <6959mi$t47@panix.com>

In <34B534A0.F523E60C@franklin.uga.edu> Mark Hazen <mhazen@franklin.uga.edu> writes:

>Thanks for all of the suggestions. It amazes me that after three years of
>(admittedly bad) hacking out scripts with Perl, the things I forget are the 
>most obvious. ::sigh::
               ^^^^^^^^

Is this a new module?

-- 
Clay Irving <clay@panix.com>                  I think, therefore I am. I think? 
http://www.panix.com/~clay/


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

Date: Fri, 9 Jan 1998 03:01:23 -0500
From: vallon@mindspring.com (Justin Vallon)
Subject: Re: Unix perl shell ???
Message-Id: <19980109030123375322@user-38lcfj0.dialup.mindspring.com>

Read the FAQ!  :-)

Ed Avis <epa@datcon.co.uk> wrote:

> On 7 Jan 1998 22:12:28 GMT, Zenin <zenin@best.com> wrote:
> 
> >Robert Jenks <eat@joes.nospam.deli> wrote:
> >: Anyone written or writing a UNIX perl shell?
> >
> >     RTFFAQ
> 
> Maybe one of you Perl experts out there could write an "automatic
> responder" for this kind of message 8-)
> 
> Scan the Perl FAQ for a section which roughly matches the question
> posted, and automatically reply to the newsgroup with a reference to
> that section.
> 
> Or has it already been done...?
> 
> --
> Ed Avis

 ...I can write that program in 3 lines of perl code...

-- 
-Justin
vallon@mindspring.com


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

Date: 9 Jan 1998 10:57:38 GMT
From: "Didier JEANROBERT" <fgint@dial.oleane.com>
Subject: Win32::NetResource::NetShareGetInfo Return always 0
Message-Id: <01bd1ced$301d10c0$c016030a@fgi04084>

the function Win32::NetResource::NetShareGetInfo Return always 0 for the
share permissions why ?

but...i have many differents permissions on the share ...

somebody know why ?

I use a french NT version (sp3) that is the bugs ?


code example :


push (@INC,'@ARGV');
require 5.004;

       use Win32::NetResource;
       use Win32;

    $Serveur = @ARGV[0];
    $Ressource = @ARGV[1];
    $Extension = "_ShareName.txt";
    $Machine = substr ( $Serveur,2,(length ($Serveur)));                 #
suppression des \\
    $OutFile = "$Machine$Extension";

    unless (open (outfile, ">>$OutFile")){die ("Impossible d'ouvrir le
fichier $OutFile...")};

    $NewShare = {};
    Win32::NetResource::NetShareGetInfo($Ressource, $NewShare, $Serveur);

     foreach( keys %$NewShare )
                    {
                                   print "$_ :$NewShare->{ $_ }\n";
                                   print outfile "$NewShare->{ $_ },";
	            }

print outfile "\n";

sub Error{
    my($Function, $Comment) = @_;

    push(@Error, $Function);
    $Comment = Win32::FormatMessage(Win32::GetLastError()) unless $Comment;
    print "\tError with $Function:\n\t\"$Comment\"\n";
}




Didier 

Paris (France)


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.  

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 1606
**************************************

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