[6708] in Perl-Users-Digest
Perl-Users Digest, Issue: 333 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 21 08:07:15 1997
Date: Mon, 21 Apr 97 05:00:46 -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 Mon, 21 Apr 1997 Volume: 8 Number: 333
Today's topics:
"Missing Separator" error when making perl5.003 <jet@accessone.com>
evaluating an expression <steph@ciris.net>
Re: Help with Math::BigFloat si vous plait (Steffen Beyer)
HELP!!!...just one form is all I want to make... (Mike Pulsifer)
Re: Lisp is neither (was Re: Ousterhout and Tcl lost th (Mike Pinkerton)
Re: Lisp is neither (was Re: Ousterhout and Tcl lost th (Rainer Joswig)
Re: Lisp is neither (was Re: Ousterhout and Tcl lost th <erik@naggum.no>
mutiple non-blocking connects <ken_taylor@hotmail.com>
Re: Need a math program (Zach Baker)
Perl -e switch <earl@bell.us>
Re: perl and multithreading (Brooks Davis)
Re: Perl DB Sort Question (Andrew M. Langmead)
Re: PERL Editor <Chris.King@swindon-fc.demon.co.uk.mars>
print <<THIS_PART; won't work (Ken Ledbetter)
Re: print <<THIS_PART; won't work (Eric D. Friedman)
Re: print <<THIS_PART; won't work (Mike)
Re: Puzzle: Count Actual Days from MM,DD,YYY to localti (Steffen Beyer)
Re: Reply to Ousterhout's reply (was Re: Ousterhout and (dat)
Re: Running as root <wschow@Comp.HKBU.Edu.HK>
Running Perl script on NT jhardy@cins.com
Re: Sybperl on AIX (David Whitmarsh)
sysopen object method in perl 5.001? (Ye He)
Re: Things that work on $_ (ash)
Re: Who will win? Borland or Microsoft or Programmers? <sluox@wl.k12.in.us>
Win32::ODBC and Win32 Perl <ckwu6@iesun21>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 20 Apr 1997 21:56:39 -0700
From: Eric Thompson <jet@accessone.com>
Subject: "Missing Separator" error when making perl5.003
Message-Id: <335AF22F.74863AC4@accessone.com>
This is an error message I haven't gotten before from make
(gnu make v3.74):
makefile:382: *** missing separator. Stop.
Oh, what could that be from?
This message generated immediately after invoking make to compile
perl5.0003, a freshly downloaded version. Line 382 is one line past end
of file. Ran
sh Configure -des -Dcc=gcc
then, poof!
Linux v2.07 , 486DX-66, gcc 2.7.2, X environment.
Any suggestions or pointers aprreciated.
Thank you.
J. Eric Thompson
jet@accessone.com
------------------------------
Date: 20 Apr 1997 21:27:37 GMT
From: "Stephan Nagy" <steph@ciris.net>
Subject: evaluating an expression
Message-Id: <01bc4de2$1488f980$c8e433cf@marvin>
There is probably a simple solution to this, but i can't figure it out.
how do i evaluate an expression to see if it is divisible by a number. or
in other words.
if ( (sumnumber/4) == a whole number) {
@DaysInMonth=31,29,31,30,31,30,31,31,30,31,30,31
}
elsif ((sumnumber/4) != a whole number) {
@DaysInMonth=31,28,31,30,31,30,31,31,30,31,30,31
}
can i do this? if so how? any assistance is appreciated.
stephan nagy
rzjj60@email.sps.mot.com
or
steph@ciris.net
------------------------------
Date: 20 Apr 1997 20:10:26 GMT
From: sb@en.muc.de (Steffen Beyer)
Subject: Re: Help with Math::BigFloat si vous plait
Message-Id: <5jdt7i$cet$1@en1.engelschall.com>
In comp.lang.perl.modules Sysop <sysop@gbfcu.reno.nv.us> wrote:
> First time using Perl modules here and (surprise) I'm running into some
> problems. Essentially I'm trying to get numeric output with two
> decimal places (money format). Here's the snippet of code in question:
> use Math::BigFloat;
> $bignumber=Math::BigFloat->new($item_price*$item_qty);
> $subtotal_main = $subtotal_tmp->ffround(2);
> When I check it with perl -cw I get this ugly message:
> "use" may clash with future reserved word at order.cgi line 48.
> syntax error in file order.cgi at line 48, next 2 tokens "use Math"
> syntax error in file order.cgi at line 51, next 2 tokens "Math:"
> syntax error in file order.cgi at line 52, next 2 tokens "->"
> If anyone could send a hint/solution/??? to help me out I'd really
> appreciate it! Thanks for your time!
What Perl version are you using?
Issue "perl -v" to find out!
Maybe your Perl version is outdated, or you have Perl 4 running.
Could also be a search path problem if you're using UNIX and have several
different versions of Perl installed on your machine - the path where you
want Perl to be started from must come before all other paths containing
Perl binaries in your "$PATH" environment variable.
(Use the command "set" to show them all)
Hope this helps!
Yours,
--
|s |d &|m | Steffen Beyer <sb@sdm.de> (+49 89) 63812-244 fax -150
| | | | software design & management GmbH & Co. KG
| | | | Thomas-Dehler-Str. 27, 81737 Munich, Germany.
"There is enough for the need of everyone in this world,
but not for the greed of everyone." - Mahatma Gandhi
------------------------------
Date: Mon, 21 Apr 1997 06:49:53 GMT
From: igsoft@fred.net (Mike Pulsifer)
Subject: HELP!!!...just one form is all I want to make...
Message-Id: <5jenvj$ihp$1@news.fred.net>
I am currently trying to learn perl while at the same time teaching
myself Visual C++. I'm sick, I know. Anyway, all I want to do is
create a guestbook, and I'm having trouble figuring out perl... I
guess it's like trying to learn French and Chinese at the same time.
I'm bound to confuse myself at some point.
Any help would be greatly appreciated.
Thanks
Mike Pulsier
Ig Entertainment
igsoft@fred.net
http://www.fred.net/igsoft
------------------------------
Date: Sun, 20 Apr 1997 12:42:23 -0400
From: mpinkert@cc.gatech.edu (Mike Pinkerton)
Subject: Re: Lisp is neither (was Re: Ousterhout and Tcl lost the plot)
Message-Id: <mpinkert-2004971242230001@fire.cc.gatech.edu>
In article <hbaker-2004970914430001@10.0.2.1>, hbaker@netcom.com (Henry
Baker) wrote:
>Two words: 'Lisp Machine'.
Oh, yeah, and that was successful. I've got a friend with a Symbolics
machine he uses as a table.
--
Mike Pinkerton
mpinkert@cc.gatech.edu http://www.cc.gatech.edu/~mpinkert
Cyberdog: On the Internet, no one knows you're an OpenDoc part
------------------------------
Date: Sun, 20 Apr 1997 23:25:32 +0200
From: joswig@lavielle.com (Rainer Joswig)
Subject: Re: Lisp is neither (was Re: Ousterhout and Tcl lost the plot)
Message-Id: <joswig-ya023180002004972325320001@news.lavielle.com>
In article <5jbcvl$puh@engnews2.Eng.Sun.COM>, ouster@tcl.eng.sun.com (John
Ousterhout) wrote:
> I can't prove that it's impossible for a single language to be good at
> both scripting and system programming, but I don't know of a good example
> and I doubt that it will ever happen.
Xerox Lisp Machine, TI Explorer, LMI Lambda, Symbolics 36xx and Ivory
series, ... All those machines have had an OS that was completely
programmed in a high-level language which also was the extension
language. On those machine you never needed a "scripting language",
because those particular Lisp dialects (InterLisp, ZetaLisp,
Symbolics Common Lisp, ...) had all the needed power
(access to low-level machine details *and* application building
*and* glueing things together).
They failure was due their binding to a particular (expensive) hardware.
Symbolics Genera, for example, uses Lisp throughout the whole system and
offers a command interpreter, where you can type
"(copy-file f1 f2)" or something like "Copy File f1 to f2",
the latter with completion of the commands and the args, with
online help, providing default args, instant creation of dialogs
for these commands, etc, etc.
> The reason for this is the
> difference in typing, as I explained in the white paper. A given language
> embodies a particular style of typing, which can range from very strongly
> typed to totally untyped. Once that decision has been made, the language's
> position on the spectrum between system programming and scripting is set.
This it not true. Typing is not the issue. It's the capability
for interactive programming *and* total system control. This
has been provided already by several Lisp systems. The typing
theme is misleading. Typing is a non issue for most real world
Lisp systems, due to heavy object-oriented programming with
dynamic capabilities (like changing object's classes at
runtime) and incremental compilers.
> this may be why Lisp hasn't been used much for practical programming.
You mean things like Emacs, AutoCAD, Interleaf Publisher,
ATM switches from Lucent and Alcatel, ICAD, CL-HTTP,
Webmaker, ...? Oh...
> Lisp isn't a good system programming language because it's too hard to
> write efficient programs in it
On my *laptop* I'm using Macintosh Common Lisp. This stuff is so fast
on the PowerPC that I can shut off all optimizations for
my usual programming (web stuff). I never care about inlining,
tail recursion, type declarations, consing, ... - still
it runs fast enough. If I'd care I'd spend a few hours first
on optimizing algorithms and memory usage. The other stuff
comes last. The only weak point is the I/O system, which
could need some tuning.
> and it doesn't provide good low-level
> access to machine facilities.
No? How could people write SCSI, Ethernet, TCP/IP, DecNET,
RPC, NFS and various other stuff in Lisp - like in Symbolics Genera?
Even object-oriented? SMTP server, DNS, window systems, 3d animation
software, video capturing, ... ?
> On the other hand, Lisp isn't good for
> scripting either. In order to be a good scripting language, you need
> to be able to interoperate with lots of other things, which are often
> written in other languages (the best glues are those that stick to lots
> of different materials). But Lisp has never been very good at this.
How could it be that Apple wrote their software testing stuff
in Lisp? I mean they were not testing Lisp software. How
can it be that Macintosh Common Lisp communicates easy
via AppleEvents with other applications (I have just used
this for my own testing stuff)?
Doing stuff like this a bit more difficult in some
otherlanguages.
Define a function for creating a particular AppleEvent:
(defun create-start-monitor-event (the-desc the-target id &rest create-keywords)
(declare (dynamic-extent create-keywords))
(apply 'create-appleevent the-desc +corona-signature+ :|MoGo| the-target
create-keywords)
(ccl::ae-put-parameter-longinteger the-desc #$keyDirectObject id))
Define a function for sending the AppleEvent:
(defun send-start-monitor-event (id)
(check-type id number)
(with-aedescs (appleevent reply target)
(ccl::create-signature-target target +corona-signature+)
(create-start-monitor-event appleevent target id)
(send-appleevent appleevent reply)))
; (send-start-monitor-event (send-id-of-nth-monitor-event 1))
And use it in your Lisp code (send-number-of-monitors,
and send-id-of-nth-monitor-event are also functions built
with AppleEvents). Later you won't even care how this
this stuff works inside - it integrates completely into the Lisp
system:
(defun start-monitor (&optional (n 1))
(if (> (send-number-of-monitors) 0)
(send-start-monitor-event (send-id-of-nth-monitor-event n))
(error "some error message here")))
This is surely no rocket science.
The "Open Scripting Architecture" also
would make it possible to use MCL as a system wide
scripting language (though this hasn't been done).
If you happen to have a Lisp OS - even better, then calling
C, Pascal, Prolog, Fortran, etc. should be really easy - like
on Symbolics Genera.
> For example, it's hard to include C code with Lisp because they have
> very different data types and memory models.
It's sometimes not that easy, but in Macintosh Common Lisp
I just load shared libraries or call the system traps.
Not that difficult.
> Lisp systems are typically closed: you have to live
> entirely in the Lisp world.
Then I'd like to know how I could be using the OpenTransport TCP/IP
libs on my Mac from Macintosh Common Lisp? How do people
call drawing operations? I mean, how do I call the
Quickdraw system call to draw an oval?
(#_FillOval r pattern)
Looks no different from other languages. "r" is a rect record
and "pattern" is a pattern datastructure. I'm using
the usual manuals (Inside Mac) while programming with Lisp.
> I'm sure that many of you will argue against these claims ("my new
> version of Scheme is just as fast as C",
My versions of Common Lisp are almost as fast as C. Fast enough for
my purposes. ***Much*** faster than TCL - without added effort.
> "Lisp just needs a new garbage
> collector that embodies the latest techniques",
Most commercial Lisp have pretty good GCs (generational GC,
ephemeral GC, ...). Full GC of 17 MB memory runs in 2-4 seconds
on my slow laptop, but this does not happen very often
due to the the nice combination of ephemeral GC and generational GC.
> Science have worked on Lisp over the last 30 years, and they haven't
> been able to fix the language so that it could be widely used either
> for system programming or scripting tasks.
I'd like to see that changed.
The success and excellent design of Newton OS 2.0, the
Emate 300 and the Newton MessagePad 2000 gives good
motivation to think the unthinkable. Basically these
are Lisp machines (GC, OOP, functions&closures, tagged data,
incremental compiler, dynamically typed, ...) for a large
audience.
--
http://www.lavielle.com/~joswig/
------------------------------
Date: 20 Apr 1997 23:07:38 +0000
From: Erik Naggum <erik@naggum.no>
Subject: Re: Lisp is neither (was Re: Ousterhout and Tcl lost the plot)
Message-Id: <3070566458689207@naggum.no>
* Scott Schwartz
| The catch, as you well know, is that those implementations also have
| huge, expensive runtime systems and slow startup times, so to be usable
| you have to live inside them.
have to? not really. since you implicitly involve the Common Lisp system
I use, let me illustrate with a real life example: I used to run all
incoming mail and manage all mailing lists from within Emacs, including
increasingly advanced spam-filters. as part of moving to an entire mail
delivery system written in Allegro Common Lisp, I rewrote the Emacs Lisp
code into Common Lisp. to handle one message, the ACL image is started
from sendmail (just like Emacs was), and proceeds to deliver the message
(if accepted) and return an (error) exit code to sendmail after having
decided what to do. it outputs its new decisons, if any, as Lisp code to a
file, which is loaded by the next instantiation. (the Emacs version loaded
all the decisions every time it was started.) every once in a while, I
bring up a fresh Lisp image, load the decisions to date, and dump a new
image to save on startup time. it is really this image that is executed.
on my 50MHz SPARC 2 with 64M RAM, this solution handles ~15 messages per
second at full throttle, but after having written ~600 new decisions to
disk, that is reduced to ~10 message per second. however, I receive 100 to
150 messages a day, so this is not at all a problem for me. the load on
the system from handling a message is not noticable. I don't trust the
SMTP server I have written enough to let it handle the entire mail process,
but once I do, the system will be able to handle more than 400 rejections
and around 35 delivered messages per second. the bottle-neck is the fork
system call, which is unfortunately much slower than it should be on my
system. if I write to the mailbox directly, I can deliver 10 times more
messages. in practice, however, the bottle-neck is my Internet link, which
is enough for my needs, but it couldn't handle more then 5 messages per
second, anyway. my aim is to make this fast and flexible enough to work
for a large ISP that can offer spam-blocking as a service to their users.
| On this topic, you yourself have argued that the lisp repl should be
| one's shell and that it should be judged in that context.
I fail to see the contradiction you imply. if the "scripts" are in Lisp,
as functions inside the Lisp image, run directly from the shell/repl, they
will be vastly faster than a fork/exec with a lot of dynamic libraries and
interpreters being loaded alongside it, no matter how well you do it. by
using Lisp for the scripting language, you will need to run fewer external
programs. the net effect is that instead of starting up the a shell to run
the entire script and starting up new shells to handle other scripts in the
process, you will run them all inside the first Lisp. there's much to be
saved with this approach, and unless the first action of the "script" is
the most important, the speed of the whole script should increase.
| While that might be to your taste, you should acknowledge that it is
| totally at odds with how things are done in the (much nicer) underlying
| system, and pretty much proves Ousterhout's point.
you know, what I realized when I started to use a real Lisp (to a lesser
degree when I had only CMUCL, but I realize now that I could have done more
with CMUCL than I did) was that I used to think of Unix and its shell and
all the shell scripts and programs in a model that fits much better with
working within Emacs with a Lisp underneath than with a shell and standard
I/O as the communications vehicle. since almost as far back as when I
first used a Unix system in 1980, I have wanted programs to return their
values to some environment, not just print something on standard output. I
have wanted to control how the output of these programs were formatted and
reused, I have wanted persistent default options to programs, without
revamping the entire system or use thousands of aliases that other programs
don't know about. I won't discount the possibility that I'm a natural born
Lisper, but it seems that Unix and its plethora of tools and languages are
really trying hard to become what Lisp systems could already offer.
so, no, I don't think this is totally at odds with how things are done in
the (much uglier) underlying system (Unix/MS-DOS/whatever), I think it does
the job that Unix and its tools and shells try to do much _better_, and
that effectively disproves Ousterhout's bogus points.
now, don't forget that Unix wasn't really a _new_ idea, either. almost all
of the good stuff came from the MULTICS project, with which the Bell Labs
team became very impatient and they did much the same to MULTICS in Unix
that CP/M did to TOPS-10, after which it was modeled; that is, reducing it
to only bits and pieces, retaining a flavor of the previous systems' glory.
sometimes, I wonder how those large systems could be built with the meager
hardware resources they had at their disposal. maybe it's _because_ they
had less powerful hardware, and had to think more and waste less. the Bell
Labs team really wanted a PDP-10, according to the history written down by
Peter Salus in A Quarter Century of Unix. imagine what the world would
have been if they did. (on the other hand, Bill Gates got his hands on a
PDP-10 at Harvard and Microsoft used PDP-10's for their development for a
long time. look where that brought us.)
when I gave my annual guest lecture on Unix and its history (this time
focusing on Unix as a networked, social development, and MS-DOS as a
non-network, asocial development, with software in source form being what
built and could save an industry that consisntely refuses to learn from its
own discoveries and mistakes) at a college this past week, and pointed out
that the Unix tools philosophy was "one job, one tool", a refreshingly
bright student came up and asked me if Emacs violated the "one job, one
tool" philosophy. it is a good question. I answered that Unix itself
provides an environment in which those tools work together and that that is
its job, exposed to the user through the shell. Emacs (and by extension,
any Lisp system) provides just such an environment, a more powerful and
portable one than the Unix shells do, yet it can work with the other tools
and be part of the system, too. (I'm not sure I'm satisfied with that
answer, but I think she was...)
#\Erik
--
Bastard Sex Therapist from Hell: "Read the F*cking Manual!"
------------------------------
Date: 20 Apr 1997 13:51:06 -0700
From: <ken_taylor@hotmail.com> Ken Taylor
Subject: mutiple non-blocking connects
Message-Id: <5jdvjq$rgl@lori.zippo.com>
I am trying to do 10 "simultaneous connect()'s" on sockets which are
marked SOCK_STREAM, SO_REUSEADDR, O_NONBLOCK. Looping through the
10 connect() calls give 10 errors of 'Operation in progress' == the
C error EINPROGRESS. Everything is fine so far.
Now in order to check for connection completion I select() for write
availability using the appropriate bitfield. This is where thing go
wrong because select returns immediately (am not polling either)
saying that all 10 sockets are writable, when clearly connection
establishment has not taken place. I have used this method in C and
it works fine. What am I doing wrong.
------------------------------
Date: 21 Apr 1997 07:09:37 GMT
From: zbaker@venom.st.hmc.edu (Zach Baker)
Subject: Re: Need a math program
Message-Id: <5jf3rh$3pi$1@cinenews.claremont.edu>
In article <33537bf3.380389@nntp.ix.netcom.com>,
<netwatch@ix.netcom.com> wrote:
>I need a perl program that will add.sub, multi, amd div. numbers.
>It must have 3 levels of difficulty. Level 1 use numbers from 1 to 5,
>level 2 use numbers from 1 to 20, and level 3 use numbers from 1 to
>50.
>I also need a perl program that can be use as a address book. It must
>have name and phone number fields
>Thank you.
You want fries with that?
---
Zach Baker <zbaker@venom.st.hmc.edu>
"I'm the guy who controls the butter."
------------------------------
Date: Mon, 21 Apr 1997 13:08:44 -0700
From: Chris Andrew <earl@bell.us>
Subject: Perl -e switch
Message-Id: <335BC94C.B9F@bell.us>
Thank you for all the answers regarding my -e switch option question.
Disregarding the fact that *none* gave a solution to my problem, they
were very interesting answers.
I got lot of answers with very simple "one-line" statements both passing
and not passing files as argument. This is not what I'm looking for.
I wish to use a -e statement where I can pass a *shell variable* as
argument, *not* a file.
The simple example below is easy and could be solved in the shell. What I
want to find out is the *principle* of passing a shell-variable to a -e
command-line statement.
Ex: I have an array in the shell
arr="4567 2351 7902 6721 1267"
which I want to sort. From shellscript arr.com I do a call:
arr.perl "$arr"
to perl script arr.perl where I have:
print join (' ', sort split(' ', $ARGV[0])), "\n";
This returns the correct answer:
1267 2351 4567 6721 7902.
Fine.
Now I want to move the perl statement to the shell script in a "sort-of"
here-statement as follows:
perl -e `print join (' ', sort split(' ', $ARGV[0])), "\n";' "$arr"
or, just for a try
perl -e 'print join (' ', sort split(' ', $arr)), "\n";'
*None* work, they give syntax error, whereas
perl -e 'print $ARGV[0], "\n";' "$arr"
works fine (returning the unsorted array).
Any clues?
------------------------------
Date: 20 Apr 1997 20:28:54 GMT
From: brdavis@orion.ac.hmc.edu (Brooks Davis)
Subject: Re: perl and multithreading
Message-Id: <5jdua6$3j7$1@cinenews.claremont.edu>
Malcolm Beattie (mbeattie@sable.ox.ac.uk) wrote:
: In article <rsmithE8t0uH.IF1@netcom.com>,
: Richard S. Smith <rsmith@netcom.com> wrote:
:
: >2. Will Solaris users be able to choose Solaris threads over Posix during
: > the installation process?
:
: For installation, I don't see the point. The current thread.h supports
: the POSIX API which should built fine under Solaris. I don't think that
: recoding the API macros for the sake of it would gain much. I assume
: that both APIs map properly to the underlying Solaris LWP model.
There is one possiable reason for doing this. Compatability with pre 2.5
versions of Solaris. In previous versions there was a POSIX threads.h
which compiled in just fine and then didn't work because all the functions
returned the error code defined as NOT_IMPLEMENTED. Forcing people to
upgrade to a decent version of Solaris wouldn't be a bad thing, but it
would probably generate a lot of whining here on comp.lang.perl.misc by
all the people who don't read the documentation. ;-)
-- Brooks
--
Brooks Davis +------------------------------------------------+
brdavis@hmc.edu | "_Slackware_ [Linux] is the MacOS of UNIXes." |
Harvey Mudd College | -- Richard Garnish |
340 E. Foothill Blvd. | on alt.sysadmin.recovery |
Claremont, CA 91711 +------------------------------------------------+
------------------------------
Date: Sun, 20 Apr 1997 16:45:48 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Perl DB Sort Question
Message-Id: <E8y3wC.B16@world.std.com>
merlin7@rci.rutgers.edu (Frank J. DeFalco) writes:
>I'm having a problem in my attempts to sort a simple database with
>according to a particular field. Much in the same way one would do so
>with Excel. The importance lying in the full DB entry being kept
>intact through the sort.
You might want to take a look at the entry in the FAQ
<http://www.perl.com/CPAN/doc/manual/html/pod/perlfaq4/How_do_I_sort_an_aray_by_anyth.html>
titled "How do I sort an array by (anything)?"
or maybe the document <http://www.perl.com/CPAN/doc/FMTEYEWTK/sorting>
or even newer versions of the man pages
<http://www.perl.org/CPAN/doc/manual/html/pod/perlfunc/sort.html>
Don't trust anybody who suggests
sort { some_complicated_action_on_scalar_a compared_by
some_complicated_action_on_scalar_b } @list;
without at least warning you that it can be horrendously slow. It just
shows that they haven't read the FAQ either. (Yes, it can be easier
to explain to the novice, but if someone gives it as THE answer,
without at least pointing the user to other answers. They are really
doing the novice a disservice.
--
Andrew Langmead
------------------------------
Date: Sun, 20 Apr 1997 17:25:14 +0100
From: Chris King <Chris.King@swindon-fc.demon.co.uk.mars>
Subject: Re: PERL Editor
Message-Id: <Ia5pzOAqNkWzEwl0@swindon-fc.demon.co.uk>
In article <s39bj5.be9.ln@localhost>, Tad McClellan <tadmc@flash.net>
writes
>Perl != CGI
Surely you mean 'perl' ne 'CGI' ? :-)
--
Chris King
The similarity of any fact mentioned within this post and
any in reality, living or dead, is purely coincidental.
Remove 'mars' from address when replying. I hate spam.
I like corned beef though.
------------------------------
Date: Sun, 20 Apr 1997 22:12:02 GMT
From: ledheadx@mindspring.com (Ken Ledbetter)
Subject: print <<THIS_PART; won't work
Message-Id: <335a9469.10358379@news.mindspring.com>
I'm trying to do something like this
print <<STOP;
<html><body>
HI
</body></html>
STOP
but it won't work, any help?
------------------------------
Date: 20 Apr 1997 22:54:14 GMT
From: friedman@medusa.acs.uci.edu (Eric D. Friedman)
Subject: Re: print <<THIS_PART; won't work
Message-Id: <5je6qm$6mb@news.service.uci.edu>
[mailed, posted]
In article <335a9469.10358379@news.mindspring.com>,
Ken Ledbetter <ledheadx@mindspring.com> wrote:
>
>I'm trying to do something like this
>
>print <<STOP;
>
> <html><body>
> HI
> </body></html>
>STOP
>
>but it won't work, any help?
Make sure there's no whitespace after the word STOP.
HTH,
Eric
--
Eric D. Friedman
friedman@uci.edu
------------------------------
Date: 20 Apr 1997 17:49:51 -0700
From: mike@paranoid.delusion.org (Mike)
Subject: Re: print <<THIS_PART; won't work
Message-Id: <5jedjf$e94$1@paranoid.delusion.org>
In article <335a9469.10358379@news.mindspring.com>,
Ken Ledbetter <ledheadx@mindspring.com> wrote:
>
>I'm trying to do something like this
>
>print <<STOP;
>
> <html><body>
> HI
> </body></html>
>STOP
>
>but it won't work, any help?
What error are you getting upon exectution? Any whitespace after
STOP?
+m
------------------------------
Date: 20 Apr 1997 20:20:55 GMT
From: sb@en.muc.de (Steffen Beyer)
Subject: Re: Puzzle: Count Actual Days from MM,DD,YYY to localtime(time) - REQ: Easier Way
Message-Id: <5jdtr7$cet$2@en1.engelschall.com>
> Nathan Torkington <gnat@elara.frii.com> wrote:
> >The "time" entry in the perlfunc(1) manpage and the manpage for the
> >Time::Local module (part of the standard Perl distribution) should
> >help you understand how it works. If you don't know what % does, look
> >it up in the perlop(1) manpage.
rga <rga@io.com> writes:
> Hmmm ... I'm missing something here.
> Please, bear with me, and thanks for your
> help so far ... BUT ...
> I see this stops working for dates
> preceeding 1/1/1970 ?
The answer is YES, AFAIK!
In contrast, the solution I proposed in previous postings using the
"Date::DateCalc" module works from the year 1 to infinity (well,
limited by the size of integers on your system, that is).
Note however that years from 1 to 1582 have no real relevance because
the Gregorian calendar was only adopted in 1582 at its earliest (some
countries continued to use the Julian calendar until the beginning of
this century!). The module extrapolates back as though the Gregorian
calendar had been in effect.
Yours,
--
|s |d &|m | Steffen Beyer <sb@sdm.de> (+49 89) 63812-244 fax -150
| | | | software design & management GmbH & Co. KG
| | | | Thomas-Dehler-Str. 27, 81737 Munich, Germany.
"There is enough for the need of everyone in this world,
but not for the greed of everyone." - Mahatma Gandhi
------------------------------
Date: Sun, 20 Apr 97 20:47:31 GMT
From: D.A.Turner@ukc.ac.uk (dat)
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <995@beech.ukc.ac.uk>
Is it really necessary for this thread to be cross posted to so many
groups? Could I suggest that those who wish to continue it do so in
comp.lang.tcl
only?
------------------------------
Date: 21 Apr 1997 08:15:17 GMT
From: Mr. Chow Wing Siu <wschow@Comp.HKBU.Edu.HK>
Subject: Re: Running as root
Message-Id: <5jf7ml$8q2$1@power42t.hkbu.edu.hk>
wescott@cygnus.ColumbiaSC.NCR.COM wrote:
: In article <5it3m7$b1q$1@power42t.hkbu.edu.hk>, Mr. Chow Wing Siu <wschow@Comp.HKBU.Edu.HK> writes:
: > Hi, I write a C wrap program (setuid as root) to call a perl as root also.
: > However, inside the perl script, it has many system() calls, apparently,
: > it cannot run the system() calls as root. How to fix it?
: In your wrapper program change the uid to root before exec'ing perl.
: --
: -Mike Wescott
: mike.wescott@ColumbiaSC.NCR.COM
I've already done it on wrapper program. Any clue?
--
PGP PUBLIC KEY: https://www.comp.hkbu.edu.hk/~wschow/pgp.html
Key fingerprint = 15 C4 36 D6 EC CF 1D A4 7F D8 F9 EF 2E D7 32 A6
------------------------------
Date: Sun, 20 Apr 1997 16:51:21 -0600
From: jhardy@cins.com
Subject: Running Perl script on NT
Message-Id: <861572608.17660@dejanews.com>
I have a script I have been running on a UNIX box which I have also been
running locally under WIN95. Works on both of these systems fine. I tried
to upload and run it on an WINDOWS NT machine with a local ISP who has
installed PERL for NT. When I try to run the script on his server I get
the following error:
HTTP/1.0 500 Server Error (/cgi-comrise/quotesys.cgi
is not a valid Windows NT application. )
Is there something I have to do to this script to make it compatable with
NT ??
Or does this mean that the server is not setup properly to run perl
scripts.
This is a message he sent me :
> I re-installed Perl 5.0 for Windows NT. I also mapped an alias to the
> CGI-BIN directory inside the /XXXXX directory. I'd suggest mapping to it
> as /CGI-XXXXX/xxx.cgi because a standard /CGI-BIN/xxx.cgi call would
> expect the CGI files to reside in our standard CGI-BIN location... This
is
> to attempt to give XXXXX their own functional CGI-BIN directory for your
> testing and debugging purposes.
John
jhardy@cins.com
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Mon, 21 Apr 1997 08:28:20 GMT
From: david.whitmarsh@dial.pipex.com (David Whitmarsh)
Subject: Re: Sybperl on AIX
Message-Id: <335b24cb.2008296@news.dial.pipex.com>
babbar@morgan.com (Davender Babbar) wrote:
>Does anybody know if sybperl is available for AIX platforms
>and if there are any known issues with sybperl on AIX?
>
>Thanks a lot.
>
>davender/
>
>--
>Daveder Babbar
At my last contract they used AIX and I built perl and sybperl from
the source distribution without too much trouble.
David
------------------------------
Date: 21 Apr 1997 07:28:47 GMT
From: he@aspen.pprd.abbott.com (Ye He)
Subject: sysopen object method in perl 5.001?
Message-Id: <5jf4vf$7sp2@fizban.pprd.abbott.com>
I need to use a real C open (to create a file with the appropriate
permission bits, etc), and the O'Reilly Perl book 2nd edition that
covers perl 5 recommends sysopen.
I have:
use FileHandle;
...
sysopen MAILLOCK, $M_LOCK, O_WRONLY|O_CREATE|O_EXCL, 0444;
...
When running the script, I got:
Can't locate object method "sysopen" via package "FileHandle" at email.pl line 161.
I'm using perl 5.001, and the FileHandle.pm file does exist in my perl lib.
Could someone give me a pointer? I couldn't find it in the faq. Thanks much.
Please email me.
Ye
------------------------------
Date: 20 Apr 1997 22:02:05 GMT
From: searlea@aston.ac.uk (ash)
Subject: Re: Things that work on $_
Message-Id: <5je3ot$cqs$1@whatsit.aston.ac.uk>
Tad McClellan (tadmc@flash.net) wrote:
: ash (searlea@aston.ac.uk) wrote:
: : How many functions will operate on $_ or @_ as the default
: : if no other variables/arrays are specified? All?
:
: I gotta wonder why you are wondering ;-)
I was just curious to what extent you could take the use
of implicit variables...
Maybe it's some perverse idea, but I like the possiblity of writing
a 'reasonable size' program with NO variable names...
(I have no idea what a 'reasonable size' would be. Probably smaller that
something that makes my brain bleed...)
: "How many" doesn't seem useful at all. "Does func_of_interest_name_here
: operate on $_ or @_ if no other variables/arrays are specified?" seems
: useful.
Okay, you win the competition for clarity of english ;)
: : Is there a list anywhere?
:
: Yes.
:
: We call it the perlfunc man page.
I don't. Perlfunc is more than a list..
I'm thinking of something that would be more at home in the
O'Reilley Perl Reference book/pamphlet (the 5ukp one - $8?)
Function names down one side, a few headings ($_, @_, @F, $HOME),
and a tick in each column.
I guess I'm just a speed-freak, and I don't even want to scan a line
of text for the answer... Lots of whitespace is the order of the day.
: : (I don't have the camel)
:
: I'd walk a mile for one...
I'll buy it eventually! :)
--
Ash Searle - ash@innocent.com
"There Will Be No Armageddon"
------------------------------
Date: Sun, 20 Apr 1997 16:26:28 -0500
From: Xiao Luo <sluox@wl.k12.in.us>
To: M A <34110s96@student.csi.cuny.edu>
Subject: Re: Who will win? Borland or Microsoft or Programmers?
Message-Id: <335A8A04.6F41@wl.k12.in.us>
My answer will be directly attach to your post, unlike someother
guys..
M A wrote:
>
> Hi,
> My company is planning to start a project. We have a big question
> about our investments. We don't know if we should use Microsoft
> compiler or Borland. Some myth we heard over the net.
>
> 1) 90% of the programmer uses Microsoft Compiler.
That's absoutly untrue for now and future..
> 2) Borland will vanish in 2 years (NASDAQ:BORL)
Borland's bad finicial situation was issused four years ago, somebody
said Borland will vanish in 2 years, and 4 years passed, look what's
happening?
> 3) Borland has better compiler
Well, they have the fastest compiler for C++ (C++Builder), TOP
RAD(Delphi) and Very Very Fogotten but a very very professional and
powerful Visual dBase.. Actually, they have better compiler.. But
language itself is not only compiler..(Forget I didn't metion both
Borland and Microsoft doesn't support mulitiple-platform, yet..)
> 4) 99% of the College in US have/use Borland Compiler.
That's absoutly untrue, either..
If you want to choose project between Borland and Microsoft, my
suggestion is depended on what do you actually need. Actually, if you
wnat to make DOS-GAMES, window PE and all kinds of mutiple-platform PC
apps, choose Borland C++ 5.1 (VC++ doesn't support these platform
anymore..) if you want RAD, choose Delphi. If you are using MS-Office
(which is the top office suite), choose VB. If you have a bunch of
people accustomed to MFC class library, choose VC++..
And also, if you are using Linux, UNIX, X windows, SUN, and others, IBM
visual Age is the best choice..
>
> Some one show us the way?
>
> I myself use Borland Compiler
You don't have to switch to Microsoft, Borland had Builder and
Delphi..
>and haven't thought about Microsoft yet!
if you want to learn MFC, go for VC++
Xiao Luo..
------------------------------
Date: Mon, 21 Apr 1997 18:40:39 +0800
From: "Patrick C. K. Wu" <ckwu6@iesun21>
Subject: Win32::ODBC and Win32 Perl
Message-Id: <Pine.SOL.3.95.970421183400.1721A-100000@iesun21>
Hi all
Could anyone tell me that what version of Win32 Perl should be used with
Win32::ODBC (v970208). As I use Win32 Perl 5.003 with this Win32::ODBC,
I get "Parse Exception" using the test.pl provided in Win32::ODBC.
Thanks for any comments or pointers
Regards/Patrick C. K. Wu
email: ckwu6@ie.cuhk.edu.hk
------------------------------
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 333
*************************************