[9149] in Perl-Users-Digest
Perl-Users Digest, Issue: 2767 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat May 30 10:07:21 1998
Date: Sat, 30 May 98 07:00:32 -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, 30 May 1998 Volume: 8 Number: 2767
Today's topics:
Re: An unwelcome and undeserved slap lvirden@cas.org
Best tool? stlam@yahoo.com
Re: Best tool? (Jonathan Stowe)
Re: children processes (M.J.T. Guy)
Re: cron job via perl ?? (Jonathan Stowe)
Re: dead URL ? nathan_lee50@my-dejanews.com
Re: Don't Know how to decrypt using PERL <lr@hpl.hp.com>
Re: Don't Know how to decrypt using PERL <lr@hpl.hp.com>
Re: Don't Know how to decrypt using PERL (Chris Nandor)
Re: GPL documentation == unspeakable evil lvirden@cas.org
i need help...much!!!...anyone, please... <REPLY_TO_damonbrent@earthlink.net>
Re: i need help...much!!!...anyone, please... (Jonathan Stowe)
Re: Install: Sorry, but how to install a module? (Bob Trieger)
Re: Perl 5.004 and Make Question (Bob Trieger)
Perl-Frage <wolfram.oehms@metronet.de>
Re: Q: How to read AND write to a programm? (M.J.T. Guy)
Re: Reading whole file into a scalar (Shaun Sides)
Re: seek advice on simple first program <lr@hpl.hp.com>
Re: seek advice on simple first program (Shaun Sides)
Re: seek advice on simple first program (Shaun Sides)
Re: seek advice on simple first program (Shaun Sides)
Re: seek advice on simple first program (Shaun Sides)
Re: seek advice on simple first program <danboo@negia.net>
Re: seek advice on simple first program (M.J.T. Guy)
Re: Sockets and E-mail (Jonathan Stowe)
Re: Something like "Visual Perl"? <pasha@isracom.net.il>
What is the best way to find and hire perl programmers? <webmaster@dynamicweb.com>
Re: What is the best way to find and hire perl programm <zenin@bawdycaste.org>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 30 May 1998 12:46:13 GMT
From: lvirden@cas.org
Subject: Re: An unwelcome and undeserved slap
Message-Id: <6kov2l$75e$1@srv38s4u.cas.org>
According to David Kastrup <dak@mailhost.neuroinformatik.ruhr-uni-bochum.de>:
:This is not proper FSF-speak.[...]
This is, to me, one of the central reasons for the FSF-related flame wars
that have recurred for years.
The Lewis-Carroll-like approach of treating words as meaning whatever
one wants, often with meanings quite different to traditional usage
(ala Orwellian new-speak), seems to be done intentionally to stir up
controversy and argument.
--
<URL:mailto:lvirden@cas.org> Quote: In heaven, there is no panic,
<*> O- <URL:http://www.teraform.com/%7Elvirden/> only planning.
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
------------------------------
Date: Sat, 30 May 1998 07:36:44 GMT
From: stlam@yahoo.com
Subject: Best tool?
Message-Id: <6kocuc$ve9$1@nnrp1.dejanews.com>
hi all,
1) What is the best tool for PERL programmer?
Is Perl Builder from www.solutionsoft.com is the best IDE for PERL?
2) What is the best tool for Web developer?
Is Cold fusion is the best?
It seems that using cold fusion, I don't need to write code.
but I know Perl.
Thanks,
Stlam.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Sat, 30 May 1998 11:31:12 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Best tool?
Message-Id: <356fe97f.3439293@news.btinternet.com>
On Sat, 30 May 1998 07:36:44 GMT, stlam@yahoo.com wrote :
>hi all,
>
>1) What is the best tool for PERL programmer?
vi of course.
(Close all doors and wait for the Editor holy-war to begin)
/j\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: 30 May 1998 12:22:04 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: children processes
Message-Id: <6kotlc$2or$1@lyra.csx.cam.ac.uk>
Charles DeRykus <ced@bcstec.ca.boeing.com> wrote:
>Have each child set a hari-kari alarm, e.g,
>
> # child process
> eval {
> local $SIG{__DIE__} = 'DEFAULT';
> local $SIG{ALRM} = sub { die "timed out" };
> alarm 60; # 1 minute time out
> ....
> };
> alarm 0;
Reverse the order of those last two lines, else you'll leave a window
in which the alarm isn't trapped.
> if ($@ =~ /^timed out/) {
> ....
> } elsif ($@) {
> die "unexpected eval error: $@";
> }
Mike Guy
------------------------------
Date: Sat, 30 May 1998 11:31:09 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: cron job via perl ??
Message-Id: <356fdf36.1253388@news.btinternet.com>
On Fri, 29 May 1998 19:49:05 -0700, Kerem Yaman wrote :
>Thanks to everyone I got libwww installed all the "required" packages
>and libwww, installed everything, and it works !!!!
>
>I can grab webpages with one line of code.
>
>What does not however work as advertised is the HTML::Parse package. It
>seems like the docs are inconsistent with the package I got.
>
>For exapmle:
>
>SYNOPSIS
>
> use HTML::Parse;
> $h = parse_htmlfile("test.html");
> print $h->dump;
> $h = parse_html("<p>Some more <i>italic</i> text", $h);
> $h->delete;
>
> print parse_htmlfile("index.html")->as_HTML; # tidy up markup in a
>file
>
>So I tried it:
>#!/usr/bin/perl
>use LWP::Simple;
>use HTML::Parse;
>$h = parse_htmlfile("test.html");
>print $h->dump;
>$h = parse_html("<p>Some more <i>italic</i> text", $h);
>$h->delete;
>print parse_htmlfile("index.html")->as_HTML; # tidy up markup in a file
>
>It results in:
>[yaman@localhost myperl]$ ./foo3
>Can't locate HTML/Parse.pm in @INC (@INC contains:
>/usr/lib/perl5/i386-linux/5.00401 /usr/lib/perl5
>/usr/lib/perl5/site_perl/i386-linux /usr/lib/perl5/site_perl .) at
>./foo3 line 3.
>BEGIN failed--compilation aborted at ./foo3 line 3.
>
>It seems like the package is named HTML::Parser not Parse. So when I try
>that (change HTML::Parse to HTML::Parser) I get:
>
>[yaman@localhost myperl]$ ./foo3
>Undefined subroutine &main::parse_htmlfile called at ./foo3 line 4.
>
Eh,oh
There are indeed the two module HTML::Parse and HTML::Parser.
HTML::Parse according to its POD:
*Disclaimer: This module is provided for backwards compatibility
with earlier versions of this library. New code will probably
prefer to use the HTML::Parser and HTML::TreeBuilder modules
directly.*
The equivalent method to parse_htmlfile in HTML::Parser is parse_file.
(Boy, am i beginning to get confused with that 'r')
With HTML::Parser though you have extra responsibilities if you want
to do anything useful. To get the functionality you appear to have in
your example you will probably want to use HTML::TreeBuilder wherein
you can do something like this:
use HTML::Parser;
use HTML::TreeBuilder
$htm = new HTML::TreeBuilder;
$htm->parse_file("c:/htdoc/index.htm");
print $htm->as_HTML;
You will notice that you dont get very pretty out put with this.
If you need an example of how to use HTML::Parser you might check out:
<URL:http://www.btinternet.com/~gellyfish/resources/htbeauty.pl>
Which whilst not being a thing of beauty in perl terms will
demonstrate how to use the module.
Alternatively a quick search in DejaNews for HTML::Parser in this
group will throw up plenty of other stuff.
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Sat, 30 May 1998 05:50:21 GMT
From: nathan_lee50@my-dejanews.com
Subject: Re: dead URL ?
Message-Id: <6ko6mt$n31$1@nnrp1.dejanews.com>
in the dos prompt type
ping www.XXXXXXXX.com
if it reply "bad ip address"
then its dead URL.......
__________________________________________________
The worlds leading Subdomain Name Redirect Service.
A shorter, permanent and professional URL in a cheap
price. http://www.CyberOnline.com
---------------------------------------------------
In article <6khjtu$jtu@mozo.cc.purdue.edu>,
gebis@albrecht.ecn.purdue.edu (Michael J Gebis) wrote:
>
> Wei Weng <wweng@attila.stevens-tech.edu> writes:
>
> }How do I test a URL is deadlink or not?
>
> Click on it.
>
> --
> Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Fri, 29 May 1998 23:05:40 -0700
From: "Larry Rosler" <lr@hpl.hp.com>
Subject: Re: Don't Know how to decrypt using PERL
Message-Id: <6ko7ju$eq6@hplntx.hpl.hp.com>
Ken Fox wrote in message <6knn46$94t14@eccws1.dearborn.ford.com>...
>"Larry Rosler" <lr@hpl.hp.com> writes:
>> Please, folks. Get your heads out of the Unix sandbox. Continued
blind
>> Unix-centrism will hinder Perl, not help it.
>
>How is not copying the definition of crypt() out of the C documentation
>being Unix-centric? If your C library doesn't have crypt(), then
neither
>does your Perl. If your C library has crypt(), then why isn't a
pointer
>from the Perl docs to the C docs enough?
See my response to I R A Aggie. There is absolutely no requirement that
Perl use a C library or, therefore, that Perl users have access to C
library documentation.
>The Perl docs don't define all the oddities of printf() either.
Anybody
>going to complain about that too?
No, for two reasons:
The current `perldoc -f sprintf` explicitly and completely documents the
(sui generis) Perl implementation of sprintf, not any particular C
implementation. "As a result, any non-standard extensions in your local
sprintf() are not available from Perl." [Important note: None of this
is true for the documentation available at
<URL:http://www.perl.com/CPAN-local/doc/manual/html/pod/perlfunc/sprintf
.html>, which simply points to C sprintf(3), hence is totally
inadequate, as we have seen.]
If one did want to read elsewhere about a similar C function also called
sprintf(), it and its friends are members of the ANSI/ISO Standard C
Library, for which documentation is lavishly available. As we have
learned, crypt() is not. The ANSI/ISO Standard C Library is doggedly
*not* Unix-centric. I know. I was there.
--
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: Sat, 30 May 1998 00:35:37 -0700
From: "Larry Rosler" <lr@hpl.hp.com>
Subject: Re: Don't Know how to decrypt using PERL
Message-Id: <6kodbf$g7j@hplntx.hpl.hp.com>
brian d foy wrote in message ...
...
>
>and of course you gave up and posted to comp.lang.perl.misc because
>you expect to be spoonfed. the problem with your philosophy is
>that no one ever learns how to do things, and you are the epitome
>of that consequence.
>
>i'm sorry that you are stupid. here are the detailed instructions for
>idiots:
>
>1. go to <URL:http://www.yahoo.com>
>
>2. in the text widget at the top, type "unix man pages", and select
>the submit button. it's a fairly obvious thing to search on.
>
>3. the results page has 4 hits. one says
>"Linux Manual Pages [John Martin]". select that or try the other
three.
>
>4. one the search form for "Linux Manual Pages [John Martin]", type
>"crypt" and select "Section 3 - C Library Routines" from the pulldown
>menu. select the "Find" button.
>
>5. you now see the crypt(3) man page. slow modems aside, these five
>steps took 15 seconds.
>
>get a clue.
OK, let's summarize.
I am a stoopid noobie Windows Perl user. I want to use the Perl crypt()
function, I read the Perl documentation, and I ask in c.l.p.m. for more
information about the purpose of the 'salt' argument. I am told `man 3
crypt`.
At the DOS command line, I type 'man 3 crypt' and get 'No entry for
"crypt" in section 3 of the manual'. (It knows about 'man' at all only
because I have bought and installed MKS to make my system more
Unix-like. Maybe I'm not all that stoopid.) I type 'man 3 printf' and
get a similar response. In fact, there is nothing at all in section 3
of the manual, because I do not have a C compiler! (Does that make me
more stoopid? No, it makes me an idiot.) It's nice that 'man 1 date'
works, though, because I have lots of Unix (Posix) commands, such as
'man'. I am a very unusual Windows Perl User. Now what?
I go to Yahoo!, my favorite search engine, and search for 'man crypt'.
I get one (1) response, having to do with _crypt_ography. Gosh, I
should have used AltaVista, or Lycos, or Excite, or something, but I'm
too stoopid.
A little bird whispers in my ear, "Here's a clue. Try 'unix man pages'.
It's a fairly obvious thing to search on, because Perl uses the C
library and C is Unix." The bird is not stoopid, just completely wrong.
But I do it anyway, and get 4 links. Two of them are dead, and the
third one returns a blank page with some explanatory shrugs. But the
fourth link gets me the answer I've been looking for. "Slow modems
aside, these five steps took 15 seconds." Bull-bleep!
Which brings me back to the original point, which maybe by now all you
Unix geniuses will begin to understand:
Perl is not C. C is not Unix. Perl is not Unix. "Read the F***ing
Unix Manual" is not a helpful response to questions on c.l.p.m. about
Perl, especially to questions from Windows (or Mac?!) users.
Perhaps further insults should go to /dev/null (oops, I mean NUL:). <--
NO :-) HERE!!!
--
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: Sat, 30 May 1998 11:34:44 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Don't Know how to decrypt using PERL
Message-Id: <pudge-3005980729050001@dynamic416.ply.adelphia.net>
In article <6knn46$94t14@eccws1.dearborn.ford.com>,
kfox@pt0204.pto.ford.com wrote:
# "Larry Rosler" <lr@hpl.hp.com> writes:
# > Please, folks. Get your heads out of the Unix sandbox. Continued blind
# > Unix-centrism will hinder Perl, not help it.
#
# How is not copying the definition of crypt() out of the C documentation
# being Unix-centric? If your C library doesn't have crypt(), then neither
# does your Perl.
Funny. With MacPerl:
perl -le 'print crypt($ARGV[0], substr($ARGV[0], 0, 2))' mypassword
myylAylKPNtmw
Yet, my C library on my Mac has not crypt().
# If your C library has crypt(), then why isn't a pointer
# from the Perl docs to the C docs enough?
I don't have C docs on my Mac. Perl for Win32 will have crypt built into
the binary, yet it does not have C docs on the OS, either.
# The Perl docs don't define all the oddities of printf() either. Anybody
# going to complain about that too?
It does give a lot of detail on sprintf(), which is pretty much the same
thing, wouldn't ya say?
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: 30 May 1998 12:59:18 GMT
From: lvirden@cas.org
Subject: Re: GPL documentation == unspeakable evil
Message-Id: <6kovr6$83s$1@srv38s4u.cas.org>
According to Stuart Cooper <stuartc@ind.tansu.com.au>:
:I think the simplest explanation is that they don't see the indivdual pod
:pages collectively as a 1000 page book. As I read it, the task list item
:is calling for such a book; a free equivalent of the book 'Programming Perl'.
:In my opinion; there is no single, free Perl manual, 1000 pages or otherwise.
And some would call the indexed PDF of the pod files a single Perl manual.
Also note that the texinfo version of the pod doc has been made available
on a regular basis as well.
Thousands of readers to these newsgroups could all offer their own
interpretations to the words in question. I suspect the results would
fall into a few common interpretations... However, it seems to me than
rather than speculate, if the person who wrote those specific words
would volunteer to clarify what they meant, there would be less need
to speculate. But then, of course, all would argue over whether the
person's opinion was 'moral' or 'valid'.
Frankly, because of the distance between meanings of 'free' that people
have, it seems unproductive to attempt to come to an agreement.
--
<URL:mailto:lvirden@cas.org> Quote: In heaven, there is no panic,
<*> O- <URL:http://www.teraform.com/%7Elvirden/> only planning.
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
------------------------------
Date: Sat, 30 May 1998 07:33:29 -0400
From: "brent verner" <REPLY_TO_damonbrent@earthlink.net>
Subject: i need help...much!!!...anyone, please...
Message-Id: <6koqlq$mnr$1@chile.it.earthlink.net>
ok, so i got this perl win32 'app?' in hopes of speeding up the dev time on
cgi-scripts (yes, this is the only way i've ever used perl). anyway, i
can't get the perl.exe to do anything, aside from creating a dos box. i
don't do hardcore system proggies like some people in this newsgroup do in
perl, c++ is a much nicer lang for win apps, but back to the issue...i am
trying to call scripts locally through the perl win32 interpreter with no
luck. could anyone please reply to this and tell me how to, or point me to
a place that can, simply get my perl win32 to act like a remote interpreter.
if this won't work, could someone please explain to me the utility of this
'app'. i know i sound down on perl, that is far from the truth, i'm just
disappointed that this perl win32 thingy is not acting like i'd expected it
to.
thanks in advance,
brent verner
------------------------------
Date: Sat, 30 May 1998 13:25:11 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: i need help...much!!!...anyone, please...
Message-Id: <356ffc13.8133129@news.btinternet.com>
On Sat, 30 May 1998 07:33:29 -0400, brent verner wrote :
>Subject: i need help...much!!!...anyone, please...
This is is a fairly busy newsgroup. People may be more inclined to
look at your posting if you follow the advice given here:
http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post
>ok, so i got this perl win32 'app?' in hopes of speeding up the dev time on
>cgi-scripts (yes, this is the only way i've ever used perl).
Eh,oh.
Perl is a good language in many ways for developing CGI applications
but bear in mind that CGI can be done with any language that supports
the Input and Output requirements of the specification
> anyway, i
>can't get the perl.exe to do anything, aside from creating a dos box.
Well Perl on Win32 is a console application so that is what one might
expect. Assuming that perl.exe is somewhere in your PATH what happens
when you type at a command prompt:
C:\> perl -e "print 'Hello, World\n';"
Your Perl distribution should have come with all sorts of wonderful
documentation. Typing :
C:\> perldoc perl
should get you started on a voyage of discovery.
> i
>don't do hardcore system proggies like some people in this newsgroup do in
>perl, c++ is a much nicer lang for win apps, but back to the issue...
Is a "hardcore system program" one that plays a clip of Napalm Death
when it detects a fatal error?
> i am
>trying to call scripts locally through the perl win32 interpreter with no
>luck.
Whats wrong with:
C:\>perl myscript.pl
?
> could anyone please reply to this and tell me how to, or point me to
>a place that can, simply get my perl win32 to act like a remote interpreter.
Ah. The penny drops.
Perl wont work like that on its own (extensions and variant
implemenations notwithstanding). A CGI program (if this is what you
mean by "remote interpreter" ) is run by an HTTP server which passes
the parameters to the program in the appropriate manner, output from
the program is then sent via the server back to the client. You will
need an HTTP server yourself if you want to do this stuff but this
newsgroup is not really an appropriate place to be discussing the
merits of the various servers available for the Win32 platform - I
might suggest comp.infosystems.www.servers.ms-windows or its FAQ for
starters.
>if this won't work, could someone please explain to me the utility of this
>'app'.
Perl was not originally developed for CGI purposes, a casual glance at
this newsgroup might indicate otherwise on occasion but this is purely
cicumstantial. Infact I'm not entirely sure whether CGI existed at
all when Perl was fledged (infact I know but unsure of the exact
chronology).
Perl is used for a wide range of applications that have nothing to do
with the internet in general let alone CGI - a list of these would be
futile but a quick peek at <URL:http://www.perl.com/> should give some
idea.
> i know i sound down on perl, that is far from the truth, i'm just
>disappointed that this perl win32 thingy is not acting like i'd expected it
>to.
The triumph of reality over expectation.
>
>thanks in advance,
>
No problem
>brent verner
>
>
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Sat, 30 May 1998 04:52:11 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Install: Sorry, but how to install a module?
Message-Id: <6ko3cg$oo6$1@strato.ultra.net>
[ posted and mailed ]
Ulf Wendel <ulf.wendel@kiel.netsurf.de> wrote:
-> I'm using the latest ActiveState Perl Version on WinNT. And I'm not able
-> to install a module :((. Makefile.pl doesn't work.
->
-> In only one FAQ I found a notice on it that said: "Since MakeMaker
-> hasn't been ported to Perl for Win32, you'll usually have to move the
-> module files to the Lib directory yourself. Remember to maintain
-> sub-directory trees. "
Get the standard port of perl for win32 and you won't have these problems.
It is the current version (5.004), comes with many popular modules installed
and you can install new modules.
Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-888-821-1954
and hang up when somebody answers "
------------------------------
Date: Sat, 30 May 1998 04:55:17 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Perl 5.004 and Make Question
Message-Id: <6ko3ia$oo6$2@strato.ultra.net>
[ posted and mailed ]
"F.Quednau" <quednauf@nortel.co.uk> wrote:
-> Brian Bitteker wrote:
->
-> > ...What am I missing?
->
-> Yeah, dmake.However, 3 months ago or so it wasn't included in the GS Perl
-> distribution. The last time I downloaded it (app. 1month ago), dmake was
-> clearly described in the readme of the GS port and it was included. So if
-> you downloaded a while ago, I believe that you might not have dmake.
I downloaded the GS port in December and have always had dmake.exe.
Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-888-821-1954
and hang up when somebody answers "
------------------------------
Date: 30 May 1998 13:47:38 GMT
From: "wolfram.oehms" <wolfram.oehms@metronet.de>
Subject: Perl-Frage
Message-Id: <01bd8bd1$654fdb80$61cca8c1@default>
Hallo Newsleser
Vielleicht kann mir jemand von Euch weiterhelfen:
Ich habe vor, die Nutzung eines bestimmten Programmes im Perl-Format in
Verbindung mit dem Einverstdndnis des Nutzers mit einer geringf|gigen
Zahlung zu gewdhren.
Der Nutzer mu_ aber keine Verpflichtung eingehen, d.h. wenn er "vergi_t"
den Betrag zu |berweisen, wird dies keinerlei Konsequenzen haben. Ich
vertraue also auf die Ehrlichkeit.
Um dennoch die Zahlungsmoral zu verbessern w|rde ich dem Nutzer
dieses Scriptes gerne eine automatisch geschickte Email als freundliche
Erinnerung zusenden, die auch die Angaben |ber meine Bankverbindung
enthdlt.
Ich habe mich schon an einigen Scripten wie "SendMail.pl" versucht, aber
der Punkt, wo ich nicht weiterkomme ist schnell erreicht.
Frage: Kennen Sie jemand, der diese Funktion f|r mich einbauen kann?
Welche Anforderungen an die Umgebung/Webhost/Provider bestehen? Mu_ auf dem
Host bestimmte Software installiert sein?
Und vor allem: welche Kosten wdren mit der Einbindung dieser Funktion in
meine Seiten (durch einen Programmiere) verbunden?
Ich hoffe, Sie kvnnen mir weiterhelfen und danke im voraus.
Oehms
------------------------------
Date: 30 May 1998 12:41:00 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Q: How to read AND write to a programm?
Message-Id: <6kouos$3av$1@lyra.csx.cam.ac.uk>
Michael <mhoereth@rz-online.de> wrote:
>Nearly the same question:
>
>How can I execute a program within a Pearl Script.
>For example "prog.exe -a -b"
>What need I to write in the Pearl Script ?
perldoc -f system
or perhaps look up backticks or qx// in perlop.
Mike Guy
------------------------------
Date: 30 May 1998 12:41:00 GMT
From: arch@abts.net (Shaun Sides)
Subject: Re: Reading whole file into a scalar
Message-Id: <slrn6mvd42.3ks.arch@abts.net>
Original message by: Tom Phoenix <rootbeer@teleport.com>
Date: Sat, 30 May 1998 03:11:02 GMT
Subject: Re: Reading whole file into a scalar
> You left off the smiley. :-) It's hard to imagine that Perl _wouldn't_
> be able to perform such a simple task as reading a file into a scalar.
;-) Hehe. Glad I used the word "think" instead of a blanket statement.
> You mean $/ of course. Who says changing it is not recommended? If you
> don't want to surprise the rest of your code, though, it's probably best
> to change it only locally, as others have shown.
I did mean $/. Finger mixup on that one. The llama book has several
footnotes that advise against altering the contents of it. I've been
reading that a lot lately, so.....
I certainly looked closely at the great responses that were posted to the
original article.
Learning a lot every day, especially in clpm. ;-)
--
==============================================================================
Shaun L. Sides | Hey! CyberGold | arch@abts.net
Free Randal Schwartz and Ric Flair! | wastes yer time | arch@sara.mmlc.nwu.edu
==============================================================================
The time for desperation is upon us. Let's play.
First Wizard Zeddicus Zu'l Zorander
==============================================================================
------------------------------
Date: Sat, 30 May 1998 01:07:02 -0700
From: "Larry Rosler" <lr@hpl.hp.com>
Subject: Re: seek advice on simple first program
Message-Id: <6kof5l$gdd@hplntx.hpl.hp.com>
Andre L. wrote in message ...
>Why not open the file only once, with read and write access?
>
>In this example, $" is used to add the newlines... no substitution
necessary!
>($" is documented in perlvar.)
>
>-----------------------
>
>#!/usr/bin/perl -w
>
>$" = "\n";
>
>foreach $file (@ARGV) {
> open(F, "+<$file")
> or warn "Couldn't open '$file': $!\n" and next;
> @content = <F>;
> truncate(F, 0);
> print F "@content\n";
> close F;
>}
>
>-----------------------
That's neat, and suggests Yet Another Way to Do It, using $\, the output
record separator:
$\ = "\n";
...
print F @content;
...
I Benchmark this about 30% faster than using $". YMMV, of course.
--
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: 30 May 1998 12:56:28 GMT
From: arch@abts.net (Shaun Sides)
Subject: Re: seek advice on simple first program
Message-Id: <slrn6mve6s.3ks.arch@abts.net>
Original message by: Mike Stok <mike@stok.co.uk>
Date: 30 May 1998 03:30:18 GMT
Subject: Re: seek advice on simple first program
> perl -ni.bak -e 'print $_, "\n"' file ...
>
> might be one way of doing something close to what you want, and it may be
> good enough for you too...
Whew. That's humbling. ;-P
> Hope this helps,
Oh, it does. Thanks. ;-)
--
==============================================================================
Shaun L. Sides | Hey! CyberGold | arch@abts.net
Free Randal Schwartz and Ric Flair! | wastes yer time | arch@sara.mmlc.nwu.edu
==============================================================================
The time for desperation is upon us. Let's play.
First Wizard Zeddicus Zu'l Zorander
==============================================================================
------------------------------
Date: 30 May 1998 12:52:36 GMT
From: arch@abts.net (Shaun Sides)
Subject: Re: seek advice on simple first program
Message-Id: <slrn6mvdvh.3ks.arch@abts.net>
Original message by: Kevin Reid <kpreid@ibm.net>
Date: Fri, 29 May 1998 22:06:50 -0400
Subject: Re: seek advice on simple first program
> The precedence of || is higher than open, therefore this will never
> report an error because $file will (usually) be true.
>
> Do this instead:
>
> open FILE, $file or die "Can't open $file $!";
>
> (You also need to change "||" to "or" in the rest of your program.)
Hmmm. I guess I'm not done with precedence, yet. I can't find an entry
in the table that matches open which is also lower than ||. I was
thinking it would fall under the terms entry. Easy enough to use or
instead of ||, though.
> Or, if you like obfuscation:
>
> foreach $FILE (@ARGV) {
> open FILE or die "Can't open $file $!";
I'm fascinated by the myriad ways one can obfuscate perl, but at the
moment I'm just trying to learn the simple way of doing things. ;-)
> How about this instead of those 3 lines:
>
> push @file, "$_\n";
::sigh:: It's all so easy when you guys do it.
> The "--" needs a space after it ("-- ") in order to function as a
> signature delimiter.
Interesting. I couldn't find anywhere in the .slrnrc to change that.
My software looks for "--\n". Any advice?
--
==============================================================================
Shaun L. Sides | Hey! CyberGold | arch@abts.net
Free Randal Schwartz and Ric Flair! | wastes yer time | arch@sara.mmlc.nwu.edu
==============================================================================
The time for desperation is upon us. Let's play.
First Wizard Zeddicus Zu'l Zorander
==============================================================================
------------------------------
Date: 30 May 1998 13:05:30 GMT
From: arch@abts.net (Shaun Sides)
Subject: Re: seek advice on simple first program
Message-Id: <slrn6mvenq.3ks.arch@abts.net>
Original message by: Andre L. <alecler@cam.org>
Date: Fri, 29 May 1998 23:59:42 -0500
Subject: Re: seek advice on simple first program
> Why not open the file only once, with read and write access?
Baby steps. I'm taking baby steps. <from the movie "What About Bob?">
> In this example, $" is used to add the newlines... no substitution necessary!
> ($" is documented in perlvar.)
>
> -----------------------
>
> #!/usr/bin/perl -w
>
> $" = "\n";
>
> foreach $file (@ARGV) {
> open(F, "+<$file")
> or warn "Couldn't open '$file': $!\n" and next;
> @content = <F>;
> truncate(F, 0);
> print F "@content\n";
> close F;
> }
>
> -----------------------
Cool. Would it be better to change $" locally if the program were
larger?
> Have fun with Perl,
So far, I'm having a lot. This ng provides a lot of incentive. ;-)
--
==============================================================================
Shaun L. Sides | Hey! CyberGold | arch@abts.net
Free Randal Schwartz and Ric Flair! | wastes yer time | arch@sara.mmlc.nwu.edu
==============================================================================
The time for desperation is upon us. Let's play.
First Wizard Zeddicus Zu'l Zorander
==============================================================================
------------------------------
Date: 30 May 1998 13:07:25 GMT
From: arch@abts.net (Shaun Sides)
Subject: Re: seek advice on simple first program
Message-Id: <slrn6mverd.3ks.arch@abts.net>
Original message by: Larry Rosler <lr@hpl.hp.com>
Date: Sat, 30 May 1998 01:07:02 -0700
Subject: Re: seek advice on simple first program
> That's neat, and suggests Yet Another Way to Do It, using $\, the output
> record separator:
>
> $\ = "\n";
> ...
> print F @content;
> ...
>
> I Benchmark this about 30% faster than using $". YMMV, of course.
Why do you suppose the list separator is so much faster than the output
record separator? Geez, when they say there's more than one way, that
ain't no joke, eh? ;-)
--
==============================================================================
Shaun L. Sides | Hey! CyberGold | arch@abts.net
Free Randal Schwartz and Ric Flair! | wastes yer time | arch@sara.mmlc.nwu.edu
==============================================================================
The time for desperation is upon us. Let's play.
First Wizard Zeddicus Zu'l Zorander
==============================================================================
------------------------------
Date: Sat, 30 May 1998 08:07:38 -0400
From: Dan Boorstein <danboo@negia.net>
Subject: Re: seek advice on simple first program
Message-Id: <356FF68A.3C8234D0@negia.net>
Andre L. wrote:
>
> Why not open the file only once, with read and write access?
>
> In this example, $" is used to add the newlines... no substitution necessary!
> ($" is documented in perlvar.)
>
> -----------------------
>
> #!/usr/bin/perl -w
>
> $" = "\n";
>
> foreach $file (@ARGV) {
> open(F, "+<$file")
> or warn "Couldn't open '$file': $!\n" and next;
> @content = <F>;
seek F,0,0; # oops, forgot to rewind ( that'll be 25 cents :-)
> truncate(F, 0);
> print F "@content\n";
> close F;
> }
--
Dan Boorstein home: danboo@negia.net work: danboo@y-dna.com
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
- Cosmic AC
------------------------------
Date: 30 May 1998 13:48:11 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: seek advice on simple first program
Message-Id: <6kp2mr$50r$1@lyra.csx.cam.ac.uk>
In article <slrn6mvdvh.3ks.arch@abts.net>, Shaun Sides <arch@abts.net> wrote:
>
>Hmmm. I guess I'm not done with precedence, yet. I can't find an entry
>in the table that matches open which is also lower than ||. I was
>thinking it would fall under the terms entry. Easy enough to use or
>instead of ||, though.
It's the entry "list operators (rightward)". The table could perhaps
be made clearer by explaining that "list operators (leftward)" means
list or unary operators with their arguments in parentheses, while
"list operators (rightward)" means list operators whose arguments are
_not_ contained in parens.
Mike Guy
------------------------------
Date: Sat, 30 May 1998 11:31:13 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Sockets and E-mail
Message-Id: <356fec0c.4067141@news.btinternet.com>
On Fri, 29 May 1998 11:46:55 GMT, Robert Webb wrote :
>I wonder if anyone can point me in the directin of info/docs/examples
>of Perl scripts that send e-mails, preferably by opening a socket to
>an SMTP mail server. This is on an NT box, by the way.
>
Have a look at perlfaq9 for an example.
You can also use Net::SMTP to do much the same thing with slightly
more programmer overhead.
You might however want to take note of the weapons grade disputation
that occurred on this subject here not so long ago.
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Sat, 30 May 1998 15:27:57 +0200
From: Pasha Zusmanovich <pasha@isracom.net.il>
Subject: Re: Something like "Visual Perl"?
Message-Id: <3570095D.5A9553FD@isracom.net.il>
Oh, I knew that this will happen sooner or later! Visual Basic, Visual
C++, Visual J++, and now Visual Perl... I am sure MS working on it...
:-(
Seriously, emacs?
Heribert Wettels wrote:
>
> Has anybody heard about a programming environment for Perl similar to
> Visual Basic? Or at least an editor that creates indents and does some
> highlighting?
>
--
Pasha Zusmanovich -------o x x "What i tell you three times is true."
pasha@isracom.net.il o o x L.Carroll, "The Hunting of the Snark"
www.isracom.net.il/~pasha x x o---------------------------------------
------------------------------
Date: Fri, 29 May 1998 18:21:39 GMT
From: "JG Motolanez" <webmaster@dynamicweb.com>
Subject: What is the best way to find and hire perl programmers?
Message-Id: <T0Db1.1638$Ls.1009778695@newsreader.digex.net>
What is the best and most appropriate way to inform the perl community that
I am looking for one or two very good perl programmers for full time web
based application development?
I'm sensitive to the fact that I will alienate the people I want to contact
if I post job descriptions to the wrong newsgroups. Hence, this post
includes only limited details about what I am looking for.
--
JG Motolanez [mailto:jgm@dynamicweb.com]
Director of Development
DynamicWeb Enterprises, Inc. [http://www.dynamicweb.com]
------------------------------
Date: 30 May 1998 09:34:42 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: What is the best way to find and hire perl programmers?
Message-Id: <896521312.46461@thrush.omix.com>
JG Motolanez <webmaster@dynamicweb.com> wrote:
: What is the best and most appropriate way to inform the perl community that
: I am looking for one or two very good perl programmers for full time web
: based application development?
The *.jobs.* groups. Make sure "Perl" is somewhere in the
subject. -When I was scaning for jobs I found it a major pain
when Perl jobs where titled, "JOB: Web Programmer". This
could be anything from HTML data entry through front to back
Oracle database work using a Java front end and a C++ backend.
So I for one only botherd to look at the /perl/i posts, if
only because I won't work with anyone that wastes my time.
: I'm sensitive to the fact that I will alienate the people I want to contact
: if I post job descriptions to the wrong newsgroups. Hence, this post
: includes only limited details about what I am looking for.
Yep. I for one am fully in favor of starting a comp.lang.perl.jobs
group myself. The normal *.jobs.* groups are so cluttered with
crap they are nearly useless for both the person with the
offer, and the people looking for offers. With the huge amount
of perl work around I think this would be of great help to everyone
on both sides of the fence.
All that said, I was offered to interview for my current job
via unsolicited email based only on the way I answered questions
about perl in Usenet. I found it flattering that the company
took the time to read the perl groups and chose to contact me.
They knew I was local because they also saw my posts on my
ISP's local groups, which the HR guy also has an account.
--
-Zenin
zenin@archive.rhps.org
------------------------------
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 2767
**************************************