[6482] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 107 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 13 03:17:37 1997

Date: Thu, 13 Mar 97 00:00:29 -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           Thu, 13 Mar 1997     Volume: 8 Number: 107

Today's topics:
     Re: 3 Easy questions. - PLEASE HELP (Geoffrey Hebert)
     baffling win32 perl prob - permission denied?! <phantasm@webcom.com>
     basic documentation <apardo@siu.cen.buap.mx>
     Re: Basic I/O and 'if vs unless' questions <tchrist@mox.perl.com>
     Re: can $_ be dissociated from its contents? (Chip Salzenberg)
     Re: can $_ be dissociated from its contents? (Rahul Dhesi)
     Re: Elegant way to strip spaces off the ^ and $ of a va <tchrist@mox.perl.com>
     How to spam - legitimately (Michael Shields)
     Re: I'm scared and don't know what to do. Do you know?? (Geoffrey Hebert)
     Re: I'm scared and don't know what to do. Do you know?? <tchrist@mox.perl.com>
     Re: I'm scared and don't know what to do. Do you know?? (Tad McClellan)
     Re: Integers (Dave Thomas)
     Re: Integers <tchrist@mox.perl.com>
     Numeric function <martin.lonnar@edt.ericsson.se>
     Re: Pattern matching on stream (Dave Thomas)
     Re: Please help with this Script. It's Cameron, not dia (Tad McClellan)
     Re: releasing socket connections (Charles DeRykus)
     remote to remote ftp from cgi <johnc@interactive.ibm.com>
     Re: We've baffled tech support, now on to Usenet... (Tad McClellan)
     weird digit regexp behaviour (Pete Hartman)
     Re: what's the advantage of a shared libperl.so?? <roderick@argon.org>
     Re: Who makes more $$ - Windows vs. Unix programmers? <piiroine@hytti.uku.fi>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 13 Mar 1997 04:41:53 GMT
From: soccer@microserve.net (Geoffrey Hebert)
Subject: Re: 3 Easy questions. - PLEASE HELP
Message-Id: <5g7vmf$rf8$1@news3.microserve.net>

Nick Curtis <nick@batfink.demon.co.uk> wrote:

>OK, I have three little posers that I need to ask. 

>1. How do you change a string to be either all caps or all non-caps?
isn't there a function in the index of every perl book :
lc($var) for  lowercase and uc($var) for uppercase

>2. How do you truncate a string, or get a substring?
likewise  - sub what - let me check the index wow it might just look
like substr - I suggest you get a basic book.  You will get flamed out
of this group quickly with these very basic questions.

>3. How do I get a list of all environment variables sent from a web
>browser???
This is a better question, let me just suggest a book "teach yourself
CGI Programming with Perl in a week"  forget the week part of the book
but it has your answer.
>I tried 

>foreach $key (sort keys(%ENV)) {print "$key = $ENV($key)\n};

>but with perlIS.dll it only shows    PERLXS = PERLIS.DLL

>Help much appreciated.

>NickC (told you it was quick and easy!!!!).




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

Date: Thu, 13 Mar 1997 01:15:39 -0500
From: Thomas Winzig <phantasm@webcom.com>
Subject: baffling win32 perl prob - permission denied?!
Message-Id: <33279B8B.13A4@webcom.com>

Hello,

Perl 5.003__7 on NT 4 server, running IIS 3.0.
The script uses Win32::ODBC (latest release), though 
I believe this is unrelated (but possibly helpful).

We have a directory that is restricted to two
groups in NT: administrators and "members." Members
have read access (RX), and administrators have
full control of this directory and it's files.

The perl script in question, a CGI script which is
interpreted by the perl.exe program (as opposed to
perlIS.dll), posts a message to a bulletin board. This
involves many things, including opening up a file
(lastpost.txt) and checking to see if the current
post is a duplicate, by comparison with that file's
contents.

Now, the rest of the script works. I've tested it a 
lot on my server (which doesn't have any strict 
permissions, since it's a standalone machine), and it 
works fine. 

But when I try running this script on our server at work
(with the permissions described above), we get some 
baffling results. Incidentally, when I open the 
lastpost.txt file for reading, I use a 'or die' 
statement (of course :) to give an error message.

Here are the "baffling" results:

If I login to the remote webserver using my username 
(I am part of the administrator's group), then post a 
message, everything works fine. Yet if I then try to 
post a message again, the script dies with 
"permission denied" for that lastpost.txt file! It's as 
if the permissions are changing.

If my co-worker logs in with his username (also an 
admin), he can usually post a few more posts before 
he receives the error -- permission denied. The 
difference between us is only that he is reaching the 
web server from another machine on the LAN.

The truly strange part is that this error appears 
very much random, with the exception that I am almost 
always restricted to one or two posts before I receive 
the error, and my co-worker is able to post many 
more times.

Other oddments include receiving "gibberish" as 
the result running a script that tries to return an 
error message. For example, here is a message I received 
as output from the script when trying to debug another 
web script:

f:b=&f=2g-g/f/g	5f42b=f!f/f%.f%g .f!4f5,c( e
%g	-f%3g
)f=.b$f.f%%f
o n<o n<n

I am experienced in running perl scripts, CGI scripts, 
etc, but I cannot for the life of me figure this 
problem out. It's also complicated by the fact that the 
server is remote, so I can't do anything directly to 
check stuff (though my co-worker can, he's not as 
experienced with perl).

Any ideas, off-the-wall or otherwise, freely excepted and
appreciated! thanks in advance. :-)

regards,
thomas


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

Date: Wed, 12 Mar 1997 19:41:26 +0000
From: Alfredo Campos <apardo@siu.cen.buap.mx>
Subject: basic documentation
Message-Id: <Pine.SOL.3.91.970312193946.6446A-100000@siu.buap.mx>

hey! i need some help please!
i'm a neewbie in perl... in fact i don't know how to use it ... i have it 
in my unix account...
Where could i find some basic guide to use this lenguage???


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

Date: 13 Mar 1997 05:26:23 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Basic I/O and 'if vs unless' questions
Message-Id: <5g835v$e11$4@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    chris.starkey@3dlabs.com (Chris Starkey) writes:
:Hi,
:  I am fairly new to Perl5 and I need to write a script to grope round
:some suns.   Great opportunity to learn Perl :)   The following
:segment reads hostnames from "hostfile" and then checks they are alive
:before executing the 'rsh <command>'.   My first question is : why
:does the unless statement work, when I had 'if (system ("ping $name
:2")) it didn't execute the 'rsh' section ?   Surely if (the system
:command) is true then the {bit in the brackets} is done.   

Sure not.  system(), unlike nearly everything else except syscall,
returns 0 upon success, not failure.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

#ifdef USE_STD_STDIO    /* Here is some breathtakingly efficient cheating */
    --Larry Wall, from sv.c in the v5.0 perl distribution


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

Date: 12 Mar 1997 23:45:49 GMT
From: chip@rio.atlantic.net (Chip Salzenberg)
Subject: Re: can $_ be dissociated from its contents?
Message-Id: <5g7f7d$8l@news.atlantic.net>

According to dbenhur@egames.com:
>Well this subroutine serves the purpose of anonymizing a scalar
>value, but doesn't address Rahul's original problem: how to get a 
>reference to a scalar *value* without copying the value to some 
>new storage location.

If I understand you correctly, you can use a subroutine:

   sub copyof { wantarray ? @_ : $_[$#_] }
   $x = \ copyof $_;

Or eval {}:

   $x = \ eval { $_ };

-- 
Chip Salzenberg             - a.k.a. -             <chip@atlantic.net>
    "I wanted to play hopscotch with the impenetrable mystery of
   existence, but he stepped in a wormhole and had to go in early."
         -- Crow T. Robot, _Mystery_Science_Theater_3000_


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

Date: 13 Mar 1997 07:44:02 GMT
From: c.c.eiftj@66.usenet.us.com (Rahul Dhesi)
Subject: Re: can $_ be dissociated from its contents?
Message-Id: <5g8b82$3uv@samba.rahul.net>

In <5g7f7d$8l@news.atlantic.net> chip@rio.atlantic.net (Chip Salzenberg) writes:

>   sub copyof { wantarray ? @_ : $_[$#_] }
>   $x = \ copyof $_;

This seems to work, but does it really do it without making a copy?  I
notice you called the subroutine 'copyof' rather than 'referenceto'.

>   $x = \ eval { $_ };

$x becomes a reference to the value returned by the block { $_ }, but is
it a reference to a copy of $_ or to the original contents of $_ ?
-- 
Rahul Dhesi <dhesi@spams.r.us.com>
a2i communications, a quality ISP with sophisticated anti-junkmail features
** message body scan immune to fake headers ***   see http://www.rahul.net/
>>> "please ignore Dhesi" -- Mark Crispin <mrc@CAC.Washington.EDU> <<<


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

Date: 13 Mar 1997 05:03:07 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Elegant way to strip spaces off the ^ and $ of a variable containing a sentence.
Message-Id: <5g81qb$e11$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    abigail@ny.fnx.com writes:
:Elegant you said... Here's a way without using ()'s in the
:regex, or having to type the variable twice. And it's easy to
:add more variables.
:
:map {s/^\s+//; s/\s+$//;} $variable;

No, that's a bad way.  You ignored the return value of the
function.  Map is a filter function.  It seems far less deceptive
to write

    for ($variable) {
	s/^\s+//; 
	s/\s+$//;
    } 

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com


"SPARC" is "CRAPS" backwards --Rob Pike


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

Date: 13 Mar 1997 04:01:11 -0000
From: shields@crosslink.net (Michael Shields)
Subject: How to spam - legitimately
Message-Id: <5g7u67$6aj$1@daedalus.crosslink.net>

In article <3325c0aa.84322097@news.earthlink.net>,
Lee <DeathToSpam@dev.null.com> wrote:
> The english language is pure democracy in action<s>.

No; it's an anarchy.  In a democracy the majority rule over all.
-- 
Shields, CrossLink.


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

Date: Thu, 13 Mar 1997 04:28:44 GMT
From: soccer@microserve.net (Geoffrey Hebert)
Subject: Re: I'm scared and don't know what to do. Do you know??
Message-Id: <5g7utr$r51$1@news3.microserve.net>

Tom Holder <Tom@intermart.co.uk> wrote:

>Hi, like the title says, I am very scared and lost.

>I have a web development project for the next 8 weeks and require the
>use of CGI. Firstly I know nothing about CGI but as this is a perl group
>I will not offend you by posting CGI queries.

>The problem is, I have to do some pretty heavy programs (Chat, Message
>board etc.) and I know NOTHING about perl.

Tell THEM it can not be done!  Who gave you this assignment?  Hey,
just string them along as long as you can picking up experience along
the way and then get another job.

>The only thing I do know is
>that it is an interpreted language and to be honest this scares me even
>more. The next big worry is that I am using win95 but the servers must
>have perl scripts. What do I do? Isn't it just UNIX?

Works on Win - but are you expected to install it also - ha
Where is that expert that has set up everything for you?
Where is that budy in the next cube that has been doing this full time
for more than 6 months.

> I'm not prepared to
>use Linux either because my knowledge of UNIX is very thin to say the
>least and with only 8 weeks I don't want to learn a totally new O/S.

>I do have 'some' limited programming experience in C and I am fairly
>good at Pascal but nothing major. OOP is a subject that I have only
>touched on but would prefer not to get into this because of the time
>scale.

>I would really apreciate any information (aimed at an idiot- 17 year old
>college student : ) that could help me get started with Perl and
>possibly some CGI and Perl related material.

THEY asked you to do it, did THEY give you some books.  Make them
buy a few books.  Programming Perl (pub O'Reilly auth Larry Wall etc)

Do THEY know where something like this is working?  Perhaps there is a
package?

Wait a minute maybe this is all just a hoax.  My internet provider
supplies all these features - hell just subscribe to AOL.

>Thanks for your help I really apreciate it...

>-- 
>Tom,

>Tom@intermart.co.uk
>Tom@ednet.co.uk
>Tom@resmon.co.uk
>Tom@2000plus.co.uk




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

Date: 13 Mar 1997 05:07:31 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: I'm scared and don't know what to do. Do you know??
Message-Id: <5g822j$e11$2@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    Tom Holder <Tom@intermart.co.uk> writes:
:Hi, like the title says, I am very scared and lost.

You're in way over your head.  Someone has set you up to fail,
or else doesn't understand the whole situation.

Bail.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

"If Dennis Ritchie were the man who developed Modula-2 then C would be long forgotten."
    --Tarjei Jensen


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

Date: Wed, 12 Mar 1997 17:31:05 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: I'm scared and don't know what to do. Do you know??
Message-Id: <pbe7g5.3g4.ln@localhost>

Tom Holder (Tom@intermart.co.uk) wrote:
: Hi, like the title says, I am very scared and lost.

: I have a web development project for the next 8 weeks and require the
: use of CGI. Firstly I know nothing about CGI but as this is a perl group
: I will not offend you by posting CGI queries.
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Thank you. Your courtesy is appreciated (and may well move some to try
and spend time helping instead of moving to the next message too).


: The problem is, I have to do some pretty heavy programs (Chat, Message
: board etc.) and I know NOTHING about perl.The only thing I do know is
: that it is an interpreted language and to be honest this scares me even
: more. 


Oh. I remember you now Tom.  Did I not assuage your fears
with my last post  ;-)

What is scary about it being interpreted?

The usual fear (or cumbersome thing anyway) about interpreted 
programs is when you have a syntax error, or some such, on line
100, and you have to go undo what the first 99 lines did.

This will not be a concern with perl, because it is compile-and-go.
ie. It scans the _entire_ script, 'compiles' it internally, and
then runs the internal representation.

It will not run at all if there is a syntax error on line 100 (or any
other line ;-)


Try and give a more concrete reason for what is scary about
interpreting. Can't solve the problem if we don't know what
the problem is...


: The next big worry is that I am using win95 but the servers must
: have perl scripts. 


Perl is available for satanware (stole the term from TomC ;-)

Can you not develop the scripts on the Unix host?


: What do I do? Isn't it just UNIX? 

Nope. (assuming 'it' refers to perl)

Go get the new Perl FAQ, and see part 2:

----- some selected lines -------
=head2 What machines support Perl?  Where do I get it?
 ...
A useful FAQ for Win32 Perl users is
http://www.endcontsw.com/people/evangelo/Perl_for_Win32_FAQ.html

=head2 How can I get a binary version of Perl?

=head2 Where can I get information on Perl?
----------------------------------


: I'm not prepared to
: use Linux either because my knowledge of UNIX is very thin to say the
: least and with only 8 weeks I don't want to learn a totally new O/S.


Too bad. 

Really.


: I do have 'some' limited programming experience in C and I am fairly
: good at Pascal but nothing major. OOP is a subject that I have only
: touched on but would prefer not to get into this because of the time
: scale.


You can do plenty much CGI scripting without using OO. Or at least
just use the OO modules as 'black boxes' without having a very deep
understanding of OO encapsulated therein.


: I would really apreciate any information (aimed at an idiot- 17 year old
: college student : ) that could help me get started with Perl and
: possibly some CGI and Perl related material.


Well, I guess you better get new FAQ part 3 too then:

----- some selected lines -------
=head2 Where can I learn about CGI or Web programming in Perl?

For modules, get the CGI or LWP modules from CPAN.  For textbooks,
see the two especially dedicated to web stuff in the question on
books.  For problems and questions related to the web, like "Why
do I get 500 Errors" or "Why doesn't it run from the browser right
when it runs fine on the command line", see these sources:

    The Idiot's Guide to Solving Perl/CGI Problems, by Tom Christiansen
        http://www.perl.com/perl/faq/idiots-guide.html

    Frequently Asked Questions about CGI Programming, by Nick Kew
        ftp://rtfm.mit.edu/pub/usenet/news.answers/www/cgi-faq
        http://www3.pair.com/webthing/docs/cgi/faqs/cgifaq.shtml

    Perl/CGI programming FAQ, by Shishir Gundavaram and Tom Christiansen
        http://www.perl.com/perl/faq/perl-cgi-faq.html

    The WWW Security FAQ, by Lincoln Stein
        http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html

    World Wide Web FAQ, by Thomas Boutell
        http://www.boutell.com/faq/

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

: Thanks for your help I really apreciate it...


Good luck!

Come back here with your perl questions.

(Or to comp.infosystems.www.authoring.cgi for your CGI questions)


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: 13 Mar 1997 03:11:37 GMT
From: dave@fast.thomases.com (Dave Thomas)
Subject: Re: Integers
Message-Id: <slrn5ierst.rbo.dave@fast.thomases.com>

On Wed, 12 Mar 1997 14:52:38 -0800, Lewellyn  wrote:

> Okay, I give up. I have tried the man pages and everything else available to
> me but here, so here goes:
> 
> How do I convert a decimal number read from <STDIN> to an integer? (Also, how
> can I verify input was numeric???) I'm sure I had this figured out one time
> when I didn't actually need it... :(

Normally you don't have to do any conversion - Perl does the right thing for
you:

   my $a = '123';
   my $b = 321;
   
   my $c = 2*$a + $b;
   
To test if a particular string is a valid integer, you have some
alternatives: 

   my $str = <STDIN>;
   chomp($str);        # remove trailing newline
   
  # if the string must be all digits

  if ($str =~ /^\d+$/) ...
  
  # digits with an optional leading minus...

  if ($str =~ /^-?\d+$/) ...

Regards

Dave

-- 

 _________________________________________________________________________
| Dave Thomas - Dave@Thomases.com - Unix and systems consultancy - Dallas |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Date: 13 Mar 1997 05:20:02 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Integers
Message-Id: <5g82q2$e11$3@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    Lewellyn <Lewellyn@ladyhawk.vip.best.com> writes:
:How do I convert a decimal number read from <STDIN> to an integer? 

It already is one.  Why do you assume you don't have one?

Or if it's a float, use int() to truncate.

(Also, how
:can I verify input was numeric???) 

You read the FAQ I just posted, or the perldata manpage, or the
FMTYEWTK on it.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com
    "Historically speaking, the presence of wheels in Unix has never precluded
    their reinvention."
    	--Larry Wall


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

Date: Thu, 13 Mar 1997 07:51:15 +0100
From: Martin Lvnnar <martin.lonnar@edt.ericsson.se>
Subject: Numeric function
Message-Id: <3327A3E3.3A02@edt.ericsson.se>

Hello!

Is there a function in perl to check if a scalar variable is numerical
only. It should work something like this:
$number = 1234;
numeric($number);
# This should render TRUE

$number = 12B4;
numeric($number);
# This should render FALSE

# It's to be used like this
if (!numeric($number)){
    print...
}



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

Date: 13 Mar 1997 03:04:01 GMT
From: dave@fast.thomases.com (Dave Thomas)
Subject: Re: Pattern matching on stream
Message-Id: <slrn5iereo.rbo.dave@fast.thomases.com>

On 12 Mar 1997 18:09:30 GMT, Peter Scott wrote:
> This sounds a bit odd but it would be useful.  I am wondering if
> there is such a thing as a streaming pattern match, which is the
> best term I can come up with.

You could do it my writing a simple parser instead - either implementing an
FSA in Perl itself or by using a tool like byacc (which will generate Perl).



-- 

 _________________________________________________________________________
| Dave Thomas - Dave@Thomases.com - Unix and systems consultancy - Dallas |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Date: Wed, 12 Mar 1997 19:31:59 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Please help with this Script. It's Cameron, not diane.
Message-Id: <fel7g5.f35.ln@localhost>

I myself (tadmc@flash.net) wrote:
: dianne cooper (cooper15@hsonline.net) wrote:

: : And I'm just now trying to learn Perl. 


: Well then. You should _immediately_ get the newly released Perl
: FAQs (nine parts). You should also read the man pages that are
        ^^^^^^^^^^
: included with the perl distribution.


It is nine parts if you only count nine parts.

It is ten parts if you count _all_ of the parts  ;-)

Sorry.

--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: Wed, 12 Mar 1997 22:23:18 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: releasing socket connections
Message-Id: <E6yBIu.Cz0@bcstec.ca.boeing.com>

In article <3320471C.7E8C12A0@darkwing.uoregon.edu>,
Michael Stearns  <mstearns@darkwing.uoregon.edu> wrote:
 >...I can open the listen connection once and have the connect 
 > script talk succesfully to it, but when I try to run the 
 > listen script again, I get a "Can't Bind" message.
 > This situation continues for several more minutes, until, finally, I can
 > open the connection again and it works fine.

 >socket (SSOCKET, PF_INET, SOCK_STREAM, $prototype) || die ("no socket");
 setsockopt(SSOCKET, SOL_SOCKET, SO_REUSEADDR,pack("l", 1))  or
     die "setsockopt: $!"; 
 bind(...);


Look for "setsockopt" in the blue Camel. 


Regards,

--
Charles DeRykus
ced@carios2.ca.boeing.com
  



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

Date: Wed, 12 Mar 1997 15:21:46 -0600
From: John Call <johnc@interactive.ibm.com>
Subject: remote to remote ftp from cgi
Message-Id: <33271E5C.23CD@interactive.ibm.com>

I need to write a program in perl that will let me ftp from one remote
site to another. Let's say I have a ftp.html page. The user fills in the
following:

From: www.abcd.com/index.html
To: www.wxyz.com

Hit submit. The cgi program should send the file index.html from
abcd.com to www.xyz.com/johnc. Is this possible? Is their third-party
software that already does this? If not possible what solution can I use
that doesn't involve third-party software?

Any help appreciated,

John


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

Date: Wed, 12 Mar 1997 21:54:52 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: We've baffled tech support, now on to Usenet...
Message-Id: <cqt7g5.fr5.ln@localhost>

Jason Maggard (jman95@ix.NOSPAMnetcom.com) wrote:
: Howdy!!!!

: 	This program is a really simple thing, but I cannot get it to run on my
                                                     ^^^^^^^^^^^^^^^^^^^^

What happens when you try to run it?

Does it say anything in the server logs?


: web server.  I use netcom, and all other scripts run fine.  

: Any input???? I
  ^^^^^^^^^

You got any input for us to work with?

What is the problem!

"Document contains no data"
"Malformed header"
browser waits and waits and waits...
everything looks OK, but the mail doesn't get sent?
something else?



: spent 2 hours with the Netcom hosting support kids, and they just finally
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^

They are sub-optimal CGI troubleshooters then. But you probably
already knew that.

See the glaringly obvious mistake near the end of this posting...


: gave up with a resounding "Hmph, I dunno..."

: Thanks, and come see us at ClaytorRE.com!
: (There's always time for a cheesy plug.)
                             ^^^^^^^^^^^

Hrrrmph.


: #Receptionist.pl ~ Jason Maggard
: #! /usr/bin/local/perl5

You are having a problem with your perl script, but you have not
enabled compiler warnings?

Shame on you...

#! /usr/bin/local/perl5 -w
                        ^^
                        ^^

: #Where is that darn mail program??
: $mailprog = '/usr/lib/bin/sendmail';

: #And the mail is going where?
: $recipient = 'office@claytorre.com';

: read (STDIN, $buffer, $ENV{'content length"};
                              ^^^^^^^^^^^^^^
                              ^^^^^^^^^^^^^^

CONTENT_LENGTH



Now, if you had done this the Right Way by not reinventing this
wheel, you would have never come upon this problem.

Get CGI.pm !


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: Thu, 13 Mar 97 06:57:50 GMT
From: elmegil@i1.net (Pete Hartman)
Subject: weird digit regexp behaviour
Message-Id: <5g88he$2o4_002@news.i1.net>

I'd think this would be a faq, but I don't see the answer in the
regexp section of the online faq.

I'm trying to match a number.  I want to match 12345 but not
12.34.56.78; note that the latter has "." in it.

The perl books both say that \d is the same as [0-9], which sounds
to me like "just the digits 0 through 9".  However, both m/\d+/ and
m/[0-9]+/ match "12.34.56.78".

Why?  "." is not a digit.  If I *want* to match it, I can add it to the
regexp.  If this is a feature not a bug, how can I disable it to get
the behaviour I want (JUST the digits 0 through 9)?

Please email me; Unfortunately usenet is far beyond my ability to
keep up with any more, and I'm reading with relatively backwards
Win95 technology.  For the record, I'm elmegil@i1.net, no matter
what my headers might say.


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

Date: 12 Mar 1997 23:56:22 -0500
From: Roderick Schertler <roderick@argon.org>
To: Marc Langheinrich <marclang@cs.washington.edu>
Subject: Re: what's the advantage of a shared libperl.so??
Message-Id: <pzafo8tmwa.fsf@eeyore.ibcinc.com>

On Wed, 12 Mar 1997 02:45:48 GMT, Marc Langheinrich <marclang@saxifrage.cs.washington.edu> said:
> 
> What exactly does [using libperl.so rather than libperl.a] buy me?

The initial motivation was that some systems (notably those derived
from SVR4) can't use dynamic loading unless they use a shared libperl.

A shared perl library becomes useful in general once you start compiling
your Perl scripts.  Without a shared libperl each compiled application
will be about as big as your current perl binary.  Further, if you have
multiple different compiled applications running at once (or even just
one application and one uncompiled script) they each get their own copy
of most of perl.  With libperl.so all the applications and all the
compiled programs run from the same text pages.

You still pay for it in execution time due to the position independent
code, though.

> [...]  Less Memory consumption when executing a script?
> 
> I hoped for the latter one, but it seems it makes no difference
> whether I compile Perl w/ or w/o shared libperl.so -- either way, my
> script uses the same amount of memory while running.

Right, the memory use isn't changed because it's the same system image
executing all Perl scripts, so the text is always shared.  Text sharing
is per-program with static libraries, but per-library with shared
libraries.  When there's only a single program using the library it
doesn't save memory to share it, it just costs CPU time.

Unless you need libperl.so in order to get dynamic loading or you're
using the alpha of the compiler stick with a static libperl.

-- 
Roderick Schertler
roderick@argon.org


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

Date: Wed, 12 Mar 1997 23:27:39 +0200
From: Rauno Piiroinen <piiroine@hytti.uku.fi>
Subject: Re: Who makes more $$ - Windows vs. Unix programmers?
Message-Id: <33271FCB.5C93@hytti.uku.fi>

James D. Corder wrote:

> Mac                     moped
> Personal Computer       Car
> Sparc 5                 S10 Pickup Truck
> Ultra 1                 1ton Pickup
> Sun 10,000              Mac Truck
> Ahmdahl                 Freight Train

No no no forget programming and sell gasoline. All of the above need
some.

 =

> James D. Corder                 Life is watching the ones you grow up


-- =

Rauno Piiroinen, Kihmulantie 6 A 5, 71800 SIILINJ=C4RVI
p. 017-462 4525, 040-503 6117, e-mail: piiroine@hytti.uku.fi
http://www.hytti.uku.fi/~piiroine


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

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

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