[6829] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 454 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 8 23:07:20 1997

Date: Thu, 8 May 97 20:00:24 -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           Thu, 8 May 1997     Volume: 8 Number: 454

Today's topics:
     Re: A Perl Question (Bill)
     Re: Any PERL 5.001, NT, AOL Browser Problems? <cassius@network-edge.com>
     Camel Book Co-author Randal Schwartz Teaching Open Perl <s..vanechanos@postoffice.worldnet.att.net>
     Can't locate sys/socket.ph in @INC (did you run h2ph?) WSchuel@stud.uni-goettingen.de
     Re: composing a key out of 2 fields (Kyzer)
     Re: Dates <mishra.aditya@emeryworld.com>
     Free: Make 3D scan from real object to virtual object <amocomp@dds.nl>
     Re: Have a question? Post it here at the CGI Discussion (brian d foy)
     Help Me: Need an array of filehandles <omnimax@dfw.net>
     how to get a recursive file listing <akrohn@spc.ca>
     Re: how to get a recursive file listing (Terrence M. Brannon)
     HTML question <rick1234@imperium.net>
     Re: Information on PERL 5 <peapod@rahul.net>
     Re: Loosing clpm regulars (was Re: Perl auto-replier) (Kyzer)
     Neede: Resellers for Adv. Comp. Products.(only serious  <amocomp@dds.nl>
     Neede: Resellers for Adv. Comp. Products.(only serious  <amocomp@dds.nl>
     Re: New Perl programmer in need of tutorials (Steve)
     Novice needs help pulling pattern to match as a variabl tnoto@interramp.com
     Re: Perl auto-replier (Kyzer)
     Re: Perl auto-replier <millerm@azstarnet.com>
     Perl/HTML/Win 3.1 Newbie question... <mberry@xmission.com>
     Re: Programmin Perl on MacOS (Paul J. Schinder)
     q: 500 directories and NOBODY owns them (Scott)
     Re: quoting a separator for split() (Geoffrey Hebert)
     reading a complex record from file (Shawn)
     Re: Sending e-mail from within a perl script - help (Geoffrey Hebert)
     Subtracting large numbers with "&bsub" routine? Martin Mathis
     Re: Subtracting large numbers with "&bsub" routine? <ajohnson@gpu.srv.ualberta.ca>
     Re: Syntax checking? <peapod@rahul.net>
     Re: variable names in array problem (Quentin Fennessy)
     Re: What is the rationale for this calling convention? (Ilya Zakharevich)
     Win32 Perl <jon_brule@nt.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 8 May 1997 23:26:29 GMT
From: bill@sover.net.no.junkmail (Bill)
Subject: Re: A Perl Question
Message-Id: <slrn5n4o95.6p3.bill@granite.sover.net>

In article <5ktk9t$d8m$1@news7.gte.net>, William Stranathan wrote:
>try:
>
>$summary =~ s/(.*)\((.*)/\1\2/;
>I know that's weird looking, but...
>
>Search for 0 or more of any kind of character, followed by an open paren
>followed by any number of chars.  Replace with the first set of chars, then
>the second.
>Ooops!  Gurus:  with regexps being as greedy as they are, would the
>following happen?
>
>$summary = "foo((bar";
>$summary = s/(.*)\((.*)/\1\2/;
>print "$summary";
>
>would that give foo(bar ?
>
>Hmmm...
>Will Stranathan
>stranw@gte.net

   Don't forget to use $1 and $2 rather than \1 and \2 when doing a 
substitution.  I seem to recall that being an awk thing...could be 
wrong.  Incidentally, why not just replace what you'd like to remove with 
nothing?  Something like:

  $summary =~ s/\(//g;
   						Bill
-- 
Sending me unsolicited email through mass emailing about a product or
service your company sells ensures that I will never buy or recommend your
product or service.


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

Date: Thu, 08 May 1997 17:31:17 -0700
From: Cassius Downs <cassius@network-edge.com>
Subject: Re: Any PERL 5.001, NT, AOL Browser Problems?
Message-Id: <33727055.6318@network-edge.com>

We are are experiencing problems with AOL's browser and not IE or
NetScape. We get a message 'Cannot retrieve <Perl CGI Script Name>'

Has anyone else experienced any AOL browser problems? If so, please let
me know the cause and remedy please.

Thanks Much!


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

Date: 9 May 1997 02:27:15 GMT
From: Steve Vanechanos <s..vanechanos@postoffice.worldnet.att.net>
Subject: Camel Book Co-author Randal Schwartz Teaching Open Perl in NYC/NJ on May 15th
Message-Id: <5ku223$ko1@mtinsc03.worldnet.att.net>


We are hosting an open enrollment, one day, advanced perl class on May 
15th in Fairfield NJ.  Seating is limited.

Details at http://www.dynamicweb.com/perl_class

-- 
Steve Vanechanos, CEO                   http://www.dynamicweb.com
DynamicWeb Enterprises, Inc             Voice: 201-244-1000
271 Rt 46 West; Building F              Fax:   201-777-7428
Fairfield NJ 07004                      Email: stevev@dynamicweb.com




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

Date: Fri, 09 May 1997 02:23:55 +0200
From: WSchuel@stud.uni-goettingen.de
Subject: Can't locate sys/socket.ph in @INC (did you run h2ph?)
Message-Id: <33726E9B.1BF7@stud.uni-goettingen.de>

Hi all, I need your help!
I'm still new to programming cgi. I expect this to be a silly question 
but I can't find an answer.
I use a script named "nntp.pl" which requires "sockets.pl", this one 
again requires "sys/socket.ph". When running this PERL script, I get 
the message "Can't locate sys/socket.ph in @INC (did you run h2ph?)" 
in my errorlog. It seems to me, that "socket.ph" should be on my system, 
but can't be found.

TIA Walter


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

Date: 8 May 1997 22:02:46 GMT
From: junkmail@sysc.abdn.ac.uk (Kyzer)
Subject: Re: composing a key out of 2 fields
Message-Id: <5ktii6$a14@info.abdn.ac.uk>

Shawn, while sobering up, wrote:
: Is there any way to do a sort on composite keys, say if the keys were
: something like  541_5/5/1997 

I'd suggest using the numeric format yyyymmddjjj, where
yyyy = year
mm   = month
dd   = day
jjj  = job id

note that i *mean* 2 month/day digits, even if there's only one digit. pad
it with a zero.

That way, you can sort numerically, and it will be in chronological order.

: What's the best format for the date?

see above

--
Stuart 'Kyzer' Caie - Kyzer/CSG |undergraduate of Aberdeen University |100%
http://www.abdn.ac.uk/~u13sac   |My opinions aren't those of Aberdeen |Amiga -
kyzer@4u.net kyzer@hotmail.com  |University or AUCC, thankfully.***** |always!

-- 
Random sig of the day:
StudentCode(v1.0) BSc A Y-- C++ E L W- G+ X? P-- T++ F M H++


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

Date: Thu, 08 May 1997 16:58:57 -0700
From: "A. Mishra" <mishra.aditya@emeryworld.com>
Subject: Re: Dates
Message-Id: <337268C1.6427@emeryworld.com>

Have you read the perl(Camel) book?


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

Date: 8 May 1997 22:59:01 GMT
From: Ruben<amocomp@dds.nl>
Subject: Free: Make 3D scan from real object to virtual object
Message-Id: <5ktlrl$39h@guust.globalxs.nl>

----------------------------------------------------------------------This message is being brought to you by Dynamic Mail - the easier and faster's 
way to explodes your business on the internet. For more information please visit 
our web site at : http://www.australia.net.au/~apexpi/dynamail.htm
----------------------------------------------------------------------

The CAD industry is a very delicate industry. 
Everything has to be precies sometimes as precise as a 10th or 1/100 of a mm. 
This is iin some case impossible to do with a computer cad program.

Companies that have these problems for instance people in the designing industry have to make everything perfect.
 For them is it impossible and  much to time costly to use a computer fo this purpose.

Well I have got the best thing for you.

It is an machine developed in Denmark. 
There is still only one prototype of it.
 It is a laser wich can scan any object and make it into a dxf format file.

Of course you can see that this machine has unlimited possiblities to use it.

We offer now, 'cause we still have to refine and test it, a free use of the machine. 
The only thing you have to pay are the transportation of the object you want to scan to send to Denmark.

It has an accuracy of about 1/10 mm but if the machine is ajusted just right it cen be even more accurate. 
In the future we expect it to be as accurate as 1/100 of a mm.

Of course the objects cannot be very large. If they are they must scanned in a couple of times. 
Of course this is no problem.

It can save tens of thousands of dollars because else someone had to make it with the computer which is impossible to do with a precision of a 10th mm.

The speed of this machine is incredible of course you can control this but it can be done in 5 minutes. Of course the scan will be better if you let it take more time to scan. 

Please remail this message for more information. Please tell me what kind of object you want to use it with etc. If you want to make use of the testing we will bring you in contact with the developer of the 3D laser.

When you remail lthis message please answer the following questions.

Thank you


-----------------------------------------------------------------------------------------------------------
- If this machine was brought to the market what would you be willing to pay for it?

$10.000 - $20.000
$20.000 - $30.000
$30.000 - $40.000
$40.000 - $50.000
Another value please type it yourself

- What would you use it for and what do you think it can be used for?

- Do you know people who could use this product? (Do you want us to contact them)

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

Sincerely

Ruben Daniels

amocomp@dds.nl


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

Date: Thu, 08 May 1997 19:01:10 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Have a question? Post it here at the CGI Discussion Forum.
Message-Id: <comdog-0805971901100001@nntp.netcruiser>

[redirected to comp.infosystems.www.authoring.cgi]

In article <337538b9.6505373@news.enterprise.net>, sorry@no.can.do (TOTO) wrote:

> For any questions regarding CGI & PERL, please refer to the new
> message board at 
> 
> http://www.netforward.com/cryogen/?toto
> 
> Please pass the word around and lets see if we can all help each
> other.


let's see, besides the JavaScript errors, annoyingly long loading
graphics, small type (why mess with my choice of font size?), and
poor use of frames, how is this better than usenet?  (btw, i find it
rather ironic that a "CGI Board" would use one of Matt Wright's 
scripts...)

oh yeah, i learned to chmod 777 my cgi-bin directory [1].  i hadn't
realized i should do that.  in fact, i've been telling people not
to. ;)


[1] <URL:http://homepages.enterprise.net/toto/cgi.html>
in the "Where do I start" section.  i wonder if enterprise.net
would like know about such poor security advice to users of
their system?

-- 
brian d foy                              <URL:http://computerdog.com>                       
unsolicited commercial email is not appreciated


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

Date: Thu, 08 May 1997 19:39:04 +0600
From: Josh Davis <omnimax@dfw.net>
Subject: Help Me: Need an array of filehandles
Message-Id: <3371C968.5BAE@dfw.net>

I'm having trouble setting up an array of filehandles in perl.  Does
anyone have a code example of this?

thanks.
Josh


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

Date: Thu, 8 May 1997 14:45:44 -0700
From: "Alex Krohn" <akrohn@spc.ca>
Subject: how to get a recursive file listing
Message-Id: <5kthcn$9oo@titanium.dowco.com>

How can I get a listing of all .htm files in the current director as well
as all subdirectories. I would like the list of files in an array, and the
file names to include the relative path (i.e. if the file is two levels
deep, I don't just want the file name, but the relative path plus the file
name).

I've managed to get it withouth the relative path using a recursive
function, but I'm sure their must be an easier way.

Thanks for any help!

Alex Krohn




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

Date: 8 May 1997 15:53:01 -0700
From: brannon@bufo.usc.edu (Terrence M. Brannon)
Subject: Re: how to get a recursive file listing
Message-Id: <ysizn2q5fues.fsf@bufo.usc.edu>

"Alex Krohn" <akrohn@spc.ca> writes:

> 
> How can I get a listing of all .htm files in the current director as well
> as all subdirectories. I would like the list of files in an array, and the
> file names to include the relative path (i.e. if the file is two levels
> deep, I don't just want the file name, but the relative path plus the file
> name).

The File::Find Standard Perl Library module does this.

-- 
o============o Sending  unsolicited commercial e-mail (UCE) to this address
 Legal Notice  is indication of your consent to pay me $120/hour for 1 hour
o============o minimum for professional proofreading & technical assessment.
terrence brannon * brannon@rana.usc.edu * http://rana.usc.edu:8376/~brannon


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

Date: 8 May 1997 23:54:09 GMT
From: "Rick Klainer" <rick1234@imperium.net>
Subject: HTML question
Message-Id: <01bc5c24$177edf60$79921ece@rick1234.imperium.net>

I have these files on my UNIX box that are created from an SQR report that
are in PCL5
format. This is an HP print format. What I want to is convert this format
(PCL5) to 
HTML. Has anyone done that or can you at least point me in the right
direction. Please email at rklainer@calibersys.com.  Thanks
 


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

Date: 8 May 1997 23:06:06 GMT
From: "Jennie Van Heuit" <peapod@rahul.net>
Subject: Re: Information on PERL 5
Message-Id: <5ktm8u$6du@samba.rahul.net>

In article <336609c9.5740264@news.virgin.net>,
Simon Denvers <simon.denvers@virgin.net> wrote:
>On Sat, 26 Apr 1997 08:19:56 GMT, "Mark Allison"
><mark@markallison.demon.co.uk> wrote:
>>My current contract requires me to learn PERL 5. After first glances at
>>this language, I was absolutely horrified. Expressions like /([^ )*&
>>$b)]{(~=} are normal! 

Of course, anyone who has to *maintain* code like this will
want to kill you. It isn't that hard to write easy-to-read
perl code.

>>Please could someone direct me to a site that has an on-line PERL manual
>>that I could download. One with examples would be useful.
>
>www.perl.com is the best place to start.  Try also the book 'Learning
>Perl', which is a good introduction.  Stear clear of 'Learn Perl in 21
>Days' or similar books - apparently they're not so hot.

www.perl.com is, indeed, an excellent resource. As for
books, I and some coworkers have found "Learning Perl" a bit
hard to read sometimes. We have several books here for
reference. One that seems good for learning (but is, alas,
marred by errors) is "Perl by Example". I also have "Teach
Yourself PERL in 21 Days" by David Till. Forget about
actually sticking with it for 21 days - I quit after day 8.
But I really consider it a nice resource - almost every Perl
call is used in an example. (Beware: it is enormous) We got
a good price from Readme.doc on the Web.

>I think it's definitely a language worth the effort to master if you
>work in a Unix environment.  

I agree. It can be very powerful and has lots of nice
built-in stuff.

-Jennie
-- 
<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>
Jennie Van Heuit, Alameda, CA                 peapod@rahul.net
"This sentence no verb."                       my NEW account!
http://www.rahul.net/peapod/ 


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

Date: 8 May 1997 21:57:47 GMT
From: junkmail@sysc.abdn.ac.uk (Kyzer)
Subject: Re: Loosing clpm regulars (was Re: Perl auto-replier)
Message-Id: <5kti8r$a14@info.abdn.ac.uk>

I R A Aggie, while sobering up, wrote:
: + I wish people would just learn to use www.dejanews.com.
: I wish people would just learn to read the man pages.

I think you really mean 'look up the man pages'.
Reading the manpages is long winded process, and may be pointless
(eg, I've never read the perlxstut manpage because I've never needed to
 directly use Perl's XSUB support)

however looking up the manpages, be it by following a trail of inquiry from
the perl(1) page to the right one, or by grepping all of them at once, is
a very good idea.

Thoroughly recommended.
Newbies: Why not look up every question you want to ask about Perl in the
megabytes of perl manpages (that *includes* the perlfaq# manpages)

Once you've got the hang of it, read all of them one by one just for fun
and so you can be a Really Good Perl Programmer.

RTFM should mean Refer to (those) manuals.

--
Stuart 'Kyzer' Caie - Kyzer/CSG |undergraduate of Aberdeen University |100%
http://www.abdn.ac.uk/~u13sac   |My opinions aren't those of Aberdeen |Amiga -
kyzer@4u.net kyzer@hotmail.com  |University or AUCC, thankfully.***** |always!

-- 
Random sig of the day:
ROGER: Benny? Is that you?    BENNY: No, it's Shirley Temple!!


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

Date: 8 May 1997 21:33:11 GMT
From: Jeroen<amocomp@dds.nl>
Subject: Neede: Resellers for Adv. Comp. Products.(only serious replies).
Message-Id: <5ktgqn$39h@guust.globalxs.nl>

----------------------------------------------------------------------This message is being brought to you by Dynamic Mail - the easier and faster's 
way to explodes your business on the internet. For more information please visit 
our web site at : http://www.australia.net.au/~apexpi/dynamail.htm
----------------------------------------------------------------------

Hello

I am starting up a company in the Netherlands. We are distributor for many products in Europe and outside. We are looking for companies who want to become reseller of some of our products in there country. 

We have products for every branche in our assortiment. Just mail me and we can discuss this further.

We are also looking for programmers since we are developing software ourselves, If you can program good please contact me and we can discuss this.

Sincerely

Ruben Daniels





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

Date: 8 May 1997 22:11:21 GMT
From: Ruben<amocomp@dds.nl>
Subject: Neede: Resellers for Adv. Comp. Products.(only serious replies).
Message-Id: <5ktj29$39h@guust.globalxs.nl>

----------------------------------------------------------------------This message is being brought to you by Dynamic Mail - the easier and faster's 
way to explodes your business on the internet. For more information please visit 
our web site at : http://www.australia.net.au/~apexpi/dynamail.htm
----------------------------------------------------------------------

I need Software developers who can program highly advanced graphic programs.
 The Software needs to run on Unix Workstations and Windows NT/95 environment. 

It is not a one person project. You will be working with multiple people. 
So you have to know(or learn fast) how to  work in a team. 
It doesn't matter were you live. 'Cause we can have contact through the Internet.

If you think you can do this, PLease ReMail this message and tell me something 
about yourself and your work(not neccesary). And I will send you some more information. 

Sincerely

Ruben Daniels


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

Date: 9 May 1997 00:28:09 GMT
From: pitchfsj@aston.ac.uk (Steve)
Subject: Re: New Perl programmer in need of tutorials
Message-Id: <5ktr2p$85o$1@whatsit.aston.ac.uk>

In article 38DD2938@rocketmail.com, Katharine Osborne <kosborne@rocketmail.com> writes:
>If anybody knows of any online tutorials on getting started with Perl
>please email me.  It would be especially helpful if they were slanted

How about:

http://www.cclabs.missouri.edu/things/instruction/perl/perlcourse.html

called introduction to perl , or how to learn perl in two hours.

I think it's an ace place to start.


---
___ ___ ___ _ _ ___ > insert carrot into sheep. 
M__  M  M_  M M M_  E-mail: pitchfsj@aston.ac.uk
__M  M  M__  M  M__ WWW: http://www.aston.ac.uk/~pitchfsj/





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

Date: Wed, 07 May 1997 16:04:07 GMT
From: tnoto@interramp.com
Subject: Novice needs help pulling pattern to match as a variable from another file
Message-Id: <3370a2b9.6157463@news.n2n.com>

I am a perl novice writing my second script,  I have seemingly run
into  wall, and was hoping to get some help from above from the
experts..

I am trying to write a perl script that pulls a line from a sorted
list and uses it as a pattern to match against strings that occur
multiple times in another (larger) file. The lines in the sorted list
may or may not contain characters that are also used as perl regular
expression codes.

I am trying to pull these text strings into my script so that I can
pattern match them against my input file line by line. The lines in
the input file contain other text than the exact string contained in
"errorfile".

The problem is that  I can't seem to get the string from "errorfile"
to act as a regular expression once I have pulled it into my script.




Here is the specific line that I believe is causing the problem:

If ($line =~ /$error/) {

where $line is the line from my input file and $error is the pattern
to find in $line, coming from the errorfile.  This line will not 'hit'
or execute.


TIA for any help,

Tom

Here is a sample line from errorfile:

Group
Group 19 cfr 146\.0\-146\.96\]
CUSTOMS
Group 19 cfr 22
USCode
[Group 19 cfr 353.36(a)(iv]\)
[Group 19 cfr 353.56(b)(2).14]

Here is a sample from the file to match:

<QL:Query,"[Group 19 cfr 353.56(b)(2).14]","CUSTOMS CFR">19 C.F.R.
353.56(b)(2).14<EL>

Here is my entire script:

#! usr/bin/perl

open (LST101, "wincafc.o02");
open (OUT101, ">wincafc.o03");
$Line = <LST101>;

do {

	open (ERRORS, "errors.o02");
		
	$error = <ERRORS>;
	
	do {

#		$position = index($Line, "Group 19 cfr 22");
#		if ($position >= 0) { 
		if ($Line =~ /"$error"/) {

#		MARKS A HIT FOR THIS LOOP
		print OUT101 ("
");
#		print OUT101 ($line);

		}
#		MARKS A HIT FOR EVERY PASS BY THE ERROR FILE
		$error = <ERRORS>;

		print OUT101 ("[");

	} until ($error eq "");

	close (ERRORS);

	print OUT101 ("`a");
	print OUT101 ($Line);

	$Line = <LST101>;

} until ($Line eq "");

close (LST101);
#close (OUT101);






 




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

Date: 8 May 1997 21:51:10 GMT
From: junkmail@sysc.abdn.ac.uk (Kyzer)
Subject: Re: Perl auto-replier
Message-Id: <5kthse$a14@info.abdn.ac.uk>

Eli the Bearded, while sobering up, wrote:
[snip]
: Elijah
: ------
: both Chris and Rod need to be corrected to have a \n in the print statement

I believe Rod needs a __END__ in there somewhere too :)
The only languages I know that *don't* choke on ASCII art, are False and
Brainfuck, but I wouldn't try running the result if I were you :)

--
Stuart 'Kyzer' Caie - Kyzer/CSG |undergraduate of Aberdeen University |100%
http://www.abdn.ac.uk/~u13sac   |My opinions aren't those of Aberdeen |Amiga -
kyzer@4u.net kyzer@hotmail.com  |University or AUCC, thankfully.***** |always!
[inqueries about False accepted :)]

-- 
Random sig of the day:
Yesh I shee Felixsh, perhapsh I can be of shume ashishtanshe.


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

Date: Thu, 8 May 1997 17:40:54 -0700
From: Michael  Miller <millerm@azstarnet.com>
Subject: Re: Perl auto-replier
Message-Id: <Pine.GSO.3.95.970508170457.20176A-100000@web.azstarnet.com>


On 6 May 1997, Eli the Bearded wrote:
> 
> A rude response, particularly in public, *that answers the question*
> I think may help to reduce newbies from posting questions. Whether
> this is good or bad I'm not sure. Rude responses that do not answer
> the question are bad. 

	From my own personal experience asking a couple of poorly formed,
or I don't understand the man-page type questions, rudeness does reduce my
postings. I quit posting altogether somewhere else, and my few replys went
off-line.  If one wants to chase people away, then by all means, be rude. 
I don't like being insulted, even when I deserve it.

  Personally, I am more troubled by 50 or so replies to the list from
"experts"  answering a simple question to which only one person wants the
answer.  ( I don't follow this group, so this is NOT meant as a comment to
any one in particular here, or elsewhere for that matter. )  I would not
want this to be taken as a problem with the real gurus and gods taking an
interest in the dealings of us (myself, and others like me)  mortals,
however. 

	I'll be quiet now,
			  Mike.



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

Date: Thu, 08 May 1997 17:20:48 -0700
From: "Michael J. Berry" <mberry@xmission.com>
Subject: Perl/HTML/Win 3.1 Newbie question...
Message-Id: <33726DE0.431A@xmission.com>

Can anyone help me?

I'm trying to simply execute a PERL script on a Win 3.1 machine via
webbrowser.

In unix, you simply refrence the PerlScript.pl and you get your results
correctly.  However, in the Win 3.1 world, you cannot execute a .pl
script. 

So, I have tried refrencing "PERL.EXE PerlScript.pl" which doesn't work
because command line arguments are not passed.  So, I tried associating
my .pl files with the PERL.EXE.  This doesn't seem to work.  So, I wrote
a Delphi .EXE which executes "PERL.EXE PerlScript.pl" which works fine
from my FileManager, but again doesn't work right from inside my
browser's HTML page.  It tries to "download" the .EXE instead of running
it.  Can anyone help me here???

My HTML code:

<BODY>
<H1>CGI Tester</H1>
Click 
<A HREF="perlrun.exe?">here</A> to run PERL script.
</BODY>


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

Date: Thu, 08 May 1997 19:53:38 -0400
From: schinder@leprss.gsfc.nasa.gov (Paul J. Schinder)
Subject: Re: Programmin Perl on MacOS
Message-Id: <schinder-0805971953390001@schinder.clark.net>

In article <01bc5bcc$c9fba720$2a9235c6@jorge>, "George Silva"
<george@9003inc.com> wrote:

}  I have a question concerning MacPerl...ie) Perl on Mac OS
}  
}  For some reason the "mkdir" function seems not to work.  Is there any other
}  way to create a directory?
}  If "mkdir" does not work on MacPerl, how does one create a directory?

mkdir works.  Try it again.  Then use Find File to find the folder you
just created, because unless you give it a full path or chdir to the
folder you want to create it in, the folder is likely not to be where you
expect it to be.  Of course, if you're trying to create a folder with an
illegal name (say > 32 characters long), which might happen if you try to
use a Unix path, it will fail.  MacPerl uses Macintosh paths.

}  
}  Also I have heard that back ticks do not work either on MacPerl.  How do I
}  resolve this?

By not using backticks.  There are a very few that *do* work in the
MacPerl application, like `hostname` and `pwd`.  There's a list in one of
the files that comes with MacPerl, I think.

-- 
Paul J. Schinder
NASA Goddard Space Flight Center
Code 693, Greenbelt, MD 20771
schinder@leprss.gsfc.nasa.gov


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

Date: Thu, 08 May 1997 23:43:05 GMT
From: ils@pipcom.com (Scott)
Subject: q: 500 directories and NOBODY owns them
Message-Id: <337264f7.914226@news.pipcom.com>




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

Date: Fri, 09 May 1997 00:05:15 GMT
From: soccer@microserve.net (Geoffrey Hebert)
Subject: Re: quoting a separator for split()
Message-Id: <5ktokp$r4q$1@news3.microserve.net>

Michael Mellinger <melling@panix2.panix.com> wrote:


>I am maintaing a flat file DB with Perl and I am using split() to
>extract the different fields.  However, the data is being entered by
>many people who might type in my field separator in a couple of the
>fields.  

You receive the data so you can examine it and change it before
writing it to a file.  Personnally I prefer to determine what special
character is unusaual for the data and use it.  One of these usually
works for me :;<[|  If you use one of these you still have to remove
it from any posible human input before writing file.

O.K. you reqlly do need to allow every character in the universe, then
you unexcape it.  Lets say you decide to use the comma for your
delimiter.  You will have to replace the comma with something else.
The common web method is to use % followed by two numbers
representing hex for that character.  Now in addition to your comma,
you have another character that has special meanning the %.
You must repace these characters with the unexcaped version.

Just enough to get you started.
If a comment field were simply at the end, I could use the
>limit operator, but a couple other fields might contain user entered
>data.  Can I simply quote any separators so split won't parse a record
>incorrectly?

>#field1#This is #1#field3#field4#field5#Yikes, Houston we have a problem#!@#

>split('#', $_, 6);

>Perhaps there is a better way to maintain a flat file database in Perl?

>-Mike


-------  signature  ----------

Check out the Perl site!

http://www.microserve.net/~soccer/

use password perlmisc

Geat tool for Developers>



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

Date: Fri, 09 May 1997 02:19:13 GMT
From: shawn@ultranet.ca (Shawn)
Subject: reading a complex record from file
Message-Id: <337287bb.26103361@news.ultranet.ca>

I have a hash of a hash of arrays that looks something like this:

541:
may 11 1997 = teefeld 'May 11 1997' 'may 17 1997'  n 8 8 
may 4 1997 = teefeld 'may 4 1997' 'may 10 1997'  3 7 7.5 n 

542:
mar 11 1997 = allent 'mar 11 1997' 'mar 17 1997'  7 n 5 5
mar 4 1997 = allent 'mar 4 1997' 'mar 10 1997' 4 3 n 5 

I can create it manually and print it to a file. But I'm not sure how
to load it from the file back into the complex hash.




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

Date: Thu, 08 May 1997 23:50:45 GMT
From: soccer@microserve.net (Geoffrey Hebert)
Subject: Re: Sending e-mail from within a perl script - help
Message-Id: <5ktnpl$qnd$1@news3.microserve.net>

jsheehy@trintech.com (John Sheehy) wrote:

>Hi,

>I'm writing a simple perl script that generates a set of e-mail messages from 
>an input file.

deleted

>Is there an alternative to this method?

My code works for me.  Follow signature instructions.
Use password perlmisc.
Follow path to perl cross-reference

There you will find email.cgi in it's entirety.  It is my script.
You are welcome to use it. 
 





>
>

>John Sheehy - Systems Engineer                  
>----------------------------------------------                 
>Trintech (Manufacturing) Ltd

>Telephone: +353 1 295 6766
>Facsimile: +353 1 295 4735
>WWW: http://www.trintech.com

>The first riddle I ever heard, one familiar to almost every Jewish
>child, was propounded to me by my father:
>	"What is it that hangs on the wall, is green, wet -- and
>whistles?"
>	I knit my brow and thought and thought, and in final perplexity
>gave up.
>	"A herring," said my father.
>	"A herring," I echoed.  "A herring doesn't hang on the wall!"
>	"So hang it there."
>	"But a herring isn't green!" I protested.
>	"Paint it."
>	"But a herring isn't wet."
>	"If its just painted its still wet."
>	"But -- " I sputtered, summoning all my outrage, "-- a herring
>doesn't whistle!!"
>	"Right, " smiled my father.  "I just put that in to make it
>hard."
>		-- Leo Rosten, "The Joys of Yiddish"

> 


-------  signature  ----------

Check out the Perl site!

http://www.microserve.net/~soccer/

use password perlmisc

Geat tool for Developers>



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

Date: 8 May 1997 17:41:01 -0700
From: Martin Mathis
Subject: Subtracting large numbers with "&bsub" routine?
Message-Id: <337262aa.59739945@news.primenet.com>

Hi all,

on page 98 in "CGI Programming on the WWW" by Shishir Gundavaram it
says that regular subtractions of large numbers in PERL (such as
'time' - no. of secs since 1970) may be incorrect, therefore a
subroutine called "&bsub" (and "&bdiv) is used in the sample. However,
the book fails to list those subroutines. 
Does anybody know the "bsub" code or can point me to a source? I just
wrote a PERL script that calculates with 'time' and stumbled over that
page in the book today - now I'm unsure if my script calculates
properly (though it looks like it).

TIA and best,


-Martin
______________________________________________________________
mmathis@primenet.com


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

Date: Thu, 08 May 1997 20:39:41 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: Subtracting large numbers with "&bsub" routine?
Message-Id: <3372805D.5B24D9BC@gpu.srv.ualberta.ca>

! Hi all,
! 
! on page 98 in "CGI Programming on the WWW" by Shishir Gundavaram it
! says that regular subtractions of large numbers in PERL (such as
! 'time' - no. of secs since 1970) may be incorrect, therefore a
! subroutine called "&bsub" (and "&bdiv) is used in the sample. However,
! the book fails to list those subroutines.
! Does anybody know the "bsub" code or can point me to a source? I just
! wrote a PERL script that calculates with 'time' and stumbled over that
! page in the book today - now I'm unsure if my script calculates
! properly (though it looks like it).

higher up on page 98 you'll see that script requires
bigint.pl---the subroutines are defined in there...
for Perl5 use the Math::BigInt package (part of the
standard library)

regards
andrew


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

Date: 8 May 1997 23:31:00 GMT
From: "Jennie Van Heuit" <peapod@rahul.net>
Subject: Re: Syntax checking?
Message-Id: <5ktnnk$6r8@samba.rahul.net>

In article <5k5h03$snh@nr1.toronto.istar.net>, TCM Online <tcm@wcl.on.ca> wrote:
>I've started off on a new project from the ground up and now get a
>run error stating I'm missing a right bracket... is there any good
>freeware syntax checkers that will find this for me?

You don't mention your platform. If it's UNIX, you can do
"<esc>set showmatch" in vi to have it bounce between
brackets and parentheses. Also, if you put the cursor on any
bracket and (in command mode) press %, it bounces to the
other bracket or beeps if it is missing.

-Jennie
-- 
<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>~<>
Jennie Van Heuit, Alameda, CA                 peapod@rahul.net
"This sentence no verb."                       my NEW account!
http://www.rahul.net/peapod/ 


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

Date: 8 May 1997 21:54:24 GMT
From: quentin@remington.amd.com (Quentin Fennessy)
Subject: Re: variable names in array problem
Message-Id: <5kti2g$jql$1@amdint2.amd.com>

In article <336A59ED.699E95BF@riter.computize.com>,
Peter Poranski  <poranski@riter.computize.com> wrote:
>
>What I need help with is storing variable names in a array, but not the
>variable.
>
>lets sat that
>
>                 $example[0] = "varName1";
>                 $example[1] = "varName2";
>
>if I wanted to call the variable $varName1 using the Array, how would I?
>
>I have tried quite a few combos including  $$example[0]  (which, by the
>way, did not work)

Peter,
	Try to dereference it with

	${$example[0]}

See perlref(1).
-- 
Quentin Fennessy			AMD, Austin Texas


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

Date: 8 May 1997 23:18:38 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: What is the rationale for this calling convention?
Message-Id: <5ktn0e$8a7$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Terrence M. Brannon
<brannon@bufo.usc.edu>],
who wrote in article <ysizohalfuhb.fsf@bufo.usc.edu>:
> > Looks like a bug.  Does it behave the same without debugger?
> 
> It's actually not a bug. PDL just does some things to functions before
> you call them. It's a PDL feature, not a bug.

Do not follow you... Do you mean that it exports different functions?

Ilya


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

Date: Wed, 7 May 1997 17:28:26 GMT
From: Jon Brule <jon_brule@nt.com>
Subject: Win32 Perl
Message-Id: <3370BBAE.4628@nt.com>

Good Afternoon,

Does anyone know if it is possible to execute a Win32 PERL script using
a DLL call instead of using the convential method of running "perl
scriptname"?

Thanks.


Jon Brule
jon_brule@nt.com


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

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

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