[15896] in Perl-Users-Digest
Perl-Users Digest, Issue: 3309 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jun 10 09:05:38 2000
Date: Sat, 10 Jun 2000 06:05:11 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <960642311-v9-i3309@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 10 Jun 2000 Volume: 9 Number: 3309
Today's topics:
Re: backquote error output <flavell@mail.cern.ch>
Re: backquote error output (jason)
Re: Capturing frames <gellyfish@gellyfish.com>
cgi-problem: internet explorer displays web-page - nets tillerbong@my-deja.com
cgi-problem: internet explorer displays web-page - nets tillerbong@my-deja.com
Re: cgi-problem: internet explorer displays web-page - <abuse@localhost>
Re: Executing several scripts (jason)
Re: exp (raise to a power...) <abe@ztreet.demon.nl>
Find and replace! <raphaelp@nr1webresource.com>
Re: Find and replace! <abuse@localhost>
Re: Find and replace! <raphaelp@nr1webresource.com>
Re: Find and replace! <raphaelp@nr1webresource.com>
Re: Help with OO needed. (Bart Lateur)
Re: HELP! Parameter Problems (Tad McClellan)
I am totally stuck on this one... <nospam@nospam.xx>
Re: I am totally stuck on this one... (jason)
Re: Larry Rosler interview on perl.com! (Bart Lateur)
Re: Larry Rosler interview on perl.com! (Bart Lateur)
Re: Larry Rosler interview on perl.com! lvirden@cas.org
Re: Perl and Novell <carvdawg@patriot.net>
Re: Perl cgi html programmer needed for Atlanta (David H. Adler)
Re: PerlModule LWP / DBI <gellyfish@gellyfish.com>
Re: sending mails with perl <gellyfish@gellyfish.com>
Re: site_perl vs lib (Bart Lateur)
Re: Solution needed for 'simple' task. <sweeheng@usa.net>
sorting pointers? (Neil Macneale)
Re: sorting pointers? <sweeheng@usa.net>
Thanks Jason!!! <nospam@nospam.xx>
Variables inside strings? <raphaelp@nr1webresource.com>
Re: Variables inside strings? (jason)
Re: Variables inside strings? <raphaelp@nr1webresource.com>
Re: where can I find doc for epl files <gellyfish@gellyfish.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 10 Jun 2000 11:33:23 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: backquote error output
Message-Id: <Pine.GHP.4.21.0006101127300.10335-100000@hpplus03.cern.ch>
On Fri, 9 Jun 2000, Tad McClellan wrote:
> \n is commonly called "newline".
yes
> ASCII calls it "line feed".
"some platforms represent the newline with an ASCII line feed
character".
> "carriage return" is a different character altogether.
On many platforms this is true, but much confusion has been caused by
forgetting that it is not always so.
OK, from the context it was clear that we were dealing with unix.
I still urge a more platform-independent use of terminology.
all the best
------------------------------
Date: Sat, 10 Jun 2000 11:38:43 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: backquote error output
Message-Id: <MPG.13acc5f27852321a98971b@news>
Alan J. Flavell writes ..
>On Fri, 9 Jun 2000, Tad McClellan wrote:
>> \n is commonly called "newline".
-
>> ASCII calls it "line feed".
-
>> "carriage return" is a different character altogether.
>
>On many platforms this is true, but much confusion has been caused by
>forgetting that it is not always so.
ASCII is not dependent on the platform .. as Tad says - the ASCII CR is
always a different character from the ASCII LF
Perl treats the LF differently on different platforms replacing it with
the appropriate line ending for text on that platform .. nothing to do
with ASCII
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: 10 Jun 2000 12:47:39 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Capturing frames
Message-Id: <8ht9sr$j2a$1@orpheus.gellyfish.com>
On Fri, 09 Jun 2000 17:22:33 +0200 Abe Timmerman wrote:
> On Fri, 09 Jun 2000 14:19:22 GMT, newbie@db-networks.com wrote:
>
>> On 8 Jun 2000 23:58:34 GMT, ebohlman@netcom.com (Eric Bohlman) wrote:
> ...
>>
>> |For a framed page, that will give you the content of the frameset
>> |document. You'll have to parse that, using something like
>> |HTML::TokeParser, to get the URLs to the individual content pages and
>> |then retrieve each of them.
>>
>> When I type the address and error web page stating that they only
>> support browsers with frames. There is nothing to parse. Is there an
>> updated librairy of LWP::UserAgent or another one?
>
> Look at the 'lwpcook' man page for the way you could make the server
> believe you are (your program is) Mozilla. (I wouldn't try 8 though,
> this is probably IIS with that _very_ broken browscap.ini thing)
>
This has nothing to do with whether the server thinks the UserAgent can
handle frames so fiddling with the UserAgent header will not have any
effect on the result. What a frames capable browser will do is retrieve
the frameset page and then parse it to find the layout and the content
of the consistuent frames and then fetch those pages - so any user agent
written using LWP will have to do the same if it is to get all the
content of a frameset. I have posted the following before but as Deja is
playing up at the moment I guess it would be opportune to do so again :
#!/usr/bin/perl -w
use strict;
use LWP::UserAgent;
use HTML::Parser;
use URI;
my $starturl = shift || die "No url supplied\n";
my $baseuri = URI->new($starturl);
my @urls ;
push @urls,$starturl;
my $agent = new LWP::UserAgent;
my $parser = HTML::Parser->new(api_version => 3,
start_h => [\&start ,"tagname, attr"]);
$agent->agent("Gelzilla/666");
while( my $url = shift @urls)
{
my $request = new HTTP::Request 'GET' => $url;
my $result = $agent->request($request);
if ($result->is_success)
{
print $result->as_string;
$parser->parse($result->content);
}
else
{
print "Error: " . $result->status_line . "\n";
}
}
sub start
{
my($tag,$attr) = @_;
if ($tag eq 'frame' )
{
my $thisuri = URI->new($attr->{src});
push @urls, $thisuri->abs($baseuri);
}
}
This is only the barebones as it only prints the consituent frames to
STDOUT but it will do it recursively (i.e. handle frames within frames).
It also is an example of the latest version pof HTML::Parser.
/J\
--
fortune oscar homer
------------------------------
Date: Sat, 10 Jun 2000 09:38:03 GMT
From: tillerbong@my-deja.com
Subject: cgi-problem: internet explorer displays web-page - netscape displays source code
Message-Id: <8ht29s$vv8$1@nnrp2.deja.com>
Hello,
I wrote a perl script that performs a search in a
flat file database and afterwards sends an html
page with the search results to the browser. The
program works fine.
But it displays the html page only in internet
explorer. If I call the script from netscape it
displays the html source code.
In my script I defined the output of the html
page as:
####
print "Content-Type: text/html\n\n" ;
print <<"EOM";
<HTML>
<HEAD>
<TITLE>Suchergebnis</TITLE>
... and so on
####
You can have a look at the problem under:
http://www.tillmanns.com/agentur/html/test.htm
as serch text try: horse
Does anybody see where I made the (probably
stupid) error?
Thanks
Christian
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Sat, 10 Jun 2000 09:38:04 GMT
From: tillerbong@my-deja.com
Subject: cgi-problem: internet explorer displays web-page - netscape displays source code
Message-Id: <8ht29t$vv9$1@nnrp2.deja.com>
Hello,
I wrote a perl script that performs a search in a
flat file database and afterwards sends an html
page with the search results to the browser. The
program works fine.
But it displays the html page only in internet
explorer. If I call the script from netscape it
displays the html source code.
In my script I defined the output of the html
page as:
####
print "Content-Type: text/html\n\n" ;
print <<"EOM";
<HTML>
<HEAD>
<TITLE>Suchergebnis</TITLE>
... and so on
####
You can have a look at the problem under:
http://www.tillmanns.com/agentur/html/test.htm
as serch text try: horse
Does anybody see where I made the (probably
stupid) error?
Thanks
Christian
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Sat, 10 Jun 2000 18:35:48 +0800
From: "multiplexor" <abuse@localhost>
Subject: Re: cgi-problem: internet explorer displays web-page - netscape displays source code
Message-Id: <8ht57t$m682@imsp212.netvigator.com>
<tillerbong@my-deja.com>
> Hello,
>
> I wrote a perl script that performs a search in a
> flat file database and afterwards sends an html
> page with the search results to the browser. The
> program works fine.
>
> But it displays the html page only in internet
> explorer. If I call the script from netscape it
> displays the html source code.
>
> In my script I defined the output of the html
> page as:
>
> ####
> print "Content-Type: text/html\n\n" ;
>
> print <<"EOM";
>
> <HTML>
> <HEAD>
>
> <TITLE>Suchergebnis</TITLE>
> ... and so on
> ####
>
>
> You can have a look at the problem under:
> http://www.tillmanns.com/agentur/html/test.htm
>
> as serch text try: horse
>
>
> Does anybody see where I made the (probably
> stupid) error?
>
> Thanks
> Christian
My download agent reports the followings:
2000/06/10 18:31:32 Connect to server ...
2000/06/10 18:31:32 Connect to server successfully.
2000/06/10 18:31:32 GET http://www.tillmanns.com/agentur/bilddb.pl?horse
HTTP/1.1
2000/06/10 18:31:32 HOST: www.tillmanns.com
2000/06/10 18:31:32 ACCEPT: */*
2000/06/10 18:31:32 User-Agent: NetAnts/1.0
2000/06/10 18:31:33 HTTP/1.0 200 OK
2000/06/10 18:31:33 Date: Sat, 10 Jun 2000 10:23:55 GMT
2000/06/10 18:31:33 Server: Apache/1.3.9 (Unix)
2000/06/10 18:31:33 bitte suchwort eingeben: Content-type: text/html
2000/06/10 18:31:33 Content-Type: text/plain
------------------------------
Date: Sat, 10 Jun 2000 09:06:58 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: Executing several scripts
Message-Id: <MPG.13aca25c8a58d17898971a@news>
Nikhil Prashar writes ..
>How would you create a Perl script that executes several scripts and
>parses the information received into a table. For example, how could you
>write a script that uses several search scripts at the same time and then
>shows the results in one long table?
perldoc -f do
and maybe - if you're clever
perldoc -f require
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Sat, 10 Jun 2000 12:43:51 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: exp (raise to a power...)
Message-Id: <4564kss9oqjttjrdq01gdi52520cj037sn@4ax.com>
On Fri, 09 Jun 2000 05:43:34 -0700, EKK <ekk@ekkinc.com> wrote:
> EKK wrote:
> >
> > Hello,
> >
> > I found exp for raising e to a certain power,
> > is there an expression such as C's pow, to raise
> > any number to the power of x?
...
>
> ...nevermind...
>
> sub log10 {
> my $n = shift;
> return log($n)/log(10);
> }
Huh? What has that got to do with it?
If you _insist_ on doing it the Pascal way (but that won't easily work
for $n <= 0):
$pow = $n>0? exp $x * log $n : 'Error';
So why not use the Perl way (works for all $n, $x):
$pow = $n**$x;
--
Good luck,
Abe
------------------------------
Date: Sat, 10 Jun 2000 11:50:28 +0200
From: "Raphael Pirker" <raphaelp@nr1webresource.com>
Subject: Find and replace!
Message-Id: <8ht2vq$34i$1@news.online.de>
Hi,
I have a question: How can I make Perl do a "find and replace" on a
variable?
I have a string of text in $message, which contains something like this:
Hi !!name/!! (!!email/!!),
Thanks for visiting !!site/!!. Hope you enjoyed your stay.
Bye,
Raphael
Now what I want is Perl to do a search and take every text which is
surrounded by "!!" and "/!!" and put a "$" infront of it, so inside the
program the text would look like this:
Hi $name ($email)
Thanks for visiting $site. Hope you enjoyed your stay.
Bye,
Raphael
Would appreciate any help on my problem!
Regards,
Raphael Pirker
raphaelp@nr1webresource.com
------------------------------
Date: Sat, 10 Jun 2000 18:47:40 +0800
From: "multiplexor" <abuse@localhost>
Subject: Re: Find and replace!
Message-Id: <8ht5u7$m675@imsp212.netvigator.com>
"Raphael Pirker" <raphaelp@nr1webresource.com> wrote
> Hi,
>
> I have a question: How can I make Perl do a "find and replace" on a
> variable?
>
> I have a string of text in $message, which contains something like this:
>
> Hi !!name/!! (!!email/!!),
>
> Thanks for visiting !!site/!!. Hope you enjoyed your stay.
>
> Bye,
>
> Raphael
>
> Now what I want is Perl to do a search and take every text which is
> surrounded by "!!" and "/!!" and put a "$" infront of it, so inside the
> program the text would look like this:
>
> Hi $name ($email)
>
> Thanks for visiting $site. Hope you enjoyed your stay.
>
> Bye,
>
> Raphael
>
>
> Would appreciate any help on my problem!
>
> Regards,
>
> Raphael Pirker
> raphaelp@nr1webresource.com
Example:
####
$message =<<EOF;
Hi !!name/!! (!!email/!!),
Thanks for visiting !!site/!!. Hope you enjoyed your stay.
EOF
$message =~ s/!!(.*?)\/!!/\$$1/g;
print $message;
###
See perlre
Hope this helps
------------------------------
Date: Sat, 10 Jun 2000 13:19:53 +0200
From: "Raphael Pirker" <raphaelp@nr1webresource.com>
Subject: Re: Find and replace!
Message-Id: <8ht87e$59o$1@news.online.de>
thanks a lot! The code you gave me worked, but here's the problem:
#####
$message = $FORM{message};
$message =~ s/!!(.*?)\/!!/\$$1/g;
print $message;
#####
This still returns the !! signs... Why?
> Example:
>
> ####
> $message =<<EOF;
> Hi !!name/!! (!!email/!!),
> Thanks for visiting !!site/!!. Hope you enjoyed your stay.
> EOF
>
> $message =~ s/!!(.*?)\/!!/\$$1/g;
> print $message;
> ###
>
> See perlre
>
> Hope this helps
>
>
------------------------------
Date: Sat, 10 Jun 2000 13:26:04 +0200
From: "Raphael Pirker" <raphaelp@nr1webresource.com>
Subject: Re: Find and replace!
Message-Id: <8ht8j1$5fu$1@news.online.de>
sorry, my fault! It DOES work, I only missed the last "/" before the 2
"!!"... Thanks a lot once more for helping out!!!
Regards,
Raphael Pirker
raphaelp@nr1webresource.com
Raphael Pirker <raphaelp@nr1webresource.com> wrote in message
news:8ht87e$59o$1@news.online.de...
> thanks a lot! The code you gave me worked, but here's the problem:
>
> #####
> $message = $FORM{message};
> $message =~ s/!!(.*?)\/!!/\$$1/g;
> print $message;
> #####
>
> This still returns the !! signs... Why?
>
> > Example:
> >
> > ####
> > $message =<<EOF;
> > Hi !!name/!! (!!email/!!),
> > Thanks for visiting !!site/!!. Hope you enjoyed your stay.
> > EOF
> >
> > $message =~ s/!!(.*?)\/!!/\$$1/g;
> > print $message;
> > ###
> >
> > See perlre
> >
> > Hope this helps
> >
> >
>
>
>
>
------------------------------
Date: Sat, 10 Jun 2000 08:50:50 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Help with OO needed.
Message-Id: <3946ffc7.3863534@news.skynet.be>
James Kufrovich wrote:
> I'm still a little fuzzy
>on how $parent can be used if it's an object (ie, the constructor is
>called as an object method), but I'll figure it out.
Well, to me, the name "parent" suggests that we're building a tree,
where a node (object) has it's position in a tree, and may have one or
more child nodes, that are in turn objects, that may have children
themselves... you start with one root node, and you get a whole tree.
Implementing nodes in Perl can easily be done by having a "children"
attribute, that contains a reference to an anonymous array, which
contains references to the child nodes.
So you could create a new child, that figures out it's parent (if any),
and then reports itself to the parent as the new child. The parent can
then add it to it's children attribute array (message mechanism).
Or the child itself can reach into the parent to the children attribute,
and push (a reference to) itself onto that array.
my $self = bless { children => [] }, $class; # the new object
push @{$parent->{children}}, $self;
--
Bart.
------------------------------
Date: Fri, 9 Jun 2000 21:57:13 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: HELP! Parameter Problems
Message-Id: <slrn8k383p.3k4.tadmc@magna.metronet.com>
On Sat, 10 Jun 2000 01:55:29 GMT, Jamie R <jrr386@home.com> wrote:
>
>
>Tom Briles wrote:
>>
>> In article <39417863.885AEDDE@home.com>, jrr386@home.com says...
>> > Can anyone tell me how to pass parameters into a script without using
>> > the CGI module?
>>
>> Why in the world would you want to do that?
>>
>> CGI.pm is in the standard distribution of any *semi*-recent Perl.
>I haven't found a site that will let me download CGI.pm directly,
>without installing Perl again. Any further information would be great.
Perl FAQ, part 8:
"How do I keep my own module/library directory?"
You do not need to (re)install perl itself to install modules.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 10 Jun 2000 06:53:00 -0400
From: Steve Halpern <nospam@nospam.xx>
Subject: I am totally stuck on this one...
Message-Id: <39421E0C.BE96CE59@nospam.xx>
Hi,
If anyone has an idea about this it would be a great help.
I am installing a commercial application into the server. The main part
of the application is a compiled executable which is linked by a CGI
script and perl module.
All has been done according to the help I have received from the company
I got the program from.
For this exemple, we will say that this executable is falled "exefile"
1. I have verified the Perl scripts are running without errors.
2. When I telnet the server and run the exe by typing ./exefile all is
fine and the exe runs, asking for the data that it needs to process.
3. In the Perl Module that calls the exe, the command line that calls it
reads...
$filetorun = "./exefile"; (this is basically passed by another
script)
my $retval = "$filetorun $val1 $val2";
This is exactly like the instructions say to do it, and suposedly many
others are successfully running the program using this method.
Am I doing something wrong? All paths are correct, and I entered some
print debugging statements to see if the command line was getting passed
with the correct info and it was ("./exefile <val1 data> <val2 data>").
The program sits in the cgi-bin folder.
Why would telneting the file work perfectly, but doing the same through
a perl script not execute the file?
Thanks for any ideas you all have.
Steve
------------------------------
Date: Sat, 10 Jun 2000 11:46:44 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: I am totally stuck on this one...
Message-Id: <MPG.13acc7d333b04fa598971c@news>
Steve Halpern writes ..
>3. In the Perl Module that calls the exe, the command line that calls it
>reads...
> $filetorun = "./exefile"; (this is basically passed by another
>script)
> my $retval = "$filetorun $val1 $val2";
you sure that the instructions don't say
my $retval = `$filetorun $val1 $val2`;
?? .. with backticks (under the tilde (~) on my keyboard)
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Sat, 10 Jun 2000 08:51:03 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <3944fa4b.2459541@news.skynet.be>
Steven Merritt wrote:
>since there's little glory in re-writing docs and there is lots of
>glory in adding new features, I don't see this happening."
>We're seeing the same thing with some of the stuff going on with the
>Perl core.
When was the last time that you saw a new keyword appear in Perl's core?
The only one for *years* that springs to my mind, is "our". What you're
more likely to see, is new functionality for old functions, like the
optional fourth parameter for substr().
New keywords are usually added through modules, for example cwd()
(Current Working Directory). I would even like to see some of the more
esotheric keywords that have been there virtually since the early
beginning, disappear from the core and be moved into modules. A typical
example is the gethostbyname() call, and (large) family. There is
absolutely no need for this to be in the core language.
>I'm with Larry Rosler on this one, a standard, no matter who implements
>it, would go a long way towards making Perl more useful in more
>situations.
By contrast, I'm with Ilya Z. *everything* should be fully documented.
Behaviour that isn't documented, ought to be considered a bug.
--
Bart.
------------------------------
Date: Sat, 10 Jun 2000 08:51:06 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <3945fc0b.2907674@news.skynet.be>
Craig Berry wrote:
>Seems like your two objections contradict one another.
They do. I was assuming that Perl's dev team would play by the rules,
while some others are notorious for not doing so. Can you say "MS Perl"?
Can you imagine this to become the de facto standard?
>Each
>vendor may offer extensions, so long as they don't interfere with the core
>subset.
That wouldn't preclude one vendor from becoming the dominant
(=reference) implementation.
>So the current perl dev team could continue their blessed work;
>the only change would be that their new stuff would not be 'official'
>(required of all conforming implementations) until it got ANSI approval.
I call that stiffling. It wouldn't even officially be "Perl" until it go
ANSI approval. If *ever*, since if there is another important vendor, an
this one is opposed to the changes...
Don't get me wrong. I think a full, complete and thurough audit of Perl,
by an independent and well respected oranization like ANSI, would be a
good thing. Perl's core dev team may even be required to take each and
every remark seriously. But that doesn't mean that they should
relinquish control. ANSI standardization would do that.
--
Bart.
------------------------------
Date: 10 Jun 2000 09:58:06 GMT
From: lvirden@cas.org
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <8ht3fe$keh$4@srv38.cas.org>
According to Drew Simonis <care227@attglobal.net>:
::There's certainly no ANSI Perl. Does Perl need the same kind of
::official standardization that C got?
::
::LR: I believe that it does, in order to increase its acceptability.
::Many organizations either cannot or will not endorse the use of
::unstandardized languages in their business-critical activities.
:
:
:Here here!
What exactly do people expect to 'standardize'? The primary reason that other
languages go through ANSI standardization is that the language community
face multiple implementations which differ in deployments due to a lack
of documentations, and specifically two or more of the implementations
differ in behavior (typically in undefined areas).
What perl implementations exist with differing behaviors? I thought that
there was a single perl source tree which was then compiled on each platform.
If that is the case, then the base perl code is the 'standard'. Why
would someone want to spend several years of buracratic rigamarole to get
an official 'stamp' confirming that the creator's text book on the workings
of perl was in fact the standard?
--
<URL: https://secure.paypal.com/refer/pal=lvirden%40yahoo.com>
<URL: mailto:lvirden@cas.org> <URL: http://www.purl.org/NET/lvirden/>
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
------------------------------
Date: Sat, 10 Jun 2000 06:15:41 -0400
From: H C <carvdawg@patriot.net>
Subject: Re: Perl and Novell
Message-Id: <3942154D.F6422428@patriot.net>
Oddly enough, there is. It's a module called "NDSm"...sorry, I don't
have the
site available right now. The last time I looked, it was a shareware
module, but
it looked as though it had all the functionality you want, and more....
Merlijn Freij wrote:
> Hi,
> Is there any (perl) tool available to communicate with NDS (Novell).
> I develop an intranetsite which needs to communicate with
> NDS to obtain Passwords and Logins for the security.
>
> Merlijn
------------------------------
Date: 10 Jun 2000 07:07:34 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: Perl cgi html programmer needed for Atlanta
Message-Id: <slrn8k3q9m.67o.dha@panix6.panix.com>
On Wed, 07 Jun 2000 22:06:03 GMT, kpulliam@my-deja.com
<kpulliam@my-deja.com> wrote:
>I need a Perl cgi html programmer for 6 month
>contract in Atlanta. Please reply to:
You have posted a job posting or a resume in a technical group.
Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.
Had you read and understood the Usenet user manual posted frequently
to "news.announce.newusers", you might have already known this. :)
Please do not explain your posting by saying "but I saw other job
postings here". Just because one person jumps off a bridge, doesn't
mean everyone does. Those postings are also in error, and I've
probably already notified them as well.
If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.
There is a Perl Jobs Announce list that may be more helpful to you. See
<http://www.pm.org/mailing_lists.shtml> for details.
Yours for a better usenet,
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
And, considering the prevalence of displaced psychiatric patients
among the ranks of the homeless, the viewpoints are usually guaranteed
to involve aliens or 7 foot tall magical cats. - Mark Rogaski
------------------------------
Date: 10 Jun 2000 11:49:16 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: PerlModule LWP / DBI
Message-Id: <8ht6fc$iu4$1@orpheus.gellyfish.com>
In comp.lang.perl.misc Tom McDonnell <tom.mcdonnell@kneesandtoes.com> wrote:
> I have a some strange problems, this is one of them:
>
> When pre-loading Perl modules in Apache/mod_perl it seems that any
> module using a .so library causes httpd not to start, although it says
> it's started OK. Have tried using startup.perl and using PerlModule xxx.
> These modules work under mod_perl normally (ie not pre-loaded), as do
> ones which require no .so files (like CGI.pm).
>
> It's the Apache/Perl config as shipped with Redhat 6.2 (Perl 5.005_03,
> Apache 1.3.12)
>
That'll be your problem then ;-} I would recommend that you remake your
Apache, Perl and mod_perl from the source - it seems that a lot of people
have problems using the prebuilt Apache with Red Hat (I know I have).
What messages are you getting in your Apache error log anyhow ?
You might also find that an answer might be forthcoming in the group
comp.infosystems.www.servers.unix .
/J\
--
fortune oscar homer
------------------------------
Date: 10 Jun 2000 11:41:39 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: sending mails with perl
Message-Id: <8ht613$itp$1@orpheus.gellyfish.com>
In comp.lang.perl.misc Stefan T. <stefan.thaler@gmx.net> wrote:
> hi everybody!
>
> with the following lines of a perl script i can send a mail:verschicken:
>
> -----script-----
> #!/usr/bin/perl
> open MAIL,"|mail nothing\@nomail.at ";
> print MAIL"hello world"; #:-)
> close MAIL;
>
In comp.lang.perl.misc it has been discussed ad nauseam why it is a bad
idea to use a command line mailer that requires you to supply the recipient
address on the command line - in the first place you are potentially
supplying compromising user supplied data to the shell.
I think you want to read perlfaq9 :
How do I send mail?
in concert with the sendmail manpage.
/J\
--
fortune oscar homer
------------------------------
Date: Sat, 10 Jun 2000 07:48:24 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: site_perl vs lib
Message-Id: <3941f29e.495039@news.skynet.be>
The WebDragon wrote:
> I
>added the extra dir to my preferences and everything *seems* to be
>working fine with the exception of Types.pm which keeps giving me errors
>at line 56 when I try and use the CPAN shell :(
>
>I haven't a CLUE what the error is from..
Did you put the site_perl folder before the lib folder?
--
Bart.
------------------------------
Date: Sat, 10 Jun 2000 17:51:56 +0800
From: "Swee Heng" <sweeheng@usa.net>
Subject: Re: Solution needed for 'simple' task.
Message-Id: <8ht2oq$aqg$1@mawar.singnet.com.sg>
> Yes of course I tried it. The code you provided did what I said when
> inserted into my script. The code above also works (thanks), providing I
> omit the second line (beginning: for ($c = 'A'; etc) and substitute my
> array for yours. For the experienced observer this may or may not have
> been obvious from your previous post, but the reason I asked for help
> originally was becasue I didn't know how to do it.
I see. I should have explained that the "sub pretty ..." line was a
subroutine to do what you want on an array fed into it as an argument and
return it. The second line of code (the "for ..." line) was only used to
verify that pretty() is working correctly.
> Still grateful for your assistance though.
You are welcomed. And apologies for the small outburst. :o)
Swee Heng
------------------------------
Date: Sat, 10 Jun 2000 00:59:04 -0700
From: mac4@operamail.com (Neil Macneale)
Subject: sorting pointers?
Message-Id: <mac4-1006000059040001@user-33qtjh1.dialup.mindspring.com>
I am new to perl and trying to figure out the sort function.
I have a list of pointers to lists. I want to sort the main list by the
value in the first element of each list pointed to. I am not really sure
how to say that any more clearly.
I have been trying something along the lines of:
sort {$$a->[0] <=> $$b->[0]} @arr;
I think the problem I am having is that I don't realy know how to
de-reference a pointer in perl. But what really bugs me is that I wrote a
subroutine version of the above with a print statement in it just to see
if the thing was trying to sort:
sort sortWithPrint @arr;
....
sub sortWithPrint {
print "COMPARING\n";
$$a->[0] <=> $$b->[0];
}
and nothing ever printed! What am I doing wrong? I know that @arr has
good values in it. I can print them out just fine:
foreach $arr_ref (@arr) {
$string = "$arr_ref->[0]\t$arr_ref->[1]\t$arr_ref->[2]\t$arr_ref->[3]\n";
print $string;
}
Any help would be great, thanks a lot!
Neil Macneale
------------------------------
Date: Sat, 10 Jun 2000 18:18:22 +0800
From: "Swee Heng" <sweeheng@usa.net>
Subject: Re: sorting pointers?
Message-Id: <8ht4ah$8a6$1@mawar.singnet.com.sg>
> I have been trying something along the lines of:
>
> sort {$$a->[0] <=> $$b->[0]} @arr;
The answer was staring you in the face, judging from your later code.
> I think the problem I am having is that I don't realy know how to
> de-reference a pointer in perl.
No one seems to refer to them as pointers - just call them references. But
yes, I do think of them as pointers. Anyway, execute the command "perldoc
perlref" for more info.
> sub sortWithPrint {
> print "COMPARING\n";
> $$a->[0] <=> $$b->[0];
> }
That did work for me. Maybe your STDOUT was re-directed to somewhere else?
> foreach $arr_ref (@arr) {
> $string =
"$arr_ref->[0]\t$arr_ref->[1]\t$arr_ref->[2]\t$arr_ref->[3]\n";
> print $string;
> }
The answer is in the above lines. In more details, see the following
############## begin code ###################
# the Data::Dumper module is very useful for debugging
use Data::Dumper; $Data::Dumper::Terse = 1; $Data::Dumper::Indent = 0;
# this is what you want, i suppose
sub byfirstelement { $a->[0] <=> $b->[0] }
# before and after
@arr = ( [4, 3, 2, 1], [0, 1], [1, 2, 3], [2, 3, 4, 5] );
print "before: ", Dumper @arr;
print "\n";
print "after : ", Dumper (sort byfirstelement @arr);
print "\n";
------------------------------
Date: Sat, 10 Jun 2000 08:01:59 -0400
From: Steve Halpern <nospam@nospam.xx>
Subject: Thanks Jason!!!
Message-Id: <39422E37.9B63C877@nospam.xx>
That was it, and it was not in the sample they provided.
Amazing how one little change can make all the difference.
Thanks very much for your note.
Steve
jason wrote:
> Steve Halpern writes ..
> >3. In the Perl Module that calls the exe, the command line that calls it
> >reads...
> > $filetorun = "./exefile"; (this is basically passed by another
> >script)
> > my $retval = "$filetorun $val1 $val2";
>
> you sure that the instructions don't say
>
> my $retval = `$filetorun $val1 $val2`;
>
> ?? .. with backticks (under the tilde (~) on my keyboard)
>
> --
> jason - elephant@squirrelgroup.com -
------------------------------
Date: Sat, 10 Jun 2000 13:33:33 +0200
From: "Raphael Pirker" <raphaelp@nr1webresource.com>
Subject: Variables inside strings?
Message-Id: <8ht913$5mo$1@news.online.de>
Hi,
I have the following code:
#######
## form-input of $message ##
<input type="hidden" name="message" value="Hi !!name/!! (!!email/!!),
Thanks for visiting !!site/!!. Hope you enjoyed your stay.">
## end form-input ##
## inside the script ##
$message = $FORM{message};
$message =~ s/!!(.*?)\/!!/\$$1/g;
print MAIL "$message"
#######
This returns:
Hi $name ($email),
Thanks for visiting $site. Hope you enjoyed your stay.
Which is just how I wanted it, only I wanted the variables to be "parsed".
How do I get Perl to exchange the variables with the values inside the
script? Right now it appears to be a string which has a "\" infront of the
"$" sign so it gets printed out as-is...
Best regards,
Raphael
------------------------------
Date: Sat, 10 Jun 2000 11:54:25 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: Variables inside strings?
Message-Id: <MPG.13acc99e2c6451a798971d@news>
Raphael Pirker writes ..
>#######
>## form-input of $message ##
><input type="hidden" name="message" value="Hi !!name/!! (!!email/!!),
>Thanks for visiting !!site/!!. Hope you enjoyed your stay.">
>## end form-input ##
>
>
>## inside the script ##
>$message = $FORM{message};
>$message =~ s/!!(.*?)\/!!/\$$1/g;
>print MAIL "$message"
>#######
>
>This returns:
>
>Hi $name ($email),
>Thanks for visiting $site. Hope you enjoyed your stay.
>
>Which is just how I wanted it, only I wanted the variables to be "parsed".
>How do I get Perl to exchange the variables with the values inside the
>script? Right now it appears to be a string which has a "\" infront of the
>"$" sign so it gets printed out as-is...
you shouldn't be using symbolic references for this .. you should be
using a hash
to correct your code so that it stumbles its way to the finish line you
take out the escape char .. and put in some {}s so that the $$s get
parsed correctly
$message =~ s/!!(.*?)\/!!/\$$1/g;
becomes
$message =~ s/!!(.*?)\/!!/${$1}/g;
but what you should have is
my %details = ( name => 'some name'
, email => 'some@email.com'
, site => 'some site name'
);
$message =~ s/!!(.*?)\/!!/$details{$1}/g;
it's neater .. easier to read .. nicer .. and less error prone .. and
more Perlistic
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Sat, 10 Jun 2000 14:04:04 +0200
From: "Raphael Pirker" <raphaelp@nr1webresource.com>
Subject: Re: Variables inside strings?
Message-Id: <8htar3$6kf$1@news.online.de>
Hi,
Well, this adds another problem (not again! :-)
I don't know the names of the variables yet, as each Form-input is going to
be different:
foreach $key (keys(%FORM)) {
$key: $FORM{$key}\n
}
This is what I use to determine all the variables which is sent through the
form.
How can I add those to a hash? Basically I need all form-data inside the
"details" hash which can then be accessed through the $message string...
Thanks in advance,
Raphael Pirker
raphaelp@nr1webresource.com
jason <elephant@squirrelgroup.com> wrote in message
news:MPG.13acc99e2c6451a798971d@news...
> Raphael Pirker writes ..
> >#######
> >## form-input of $message ##
> ><input type="hidden" name="message" value="Hi !!name/!! (!!email/!!),
> >Thanks for visiting !!site/!!. Hope you enjoyed your stay.">
> >## end form-input ##
> >
> >
> >## inside the script ##
> >$message = $FORM{message};
> >$message =~ s/!!(.*?)\/!!/\$$1/g;
> >print MAIL "$message"
> >#######
> >
> >This returns:
> >
> >Hi $name ($email),
> >Thanks for visiting $site. Hope you enjoyed your stay.
> >
> >Which is just how I wanted it, only I wanted the variables to be
"parsed".
> >How do I get Perl to exchange the variables with the values inside the
> >script? Right now it appears to be a string which has a "\" infront of
the
> >"$" sign so it gets printed out as-is...
>
> you shouldn't be using symbolic references for this .. you should be
> using a hash
>
> to correct your code so that it stumbles its way to the finish line you
> take out the escape char .. and put in some {}s so that the $$s get
> parsed correctly
>
> $message =~ s/!!(.*?)\/!!/\$$1/g;
>
> becomes
>
> $message =~ s/!!(.*?)\/!!/${$1}/g;
>
> but what you should have is
>
> my %details = ( name => 'some name'
> , email => 'some@email.com'
> , site => 'some site name'
> );
>
> $message =~ s/!!(.*?)\/!!/$details{$1}/g;
>
> it's neater .. easier to read .. nicer .. and less error prone .. and
> more Perlistic
>
> --
> jason - elephant@squirrelgroup.com -
------------------------------
Date: 10 Jun 2000 11:18:59 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: where can I find doc for epl files
Message-Id: <8ht4mj$irm$1@orpheus.gellyfish.com>
On Thu, 08 Jun 2000 14:07:52 -0500 Saleem Mohammed wrote:
> Hi Guys,
> Which perldoc has the document for .epl files??? Thank you for your
> help.
>
Well I would look in perltoc in the first instance, but I suspect you
are going to be disappointed. It might be helpful to know what context
you find these files and what they have in them.
/J\
--
fortune oscar homer
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 V9 Issue 3309
**************************************