[7186] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 808 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 4 02:27:23 1997

Date: Sat, 2 Aug 97 07:03:15 -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           Sat, 2 Aug 1997     Volume: 8 Number: 808

Today's topics:
     Make extra cash..it works. <danthompson@hotmail.com>
     Re: Matching... <mark@tstonramp.com>
     Re: NEWBIE HELP <rootbeer@teleport.com>
     Re: Newbie: $in  question <rootbeer@teleport.com>
     Nifty Init of HoH <Joe.Kline@sdrc.com>
     Re: Nifty Init of HoH <rootbeer@teleport.com>
     Re: NT Perl Sources and problem (Scott McMahan)
     Re: OLE with Perl (Scott McMahan)
     Perl build fails ... libdl not found <jwing@pencom.com>
     Re: Perl won't cgi on WinNT <jzv20@amail.amdahl.com>
     Re: PerlIS.dll problem or something? (Nathan V. Patwardhan)
     Re: pls. help - trying to run programs from perl (Chris Schleicher)
     Re: Print Web Page a la netscape <adrianh@pobox.co.uk>
     Re: printing leading zeros in number (Tad McClellan)
     Re: Process number of executable run with system(); <rootbeer@teleport.com>
     Re: Q: testing for valid regexp (Eric Bohlman)
     Re: Q: testing for valid regexp <tibbs@hpc.uh.edu>
     Question: command line with perl and Web browser (Wes  James)
     Re: Regexp for postal address? <rootbeer@teleport.com>
     Re: resolving the csh ~user directory in perl <westxga@ptsc.slg.eds.com>
     Saving/restoring HASHes <wando@miro.amd.com>
     Telnet module in Win32 <serginho@alpha.hydra.com.br>
     Tie fails without error message Win95 and PWS (Parillo)
     Trouble Building PERL on HP 9.x <eric_white@mail.utexas.edu>
     Re: uppercase($mystring) ? (Chris Schleicher)
     Re: uppercase($mystring) ? (Eric Bohlman)
     Re: What is the constant of the universe <rootbeer@teleport.com>
     Re: Why does perl do this? <rootbeer@teleport.com>
     XS and C library:Question venu128@hotmail.com
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Wed, 30 Jul 1997 22:17:33 -0700
From: Dan <danthompson@hotmail.com>
Subject: Make extra cash..it works.
Message-Id: <33E01FE8.29F60CD7@hotmail.com>

MAKE A FORTUNE - AND THIS IS THE ABSOLUTE TRUTH!

IF YOU HAVE READ THIS FAR YOU HAVE ALREADY PROVED IT WORKS!!

TAKE JUST 5 MINUTES TO READ THIS AND SEE.


This is the newest updated version.
As I was surfing the net, I read all these postings on how you can
make over $50,000, even $800,000.  Well I believe that if all goes
well, and you follow the rules EXACTLY, it will work. Just follow the
instructions given in this letter, and you to can make over $800,000,
perfectly legally according to USA Post Office Laws (read on for
specifics).
Don't look at this as a  scam, but rather a true-to-life
example to test the above statement. It will only cost you $6 dollars
plus 6 stamps, and a few hours of your time. Thus, there is some
effort involved, because nothing in life is absolutely free. Are you
ready and willing to accept that you deserve to receive a fair amount
of ? If so, please continue reading. But if you think this is
just another scam, I suggest that you don't try it.

PLEASE NOTE: THIS IS A 6-PERSON LIST, NOT THE USUAL 5.
PLEASE DO NOT TRY TO CHEAT THIS PROGRAM. JUST ADD ONE NAME AND
REPOST THE ARTICLE.  IF YOU DO NOT IT WILL NOT WORK, AND YOU WILL BE
REMOVED
FROM THE LIST! FOLLOW THESE DIRECTIONS AND JOIN US IN A GREAT
OPPORTUNITY!

The program has been revised and you will notice six names instead of
five.
The reason for this is the flood of five name programs and the sixth
name will add $50000 to $100000. This is proven mathematically and in
my bank account. I never really thought that this program would work,
but IT DOES and it will for you too. Just be patient and follow the
directions exactly.

Print this article now, so you have all the information for your
 version.
Remember to keep the names right. Let's go!

STEP 1

Invest your $6 by writing your name and address on six separate pieces
of paper along with the words:

"PLEASE ADD ME TO YOUR MAILING LIST".

(In this way, you are not just sending a dollar to someone; you are
paying for a legitimate service.)
People have asked me if this is really legal.  It is! You are using
the Internet to advertise your business.  What is that business?  You
are assembling a mailing list of people who are interested in home
based computer and on-line businesses and methods of generating income
at home.
Remember - people send you a small fee to be added to your list. It is
legal. What will you do with your list of thousands of names?  That's
up to you, but this is how it becomes legal. To be legal you must
actually sell a product or service if you expect to receive a dollar.
Anyone sending a dollar back to you must receive something in return.
You have already received this letter due to the participation of each
of the 6 persons listed below. This letter and the plan given within
this letter are a "product" that you have received. Thus, you will be
sending $1.00 to each of the 6 persons given below in exchange for
receiving this letter and for asking them to provide the "service" of
adding you to their mailing list.
THIS IS A SERVICE AND IS A 100% LEGAL BUSINESS OPPORTUNITY WHICH I
COVERED IN TITLE 18, SECTION 1302 AND 1342 OF THE POSTAL AND LOTTERY
LAWS.
Now, please follow the given steps exactly to receive your desired
amount of :
Immediately send $1 US cash (a one dollar bill, no checks, no
orders) to each of the 6 people on the list below. Wrap this dollar in
a note with the words: "Please put me on your mailing list." (In this
way, you're not just sending a dollar to someone, you're paying for a
legitimate service.)

Also, to discourage those who prey on cash in the mail, be sure the
bill is completely hidden by the note. A woven envelope is
recommended.  Include your address. You do not need to include your
name. This is the key to the program!  Also, let each person know what
number they are in your letter so he/she knows which cycle he is
receiving the $1.00 from. Make sure that you
retain EVERY name and address sent to you, either on computer or hard
copy, but do not discard the names and notes that people send to you.
This is PROOF that you are truly providing a service, and should the
IRS or some other government agency question you, you can provide them
with this proof
Therefore, you will start a list of all the people who send you a
dollar requesting to be added to a mailing list.  Actually, you will
want to safeguard this list because it can generate even better
responses and much more  later!
Fold a $1 bill inside each paper, and mail them by standard mail to
the following six addresses:

1)    Lindsey W.
      736 Shivel Ln.
      Huntington, WV 25705
      USA

2)    Rudolfs Osins
      Aspazijas 37-4
      Jelgava, LV 3001
      Latvia

3)    J. DiMauro
      89 East Squire Dr.  Apt. 1
      Rochester, NY 14623
      USA

4)    D.Brottlund
      1588 Nokomis Dr.
      Colo Spgs, CO 80915-2605
      USA

5)    S. Bhattacharjee
      11008 Hard Rock Road
      Austin, TX 78750-1552
      USA

6)    Daniel Thompson
      492 W. 600 N.
      Spanish Fork, Ut 84660
      USA

STEP 2
Now remove the top name from the list, and move the other names up.
This way #6 becomes #5 and so on. Put your name in as the #6 on the
list (Remember to take #1 off and change the numbers so #2 becomes #1,
#3 becomes #2, #4 becomes #3, #5 becomes #4 and #6 becomes #5 and you
become #6.)


STEP 3
LET ME TELL YOU HOW MUCH  YOU CAN MAKE.
How do the numbers work for potential income earnings?  Assume for the
sake of example that you get a 7.5% return rate.  This is very
conservative; my first attempt was about 9.5%, and my second was over
 11%.

1. You send out 200 letters, and 15 people (7.5% x 200) will send you
$1 each. $15.00

2. Those 15 send out 200 letters each, and 225 people send you $1
each. $225.00

3. Those 225 send out 200 letters each, and 3,375 people send you
$1 each. $3,375.00.

4. Those 3,375 send out 200 letters each, and 50,625.00
people send you $1 each. $50,625.00

5. Those 50,625 send out 200 letters each, and 758,375 people send you

$1 each. $759,375.00

TOTAL $813,615.00!!  If those figures sound incredibly high, figure
that even with half the return rate, or even a quarter, the total is
still spectacular.  It works every time, but how well will depend on
how many letters you send. In the above example you mailed out 200
letters.
This sounds like "pie in the sky," but the numbers add up, and with
over 40 million people on the NET, it works!  TIP:  For an even
greater return, post to MORE than 250 newsgroups initially; try for
300-350.  When your name drops off a list, simply access another
message from a newsgroup and start the process over again.
Post the new article to at least 250 newsgroups. remember, the more
you post, the more people see, and the more you get. There are at
least 25,000 newsgroups at any one time.
This is a $7.92 investment. It takes about a week or so to start
seeing a return- so be patient. The  should flow for about 3
months. At that point, simply add your name to the list and start
over.
I've done this three times and now I can quit my job and start
investing in real estate full time. I assure you this can work.
If you mailed out 500 letters, you could have received even more!
Check the math yourself, but I guarantee it's correct.  With this kind
of return, you have got to give it a try!  Try it once, and you'll do
it again. Just make sure you send a dollar to each of the addresses on
the list above with a note asking to be added to their mailing list.
Together we will all prosper and we will be able to share our wealth
with those less fortunate than ourselves.

GOOD LUCK!!
GENERAL STEPS ON AUTOMATING THE PROCESS
--------------------------------------------------------------------------

If you have Netscape 3.0 do EXACTLY the following:

1)  Click on any newsgroup like normal, THEN click on 'TO NEWS', which
is on the far left when you're in the newsgroups page.  This will
bring up a box to type a message in.
2)  Leave the newsgroup box like it is, CHANGE the subject box to
something flashy, like,..
3)  Tab once and you should be ready to type.  Now, retype (only once)
THIS whole article WORD FOR WORD, except insert your name at #6,  and
remove #1 off the list, plus any other small changes you think you
need to make.
Keep almost all of it the SAME!
4)  When you're done typing the WHOLE article, click on FILE in THIS
BOX, RIGHT ABOVE SEND, NOT WHERE IT SAYS NETSCAPE NEWS ON THE FIRST
 BOX.
Click on SAVE AS when you're under FILE.  Save your article as a text

file to your C: or A: drive.  DO NOT SEND OR POST YOUR ARTICLE UNTIL
YOU DO THIS.  Once saved, move on to number 5 below.
NOTE:  If you don't want to type in the whole article by hand, AND you
know how to use a plain text editor (like Notepad), you can edit the
file ahead of time, then attach it as shown in step 6.
5)  If you still have all of your text, send or post to this newsgroup
now by just clicking send, which is right below FILE, and right above
Cc:
6)  Here's where you're going to post all 200.  OK, click on any
newsgroup then click on 'TO NEWS', again in the top left corner.
Leave the NEWSGROUPS BOX alone again, put a flashy subject title in
the SUBJECT BOX, hit TAB once you're in the body of the message.
Click on ATTACHMENTS, which is below the SUBJECT BOX.  You will get
another box to come up.  Click on ATTACH FILE, then find YOUR file
that if you did this right, you should see your file name in the
attachments box, and it will be shaded green.
NOTE:  If you don't want to type in the whole article and you know how
to use a plain text editor (Notepad), you can edit the file ahead of
time, then attach it.
IF YOU USE I.E. EXPLORER IT'S JUST AS EASY...HOLDING DOWN THE LEFT
MOUSE BUTTON, highlight this article.  Then press the "ctrl" key and
the "c" key at the same time to copy this article.  Then print this
article for your records, to have the names of those you will be
sending $1 bills to.
2)  Go to the news groups and press "post an article".   A window will
open.  Type in your headline in the subject area and then click in the
large window below.  Press "ctrl" and then "v" and the article will be
placed in the window.

If you want to edit the article, do so and then highlight and copy it
again.  Now every time you post the article in a new newsgroup all you
have to repeat is "ctrl" and "v" and press post.
3)  That's it.  Each time you do this, all you have to do is type in a
different newsgroup, so that way it posts to 200 DIFFERENT newsgroups,
or more.

You see?  Now you just have 249 to go!! (Don't worry, each one takes
about 30 seconds, once you get used to it.
REMEMBER 250 IS THE MINIMUM.  But the more you post the more  you
will receive.
AND THAT'S IT!!  THEY ARE ONLY STEPS!!!
--------------------------------------------------------------
(this is a later addition for extra ease of posting)
EXTRA TIPS:-

(ONLY) IF YOU ARE CONFIDENT WITH YOUR COMPUTER YOU CAN AUTOMATE YOUR
POSTINGS (and prevent spamming) AS FOLLOWS: (THIS Replaces the
previous section only i.e. 'GENERAL STEPS ON AUTOMATING THE PROCESS')
(using Netscape):

As you are reading this message click on "file" - "save message as",
enter a filename in the 'save as' dialog box, press "enter".
Now open "Notepad" (usually from "start" - "programs" - "accessories")
and open the message ( "file" - "open" ) you just saved. (You will
find it in the same folder you saved it and you may also find it
has a '.html' file extension). Then edit the letter EXACTLY as you
have been directed above. Just make sure you delete the
'system-message'
that appears at the top so that it makes sense when you read it!
Click on "edit" - "select all" (all the
text should now be highlighted) then again "edit" - "copy".
Leave Notepad alone for now and return to the Netscape News program:
Click on "options" - "show all newsgroups".
Now select (subscribe to) whichever groups you think are suitable by
moving down the entire listing and clicking in the appropriate empty
boxes. Once you have finished click "options" - "show subscribed
newsgroups".
Now simply click on the first group you want to post to, to highlight

it. Then choose the group about 10 further on and WHILE HOLDING DOWN
THE SHIFT KEY click on it. Next click on "file" - "new news message".

A message box will appear and after entering the "flashy" subject
line,
position the cursor in the main message area.
Click on "edit" -"paste"; the message will appear.
NOW CHECK IT!!
When you are satisfied everything is correct click "send" and it will
 be
sent to all 10 groups. Now repeat as many times as you need- very
simple!

PLEASE NEVER post to many more than 10 with any one message since
the resulting long lines of newsgroup listings at the top of EVERY
message will annoy many AND will vastly reduce the effectiveness of
your posting.
JUST ONE OTHER THING:
Let's remember that there are many people far less fortunate than
ourselves who will never be able to afford a computer and hence
will be unable to join in our enterprise. Therefore please consider
donating a (significant) portion of your earnings from the venture
to charity.
NOTE - "edit" - "copy" is exactly the same as pressing "ctrl" with "c"
       "edit" - "paste" is exactly the same as pressing "ctrl" with
 "v"






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

Date: Thu, 31 Jul 1997 22:37:57 -0700
From: "Mark J. Schaal" <mark@tstonramp.com>
Subject: Re: Matching...
Message-Id: <33E17635.616F@tstonramp.com>

J.Hernetkoski wrote:
> 
> I'd need to match all lines between <pre> and </pre>-tags
> and in the following code, $prices should include all text
> between <pre> and </pre>-tags.
> 
> ($prices) = ($results = m#<PRE> ([^</PRE>]*)#i);
> 
> $results contains an html-file, that have <pre>-tags, but
> I can't get it match.

First, you need to use =~ instead of that second = to bind
a variable to a pattern match.  Otherwise it is just matching
against $_ which is probably not going to return anything.

Second, the [] construct only considers individual characters.
That means your pattern is looking for any characters that are
not a < > / P R E.  It probably would be a little better to
use + instead of *, because you want the text to match something.

Third, if you are trying to make a list of all the prices you'll
need to use the 'g' modifier on the search an store your results 
into a list rather than a scalar.

I think something like the following will work for you:

  while ($results =~ m#<PRE>([^<]+)</PRE>#ig)
    { push(@prices, $1); }

working under the assumptaion that there are no other tags
withing the <PRE> segment, which is usually a decent 
assumption.


Another way of approaching this is to use index() to find
the <PRE> and </PRE> tags and then substr() to extract what
you want, but you lose the case insensitivity.

Or you could split on /PRE/i and discard the > and </ from
every other entry, but that won't be very obvious to the
poor person who has to maintain the code. :-)

mark
--
Mark J. Schaal		TST On Ramp Sysadmin	mark@tstonramp.com


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

Date: Fri, 1 Aug 1997 15:19:06 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Dalinka1 <dalinka1@aol.com>
Subject: Re: NEWBIE HELP
Message-Id: <Pine.GSO.3.96.970801151156.29910O-100000@kelly.teleport.com>

On 1 Aug 1997, Dalinka1 wrote:

Subject : Re: NEWBIE HELP

Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.

    http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post

> print <<END_of_Multiline_Text

The most frequent reason that this gives troubles (by far) is that the end
tag has leading or trailing whitespace which keeps it from matching. (But
you may also have trouble if you don't put a semicolon after the line of
code.)

    print <<"END_MARK";
    stuff to print
	Of course, you know that END_MARK is to be flush left!
	I've indented it here to set off source code from
	my prose. 
    more stuff
    END_MARK

If you find you have troubles when moving scripts between Unix-type
systems and non-Unix systems, you're probably doing something like not
using a text transfer mode for your FTP client. Since line endings (which
are whitespace) are often different on different systems, it's important
to have the right ones for the system you're on. (Recent versions of Perl
should complain immediately, rather than waiting until they see a
here-document, when your script has the wrong line endings.) 

Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 1 Aug 1997 15:55:18 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Bill Ott <bott@grapids.lib.mi.us>
Subject: Re: Newbie: $in  question
Message-Id: <Pine.GSO.3.96.970801155416.12810B-100000@kelly.teleport.com>

On Fri, 1 Aug 1997, Bill Ott wrote:

> I perform a get and call a cgi script, but when I try and look at $in,
> it keeps the name of the form item attached (i.e. $in = 'num=123').

You should really be using a module, like CGI.pm, which will take care of
these things for you.

> How can I strip off the 'num=' and just keep the value?

One way would be to use substr, either with or without index. Both
functions are documented in perlfunc(1). Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 01 Aug 1997 09:31:11 -0400
From: Joe Kline <Joe.Kline@sdrc.com>
Subject: Nifty Init of HoH
Message-Id: <33E1E51F.3F54@sdrc.com>

> A slice is a simply shortcut for a list. These two are equivalent.
> 
>     ($foo[1], $foo[80], $foo[7])
>     @foo[1, 80, 7]
> 
> As are these.
> 
>     ($foo{one}, $foo{eighty}, $foo{seven})
>     @foo{qw(one eighty seven)}
> 
> A slice is most useful when the subscripts are in a list variable or list
> expression. For example...
> 
>     @big{ keys %little } = values %little;      # merge %little into 

what if we took this a bit further and tried to do this for a 
Hash of Hashes?

  %count =
        (
         p0 =>
         {
             lc => "0",
             tot => "0",
         },
         p1 =>
         {
             lc => "0",
             tot => "0",
         },
         p2 =>
         {
             lc => "0",
             tot => "0",
         },
         gtot =>
         {
             lc => "0",
             tot => "0",
         },
         );

How would I make this initilization "easier"?

I was thinking of having 3 arrays:
@keysa = qw(p0 p1 p2 gtot)
@keysb = qw (lc tot)
@vals  = qw(0 0);

would the following work.

@count{@keysa} = (@keysb{@vals}, @keysb{@vals}, @keysb{@vals})

I feel like I am missing something, but can't quite figure
it out.

Thanks,

joe
--
Joe.Kline@sdrc.com


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

Date: Fri, 1 Aug 1997 13:33:45 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Joe Kline <Joe.Kline@sdrc.com>
Subject: Re: Nifty Init of HoH
Message-Id: <Pine.GSO.3.96.970801132608.29910I-100000@kelly.teleport.com>

On Fri, 1 Aug 1997, Joe Kline wrote:

>   %count =
>         (
>          p0 =>
>          {
>              lc => "0",
>              tot => "0",
>          },
>          p1 =>
>          {
>              lc => "0",
>              tot => "0",
>          },

    [ snipped: a couple more of the same ]

>          );
> 
> How would I make this initilization "easier"?

I don't know whether it's easier, but you _could_ do this. (I don't like
it, but at least it's short.) 

    @keys = qw(p0 p1 p2 gtot);
    @count{@keys} = map { { lc => "0", tot => "0", } } @keys;

Somebody else should see a better way, but it's not coming to me at the
moment. Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: 1 Aug 1997 22:29:30 GMT
From: scott@lighthouse.softbase.com (Scott McMahan)
Subject: Re: NT Perl Sources and problem
Message-Id: <5rto0a$kfq$2@mainsrv.main.nc.us>

rewards (rewards@compusmart.ab.ca) wrote:

:  If you find anything regarding PERL on WinNT 4.0 Server I would
: appreciate knowing.  I am a so-called Newbie to Perl let alone on a NT
: Server.  It seems all the info and FAQ's is on UNIX.  Some FAQ's or
: basic procedures would really help about now.

The book Cross-platform Perl covers Win32.  It's the only book
right now that does in any serious way (there are a few
tutorial books written from a Win32 perspective, but CP Perl
is the only on that talks about doing anything). It's 
a good book.

What scant coverate of Win32 Perl I can turn up will be reviewed
on my Windows 95 Book FAQ page, now at its newer, faster
server. http://www.skwc.com/essent/w95book.html

Scott



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

Date: 1 Aug 1997 22:24:34 GMT
From: scott@lighthouse.softbase.com (Scott McMahan)
Subject: Re: OLE with Perl
Message-Id: <5rtnn2$kfq$1@mainsrv.main.nc.us>

Sergio Stateri Jr (serginho@alpha.hydra.com.br) wrote:
: Hi ! I try to do a Perl test with Ole, but Perl tell me :

: C:\DOWN\Testes>perl test-ole.pl
: Undefined subroutine &Win32::OLECreateObject called at C:\PERL\LIB/OLE.pm
: line 103.

: I installed libwin32 yet. then What's wrong ?

Do you have the line

use ole;

in your program?

Scott


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

Date: Fri, 01 Aug 1997 15:06:00 -0400
From: "John C. Wingenbach" <jwing@pencom.com>
Subject: Perl build fails ... libdl not found
Message-Id: <33E23397.3AA0E44E@pencom.com>

Ok.. Now I know that the libdl is for dynamic linking.  The configure
run finds libdl.so.  But for some reason it wants to use libdl to build
everything (including static builds).  Of course I have no libdl.a.  Now
the question is, what can I do to get my perl 5.004 to build on my linux
box?  I have tried making a libdl.a with void stubs in the routines.
But then the build fails its tests.

--  ____  _____ ___
   / __ \/ ___//   | John C. Wingenbach       Current Assignment
  / /_/ /\__ \/ /| | email: jwing@pencom.com
 / ____/___/ / ___ | Tel: (919) 845-1169
/_/    /____/_/  |_| Fax: (919) 870-6642
                     Pager:
Pencom Systems Administration -- Wherever I go, there WE are.





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

Date: Fri, 1 Aug 1997 18:28:25 GMT
From: John Verhagen <jzv20@amail.amdahl.com>
Subject: Re: Perl won't cgi on WinNT
Message-Id: <33E22AC9.6840@amail.amdahl.com>

Found the answer to my own question, while stumbling on the site at:
http://www.geocities.com/SiliconValley/Park/8312/perlis.htm

The solution was to place perlIS.dll and perl100.dll from the Unleashed
book into c:\perl\bin and change the registry using
c:\winnt\system32\regedt32.exe at HKEY_LOCAL_MACHINE, System,
CurrentControlSet, Services, W3SVC, Parameters, Script Map, by adding
 .pl:reg_sz: c:\perl\bin\perlIS.dll



John Verhagen wrote:
> 
> I'm new to Perl, and have installed it on my work Machine
> Window NT Server 4.0
> IIS 2.0
> 
> Everything is working fine, so now to install it on the production
> server, which has the same configuration. I download and install the
> latest version:
> ftp://ftp.digital.com/pub/plan/perl/CPAN/ports/win32/Perl5/Release/Pw32i307.exe
> The installation goes without a hitch.
> I reboot the server.
> The test from the command line works okay.
> However, my form "Form1.htm" with <form action="/cgi-bin/gfm.pl">
> tries to list gfm.pl instead of executing it.  POST and GET have the
> same results.
> 
> Looking back at my work Machine, where this worked okay, I see that I
> had originally installed a copy of Perl from the book Perl 5 Unleashed,
> and then installed it again from
> ftp://ftp.digital.com/pub/plan/perl/CPAN/ports/win32/Perl5/Release/Pw32i306.exe
> This left an association of .pl with plfile whereas the production
> server associates .pl with Perl.  Both work and production servers point
> to "c:\perl\bin\perl.exe %1 %*" in the registry.
> 
> So far, this is the only difference I can see in the two machines.
> 
> Are there any words of wisdom that can make the production machine work
> so that I can get back to writing Perl instead of installing it?
> 
> John.


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

Date: 2 Aug 1997 01:04:07 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: PerlIS.dll problem or something?
Message-Id: <5ru127$oag@fridge-nf0.shore.net>

Nick Ioffe (nick@alekto.com) wrote:

: but when I run is from web with PerlIS.dll i get no response from the
: server,

I have no idea what you're trying to do.  All I see is that you're
opening a socket and doing something with the information ... what are
you trying to output?  What kind of server is your program talking to?
More information and code would be helpful.

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: 1 Aug 1997 11:38:12 -0700
From: chrissch@cs.uoregon.edu (Chris Schleicher)
Subject: Re: pls. help - trying to run programs from perl
Message-Id: <5rtaek$b0e@psychotix.cs.uoregon.edu>

In article <01bc9dbb$e8aba720$058d48ce@mikec>,
Mike Cloppert <mikec@dlpco.com> wrote:
> When I run the perl script from the UNIX command prompt, I get the
> correct ouput in the correct format (the output is HTML for a report).
> Yet when I run the perl script from the web browser, I get a server
> error.

Hmmm.  Sounds like you've got file permission problems.  You do know
webservers commonly run as unpriviliged users such as 'nobody' or
'httpd' right?  Have you checked who can execute whatever external
program you're trying to call?


> The output *seems* to be going somewhere other than STDOUT, but I
> cannot confirm this.

On what do you base this?  What does the error log say?


> The script runs fine without the "system($command)" call from both the
> command prompt & the browser.  I have tried both "system" and "exec",
> and I get the same results with both.

I'm almost certain exec() isn't what you want--it /never/ returns.


> I have also tried this in multiple browsers, but the server error
> persists.  PLEASE HELP me if you can offer any suggestions.  Thank
> you, your help is GREATLY appreciated.

It's not a browser-related problem.  Look at the server's error log if
you can.  Also, a quick read through the Please-Don't-Be-Offended-By-The-Title
Idiot's Guide to Solving Perl/CGI Problems at:

    http://www.perl.com/perl/faq/cgi/idiots-guide.html

might be worth your time.


Hope this helps,

--Chris
-- 
     Chris Schleicher                      Office:  541/346-3998
     Univ of Oregon CIS GTF                email: chrissch@cs.uoregon.edu
                URL: http://www.cs.uoregon.edu/~chrissch/


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

Date: Fri, 01 Aug 1997 14:23:00 -0400
From: Adrian Hawryluk <adrianh@pobox.co.uk>
Subject: Re: Print Web Page a la netscape
Message-Id: <33E22981.C516BD32@pobox.co.uk>

Joe Kline wrote:

> Anyone,
>
> I want a script that dumps a web page to a printer.
>
> I have looked through a great many resources (FAQ,
> Dejanews, _CGI Programming_, Blue Camel, Randall's Web
> Techniques,...) and all I seem to find is how to download
> the source document of the web page.
>
> What I am looking for is a way to print the web page the way it
> looks viewed through a browser (something similar to the print
> icon in netscape).
>

If you don't mind it in text mode, try the following:

lynx -dump <URL> | lpr

That will print out the page found at <URL> (includes link references)
type: lynx -help for more info.

Adrian



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

Date: Thu, 31 Jul 1997 18:19:30 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: printing leading zeros in number
Message-Id: <2i6rr5.bm3.ln@localhost>

Nihar Jindal (njindal@san-jose.ate.slb.com) wrote:
: How do I print the leading zeros in a number?  I am printing out a 
: time and I want the numbers I print to always be 2 digits long, even
: if they are less than 10.  Example:
:    $min = 4;
:    when I print the time I want to print:
:     4:04.32 
: I do not want to print: 4:4.32 or 4: 4.32

: Using printf with %2d would print " 4" because it will not print
        ^^^^^^^^^^^^^^^

Would you believe using printf with %02d  ;-)


: the leading zero.  Is there some simple way of doing this?


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


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

Date: Fri, 1 Aug 1997 16:32:27 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Brett Denner <Brett.W.Denner@lmtas.lmco.com>
Subject: Re: Process number of executable run with system();
Message-Id: <Pine.GSO.3.96.970801163010.12810G-100000@kelly.teleport.com>

On Fri, 1 Aug 1997, Brett Denner wrote:

> I need to run an executable with the system() command and save its
> process number to a file.  

By the time that Perl is executing your code, the process started by
system is dead and gone. Maybe you want to fork a child process and keep
its process id? 

> Later, I need to read the process number of this running executable from
> within another perl script so I can kill the running process if I need
> to. 
> 
> Is this possible?

You bet! (At least, if you use fork instead of system.) fork, exec,
system, and kill are all documented in perlfunc(1). Hope this helps! 

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 1 Aug 1997 22:24:18 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Q: testing for valid regexp
Message-Id: <ebohlmanEE9A8I.L9w@netcom.com>

Peter Riocreux (peter.riocreux@cs.man.ac.uk) wrote:
: ways there were, and their relative merits.  One way which occurred to
: me but I haven't ben able to try is just to match the string
: containing the regexp I want to test with a regexp describing regexps
: (if anyone followed that).  Does anyone know what such a regexp would
: be?  Or have any other suggestions?

Such a regexp doesn't exist.  The set of all valid regular expressions is 
a context-free language, not a regular language, and hence can't be 
described by a regular expression.  While Perl regexes can recognize 
languages that are not strictly regular languages, they can't recognize 
context-free languages in general (in particular, regular expressions can 
include nested parentheses, and a regex can't match those).



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

Date: 01 Aug 1997 18:00:40 -0500
From: Jason L Tibbitts III <tibbs@hpc.uh.edu>
Subject: Re: Q: testing for valid regexp
Message-Id: <ufa204dtso7.fsf@sina.hpc.uh.edu>

>>>>> "TP" == Tom Phoenix <rootbeer@teleport.com> writes:

TP> Majordomo (the popular mailing list management program written in Perl)
TP> does this same sort of thing, so you may want to see how it does
TP> it. (It allows list owners to control some aspects of a list with Perl
TP> regular expressions.)

What Majordomo does is kind of painful, really, but generally functional.
It wants to see regexps like

/blah.blah*$/i

in its config file, and checks using this chunk of code (from
config_parse.pl):

  elsif ($re !~ m:^((/)|m([^\w\s])):) {
    push(@re_errors,
         "|$re| not a valid pattern match expression at line $.\n");
  }
  else {
    $dlm=($2||$3);
    if ($re !~ m:^m?$dlm[^\\$dlm]*(\\.[^\\$dlm]*)*$dlm[gimosx]*$:) {
      push(@re_errors,
           "|$re| not a valid pattern match expression at line $.\n");
    }
    elsif (eval "'' =~ $re", $@) {
      push(@re_errors, $@);
    }

So it checks some basic syntax, then uses eval to match an empty string and
reports any errors.  It might still be possible to sneak something evil in
there.

Given perl5, though, this can all be made much safer by just using the Safe
module and prohibiting any but a very limited set of operations.  I do:

  $safe->permit_only(qw(const leaveeval null pushmark return rv2sv stub));

and I could probably get away with less than that for simple regexp
matches.
-- 
  Jason L. Tibbitts III - tibbs@uh.edu - 713/743-3486 - 622PGH
System Manager:  University of Houston Department of Mathematics 
              1994 PC800 "Kuroneko"     DoD# 1723


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

Date: Fri, 01 Aug 1997 19:16:19 GMT
From: wesj@ext.usu.edu (Wes  James)
Subject: Question: command line with perl and Web browser
Message-Id: <33e2354b.4553547@cc.usu.edu>

Hi!

I have a perl script I would like to send parameters to on a URL line
on a Web browsers:

I have tried:

	http://host/perlscript.pl?param1

but this does not work.  How do I send params to a perl script other
than embedding them in a form and using cgi.pm like stuff to grab it.


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

Date: Fri, 1 Aug 1997 13:21:23 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Michael Schuerig <uzs90z@uni-bonn.de>
Subject: Re: Regexp for postal address?
Message-Id: <Pine.GSO.3.96.970801125642.29910G-100000@kelly.teleport.com>

On Fri, 1 Aug 1997, Michael Schuerig wrote:

> > > Firstname Lastname
> > > Street or PO Box
> > > City Zip

> The best thing would be if I could select an arbitrary chunk of text an
> get all contained addresses. But in by far the most cases it's perfectly
> okay to select just the address and get it broken down into pieces.

Okay, let me take a try at it. This is not going to be perfect, but maybe
it's a start. 

    $matched = m{
	\A			# Beginning of string
	\s*			# Any leading whitespace
	(?:			# Grouping parens
	    (\S+)		# One name only in $1
	|			# or
	    (.+?)\s+(\S+)	# Names in $2 and $3
	)
	\n			# Break between lines 1 and 2
	\s*			# Any leading whitespace
	(.+)			# Street or PO Box in $4
	\n			# Break between lines 2 and 3
	\s*			# Any leading whitespace
	([\w\s]*)		# City in $5
	,?			# Optional comma
	\s+			# Required whitespace
	([A-Z]{2})		# Two-letter state abbr. in $6
	\s+			# Required whitespace
	(\d\d\d\d\d		# Five-digit zip in $7
	    (?:			# Grouping parens
	        -\d\d\d\d	# or extra four digits
	    )?			# optionally
	)
	\Z			# End of string
    }x;
    warn "Didn't match" unless $matched;

You can see that parsing an address (even if it's known to be a US
address) is tough. And I've probably made some mistakes in there, too,
since I've left QC for you to do. :-)

Algorithmically, it's also flawed. How can a computer know which is the
city and which is the state in these? (It helps if there's a comma!)

    Sioux City Iowa
    Bismarck North Dakota

Similarly, how can the computer know where the last name begins is in
these? 

    Brian Austin Green
    Robert De Niro

And I didn't make any attempt to match four-line addresses, or to ensure
that a non-address doesn't match. But, as I said, maybe it's a start. Hope
this helps! 

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Thu, 31 Jul 1997 10:02:27 +0000
From: Glenn West <westxga@ptsc.slg.eds.com>
Subject: Re: resolving the csh ~user directory in perl
Message-Id: <33E062B3.F49@ptsc.slg.eds.com>

Mark Redar wrote:
> 
> Hi,
> 
> I'm trying to find a way to resolve the csh user home directory alias
> (~user) in perl. Any ideas??
> 
> thanks,
> 
> mark

man perl gets you close by using
$home=$ENV{'HOME'}||$ENV{'LOGDIR'}||(getpwuid($<))[7];

the quick answer is something like:

$var='~user';
$var=~s/~(\w+)/$1/;
$home=getpwnam($var);


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

Date: Fri, 01 Aug 1997 15:26:06 -0500
From: "Daniel J. Wandeler" <wando@miro.amd.com>
Subject: Saving/restoring HASHes
Message-Id: <33E2465E.6A33@miro.amd.com>

I am creating a fairly large hash, and I would like to save the state
of to a file, so that I can open it at a later time. Ideally I would
like to create the hash on disk rather than in memory. Are there any
perl5 modules which handle this?

-- Dan

-----------------------------------------------------------------------
Daniel J. Wandeler         email: Daniel.Wandeler@amd.com
Advanced Micro Devices            wando@miro.amd.com
CAD Technology & Systems   voice: 512/602-2838 or 1-800-538-8450 x52838
Austin, TX                   fax: 512/602-9649 or                x59649
-----------------------------------------------------------------------


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

Date: 1 Aug 1997 17:56:40 GMT
From: "Sergio Stateri Jr" <serginho@alpha.hydra.com.br>
Subject: Telnet module in Win32
Message-Id: <01bc9ea4$9c325260$ca75e7c8@AFXTD_202.Autofax>

Hi! I installed Telnet module in my Win'95 system, and when I try to run a
testp Script, it tell me :

C:\DOWN\Testes>perl teste.pl
Can't locate object method "new" via package "Net::Telnet" at teste.pl line
8.

What's happening ? In Telnet docs is written that it doesn't need of any
module...

-- 
----------------------------------------------------------
Sergio Stateri Jr
Sco Paulo (SP) - Brazil
e-mail: serginho@mail.serve.com
----------------------------------------------------------


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

Date: 1 Aug 1997 18:00:20 GMT
From: lparillo@newshost.li.net (Parillo)
Subject: Tie fails without error message Win95 and PWS
Message-Id: <5rt87k$f5b$1@news01.li.net>

I have created a SDBM file in my c:\webshare\scripts directory, but when I 
try to read it back, it fails without printing the die message. It does
not print my "after tie" message either.

lparillo at suffolk dot lib dot ny dot us

Here is the code:

#!c:\perl\bin\perl -w

require 5.001;
use strict;
require "cgi-lib.pl2";

MAIN:
{

my ( %input     # The CGI data passed from expert.htm
   , $question  # A local variable I will stuff the question into.
   , @words     # All the words from the question
   , @tokens    # The relevant words
   , $keyword   # The relevant word (one at a time)
   , %db_read   # Hash from tied file containing concepts and definitions
   , $concept   # The concept from the data base
   );

sub O_CREAT  { 0x0100 } # Required for the Tie file.
sub O_BINARY { 0x8000 } # Required for the Tie file.
sub O_RDWR   { 0x0002 } # Required for the Tie file.

#
# Start Page
#
  print "HTTP/1.0 200 OK\r\n" if $ENV{PERLXS} eq "PerlIS";
  print "Content-type: text/html\n\n";
  print "<HTML>", "\n";
  print "<HEAD>", "\n";
  print "<TITLE>Expert Lookup Results</TITLE>", "\n";
  print "</HEAD>", "\n";
  print "<BODY bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#005153\" 
vlink=\"#800080\" alink=\"#005153\">\n";
  print "<H1>Expert Lookup Results for:</H1>", "\n";
#
# Accept CGI Input using cgi-lib subroutine
#
  &ReadParse(\%input);
#
# Parse the cgi input for the question (In lower case)
# Strip out extra punctuation
# Split the question into individual words
# Collect the non-"noise" words into @tokens
#
  $question = lc($input{'question'});
  $question =~ s/[\?|\'|\"]//g;
  print "<H2>", $question, "</H2>";
  @words = split(/ /, $question);
  @tokens = &relevant(@words);
#
# Open and plow through the definitions data base
# searching for a match.
#
  tie (%db_read, 'SDBM_File', 'my_db', O_RDWR | O_CREAT | O_BINARY, 0666)
     || die ("read tie died: $!");
  print "after tie";
  foreach $concept (keys %db_read) {
    foreach $keyword (@tokens) {
      print "<P><B>keyword: ", $keyword, "</B>\n";
      print "<P>$concept: $db_read{$concept}\n"
    }
  }
#
#  close up and exit
#
  untie %db_read;
  print "</BODY>", "</HTML>", "\n";
}

sub relevant {

  my ( $word
     , @tokens
     );

  foreach $word (@_) {
    if (($word eq "what") or
        ($word eq "how") or
        ($word eq "who") or
        ($word eq "you") or
        ($word eq "do") or
        ($word eq "an") or
        ($word eq "is") or
        ($word eq "it") or
        ($word eq "a") or
        ($word eq "i")) {
      print "<p>noise: ", $word;
    } else {
      push @tokens, $word;
    }
  }
  return @tokens;
}


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

Date: 1 Aug 1997 21:12:22 GMT
From: "Eric White" <eric_white@mail.utexas.edu>
Subject: Trouble Building PERL on HP 9.x
Message-Id: <01bc9ebf$84773bc0$a4335380@bigdog>

I've got an HP 712/60 running HPUX 9.05 and can't get PERL 5 (.003/4) to
build.  Basically it gets to compiling gv.c and chokes -- complaining
about:

[5] % gmake
`sh  cflags libperl.a gv.o`  gv.c
          CCCMD =  gcc -DPERL_CORE -c -D_HPUX_SOURCE -I/usr/local/include
-O
gv.c: In function `Perl_amagic_call':
gv.c:1325: `copy' undeclared (first use this function)
gv.c:1325: (Each undeclared identifier is reported only once
gv.c:1325: for each function it appears in.)
gv.c:1325: parse error before `_amg'
gmake: *** [gv.o] Error 1                                                  
   

of course, it's complaining about a case identifier (copy_amg) as it it was
a function call....

I've tried both cc and gcc and make and gmake.

Anybody else seen these or got an idea?

thanks


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

Date: 1 Aug 1997 15:06:51 -0700
From: chrissch@cs.uoregon.edu (Chris Schleicher)
Subject: Re: uppercase($mystring) ?
Message-Id: <5rtmlr$b8r@psychotix.cs.uoregon.edu>

In article <33E1C55D.1BDC@atos-group.com>,
Frederic Gaume  <fgaume@atos-group.com> wrote:
>How to uppercase a string in perl ?

You read the documentation? ;-)  Searching for 'uppercase' in perlfunc,
I find right away:

     uc EXPR

     uc      Returns an uppercased version of EXPR.  This is the
             internal function implementing the \U escape in
             double-quoted strings.  Respects current LC_CTYPE
             locale if use locale in force.  See the perllocale
             manpage.

             If EXPR is omitted, uses $_.

but of course you could also check out the cross-reference to \U and do:

    $upcased = "\U$mystring";

which also works well.


Hope this helps,

--Chris
-- 
     Chris Schleicher                      Office:  541/346-3998
     Univ of Oregon CIS GTF                email: chrissch@cs.uoregon.edu
                URL: http://www.cs.uoregon.edu/~chrissch/


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

Date: Fri, 1 Aug 1997 22:17:12 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: uppercase($mystring) ?
Message-Id: <ebohlmanEE99wo.Kxq@netcom.com>

Aaron Sherman (ajs@lorien.ajs.com) wrote:
: Frederic Gaume <fgaume@atos-group.com> writes:

: > How to uppercase a string in perl ?

: 	$string = uc($string);

Good.

: 	$string =~ tr/a-z/A-Z/;

Not locale-safe.  When in Rome, it does as the Americans do.

: 	$string =~ s/([a-z]+)/\U\1/g;

Ditto.


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

Date: Fri, 1 Aug 1997 16:15:15 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Adrian Hawryluk <adrianh@pobox.co.uk>
Subject: Re: What is the constant of the universe
Message-Id: <Pine.GSO.3.96.970801161347.12810E-100000@kelly.teleport.com>

On Fri, 1 Aug 1997, Adrian Hawryluk wrote:

> I can't seem to find a way of declaring constants or defining them. 

When you install 5.004, you will be able to declare constants like these.
Hope this helps! 

    use constant BUFFER_SIZE    => 4096;
    use constant ONE_YEAR       => 365.2425 * 24 * 60 * 60;
    use constant PI             => 4 * atan2 1, 1;
    use constant DEBUGGING      => 0;
    use constant ORACLE         => 'oracle@cs.indiana.edu';
    use constant USERNAME       => scalar getpwuid($<);
    use constant USERINFO       => getpwuid($<);

    sub deg2rad { PI * $_[0] / 180 }

    print "This line does nothing"              unless DEBUGGING;

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 1 Aug 1997 12:55:04 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Soren Dayton <csdayton+usenet@cs.uchicago.edu>
Subject: Re: Why does perl do this?
Message-Id: <Pine.GSO.3.96.970801123628.29910F-100000@kelly.teleport.com>

On Fri, 1 Aug 1997, Soren Dayton wrote:

> My criticism is that a function in perl gets arguments passed to it
> through the global variable `@_'.  Why is it that `map' and `sort' do
> not take functions?  Or rather why is it that they take functions that
> are not treated as functions? 

Ah, now I see what you're asking. [ Here's a little background information
which you may already know, for the benefit of the readers playing along
at home. ]

Either map or sort (or grep, for that matter) can be given an expression
to evaluate to control its operation.

    print map "  '$_'\n", @INC;

If you choose, you may use a block instead of an expression. (Also, this
way you omit the comma.)

    print map { "  '$_'\n" } @INC;

This is handy if you want to do more complex things than you could in a
normal expression.

   print map {
	my $copy = $_;
	$copy =~ s/([\\'])/\\$1/g;	# Backwhack as needed
	"  '$copy',\n"
   } @INC;

This block is not a subroutine. You can't return from it, and it doesn't
take subroutine calling conventions. Instead, it is given the magical $_
variable to work on. (In the case of sort, it's given $a and $b, in much
the same way.)

In the case of sort, some of these blocks are large and complex to in-line
like this. More importantly, it is frequent to need to use the same one
more than once in your program. So, you can replace the block in sort with
a reference to a sort-order subroutine. That sub uses the same method for
passing and returning information. Naturally, that is a different method
than other subs use, but this way the sub can be written in the same way
whether it's in-lined or not. 

I don't know why map can't take a code reference. Maybe Larry never
thought of it. Or maybe he thought about it a lot more than I have. :-)

> Why does perl not `Do What I Expect' in situations like this?  Or,
> perhaps, I am somehow expecting wrong?  So how should I learn to have
> `What I Expect' be what perl does? 

Yes! That's the real solution. Once you expect Perl to do just what it
actually does, you'll never be frustrated with it again! :-) 

I sometimes tell students in my Perl classes that a big part of learning
Perl is learning how Larry Wall thinks. Once you can think like Larry, it
all makes sense to you. I hope we both can get there someday. Good luck! 

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 01 Aug 1997 16:12:18 -0600
From: venu128@hotmail.com
Subject: XS and C library:Question
Message-Id: <870469748.15221@dejanews.com>

Hello All;

	Could someone help me out on how to the  the following function defined
in a file(My_client.h)

	int My_initClientLibrary(
		char * host,
		MY_MESSAGE * message
		)

	in a normal c program I would do the folloeing;

	MY_MESSAGE message;
	if(My_initClientLibrary(char*)getenv("MY_SERVERHOST"),&message) ==
MY_SUCCESS){/*do something useful */}
	else{/*exit with error */}


	MY_MESSAGE and MY_SUCCESS are defined in My_client.h;(MY_MESSAGE is a
structure);

	I am new to XS and am finding it difficulkt to write the typemap here.I
would particularly appreciate any detailed steps; including any necessary
changes to the Makefile.PL.

Thanks in advance.

Regards.
Venu

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


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

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

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