[16028] in Perl-Users-Digest
Perl-Users Digest, Issue: 3440 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 21 11:05:38 2000
Date: Wed, 21 Jun 2000 08:05:22 -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: <961599922-v9-i3440@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 21 Jun 2000 Volume: 9 Number: 3440
Today's topics:
Re: Accessing config files from CGI scripts. <care227@attglobal.net>
Re: Building perl 5.6 on Linux Mandrake <jboes@eoexchange.com>
CGI.pm <Gizzzmo@pandora.be>
Re: CGI.pm (Eric Bohlman)
Re: CGI.pm <care227@attglobal.net>
Re: CGI.pm <gellyfish@gellyfish.com>
Re: CGI.pm <tony_curtis32@yahoo.com>
cops <mike.solomon@eps.ltd.uk>
Re: cops <care227@attglobal.net>
Re: cops <care227@attglobal.net>
DB_File and Berkeley DB 3.1 (Anno Siegel)
Re: debugging an already running program (Eric Bohlman)
Re: File and string manipulation anuragmenon@my-deja.com
Help with saving hasreffs in a dbm file nmm367@mail.usask.ca
Re: How can I get perl (cgi) html to work on the OS Sea <care227@attglobal.net>
Re: https robb4444@my-deja.com
Re: I need to get better at Perl <mhc@Eng.Sun.COM>
Re: IDE for perl? <gellyfish@gellyfish.com>
Re: Is there a dos htm enviroment for perl ? <bill.kemp@wire2.com>
Looping through records in an array scarey_man@my-deja.com
LWP and HTTPS fail <nyaga@hotmail.com>
Re: Mailto accomplished via Perl / CGI ? uttam_padukone@my-deja.com
Re: Mailto accomplished via Perl / CGI ? uttam_padukone@my-deja.com
Net::Cmd <Poul.Kornmod@RadissonSAS.com>
Re: Net::Cmd <Poul.Kornmod@RadissonSAS.com>
Re: NT or Unix at runtime <lwaibel@cwia.com>
Perl -> AT unix scheduler ? fperkins@my-deja.com
perl CONSTANTS (Samuel A. Mullen)
Re: PerlDBI documentation <gellyfish@gellyfish.com>
Re: Print in bold to file fperkins@my-deja.com
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 21 Jun 2000 10:26:24 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Accessing config files from CGI scripts.
Message-Id: <3950D090.CF88C34D@attglobal.net>
Stephen Henwood wrote:
>
> Does anybody have a neat way of accessing config files from a
> Perl/CGI script ( running on Linux/Apache)
>
Let me see if I am understanding this correctly.
You want to have a script that (for example) queries data from a
database. Items like DB user name and password will be in an
external file?
What have you tried so far? If I am reading this correctly,
its a really easy task. Create a file of the proper format,
maybe something like:
db_users:
database_name:username:password
or whatever, really. Then your Perl script can open() the file,
split() the lines into an array or strings and then use those array
values/strings in the main body. Am I on the right track?
open DB_CONFIG, "db_users" or die "can't read from db_users: $!\n";
while (<DB_CONFIG>)
{
if ($_ =~ /$web_supplied_username/)
{
my ($dsn, $username, $password) = split(/:/, $_);
}
}
Or something. Let me know if I'm off by a mile.
------------------------------
Date: Wed, 21 Jun 2000 10:07:12 -0400
From: Jeff Boes <jboes@eoexchange.com>
Subject: Re: Building perl 5.6 on Linux Mandrake
Message-Id: <3950ccba$0$1494$44a10c7e@news.net-link.net>
Andreas Kutschera wrote:
>
> In comp.lang.perl.misc you write:
>
> >I'm trying to build perl 5.6 on my Linux workstation (Mandrake 7.0),
>
> >/usr/include/linux/param.h:4: asm/param.h: No such file or directory
>
> >and so on for about 4 different other files (but dozens of occurances).
> >I seem to have copies of all the appropriate missing '.h' files, but
> >they're not where the Makefile is expecting them. Has anyone
> >successfully built 5.6 on such a configuration? Is there an appropriate
> >response to the configuration process that will tell 'make' where to
> >look?
>
> This has nothing to do with perl. It's a typical Linux problem and it
> used to come from updating a 2.0 kernel to a 2.2 kernel.
> There's a symlink missing.
Right, I realize this is not a Perl question but a perl question. I
don't believe it's off-topic for this group, though. I've been a denizen
of this group for a couple of years, so I thought I knew what was on-
and off-topic, but if you really think I'll get better aid in a Mandrake
or Linux newsgroup, I'm willing to go.
I did determine that there is a symlink in place that was mis-directed
(this is a brand-new workstation with a clean Mandrake install, so it's
probably a Mandrake issue as to how it got this way). I repaired that,
and now when I build I get
Making DynaLoader (static)
ext/util/make_ext: cd: ext/DynaLoader: No such file or directory
make[160]: Entering directory `/home/jboes/perl-5.6.0'
make[160]: `config' is up to date.
make[160]: Leaving directory `/home/jboes/perl-5.6.0'
make[160]: Entering directory `/home/jboes/perl-5.6.0'
AutoSplitting perl library
./miniperl -Ilib -e 'use AutoSplit; \
autosplit_lib_modules(@ARGV)' lib/*.pm lib/*/*.pm
over and over until it finally dies with 'too many open files'.
> /usr/include/linux is usually a symlink to <linux-sources>/include
> and <linux-sources>/include/asm is a symlink to the correct asm
> directory for your processor (e.g. asm-i386 for Intel).
> If these symlinks aren't there, either create them by hand or get a
> fresh kernel from ftp.kernel.org (or your favourite mirror).
> That should solve your problem.
>
> Of course, I could be totally wrong, but since you didn't tell us
> where the copies of param.h et al. are, that's all I can do :-)
>
> ciao
> --
> Andreas Kutschera, Siemens Business Services DS, Tel. 030/386-28089
> Nonnendammallee 101, D-13629 Berlin Fax 030/386-22934
> email: Andreas.Kutschera@bln.siemens.de
> A "NOSPAM" in the subject line will definitely pass my SPAM-blocker :-)
--
Jeff Boes |perl -e 'print map(substr(" acehjk|jboes@eoexhange.com
Sr. S/W Engineer |lnoprstu,\n",$i+=$_,1),(5,9,-2,1, |616-381-9889 ext 18
Change Technology|-13,1,7,1,4,-9,-1,8,-11,10,-7,8,-4|616-381-4823 fax
EoExchange, Inc. |,-7,4,-3,1,4,-3,8,4,1));' |www.eoexchange.com
------------------------------
Date: Wed, 21 Jun 2000 14:08:13 GMT
From: "Gizzzmo" <Gizzzmo@pandora.be>
Subject: CGI.pm
Message-Id: <h%345.7349$Ve.7021@afrodite.telenet-ops.be>
Hi
I'm using the CGI.pm module to interact with my forms, but I've a small
question concerning the print function.
When I would like to use a 'Here'document for sending a preformatted html
document where a want to put some variables in, it works , ex:
print <<end;
<html><body>
This is a variable: $variable
</body></html>
end
So this works perfect when the $variable is declared and assigned a value
before the print.
But when I would like to do the same thing using the CGI.pm module it won't.
ex:
$p = new CGI;
print <<end;
<html><body>
This is a variable: $p->param('fieldname')
</body></html>
end
I get something like HASH(2axfd) or something like that
so now I am supposed to do something like this:
$p = new CGI;
print <<end;
<html><body>
This is a variable:
end
$value = $p->param('fieldname');
print $value;
print <<end;
</body></html>
end
Those little things between the ends or useless I know, but magine that the
text between is much bigger.
So it is not very handy to do this for every variable.
I've looked in the CGI.pm module and other resource but I don't seem to find
an answer.
So is it possible to do it like my first example or is my last example the
only way,
Has CGI.pm the one standard include with perl5, no printoption that I can
intergrate in my heredocuments ?
Christophe
------------------------------
Date: 21 Jun 2000 14:27:20 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: CGI.pm
Message-Id: <8iqjc8$8o7$2@slb1.atl.mindspring.net>
Gizzzmo (Gizzzmo@pandora.be) wrote:
: I'm using the CGI.pm module to interact with my forms, but I've a small
: question concerning the print function.
It actually has nothing to do with the print function at all...
: When I would like to use a 'Here'document for sending a preformatted html
: document where a want to put some variables in, it works , ex:
: print <<end;
: <html><body>
: This is a variable: $variable
: </body></html>
: end
Yep, here-docs are (by default) double-quotish, and you can interpolate
variables into a double-quotish context.
:
: So this works perfect when the $variable is declared and assigned a value
: before the print.
: But when I would like to do the same thing using the CGI.pm module it won't.
^^^^^^^^^^
: ex:
: $p = new CGI;
: print <<end;
: <html><body>
: This is a variable: $p->param('fieldname')
: </body></html>
: end
But you're not trying to do the "same thing" here. You're trying to
interpolate the results of a method call, not a variable. Interpolation
works only for variables.
:
: I get something like HASH(2axfd) or something like that
That's because perl is trying to interpolate the variable $p, which is a
reference, and trying to turn a reference into a string gives you
something like what you got.
I think you ought to check out the section in perlfaq4 entitled "How do I
expand function calls in a string?" (a method call is just a special type
of function call).
------------------------------
Date: Wed, 21 Jun 2000 10:40:43 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: CGI.pm
Message-Id: <3950D3EB.B6EBDE39@attglobal.net>
Gizzzmo wrote:
>
> Hi
>
> I'm using the CGI.pm module to interact with my forms, but I've a small
If you are going to use CGI.pm, then _use_ it. If you just want an
easy way to get form data, there are smaller modules for that.
> So this works perfect when the $variable is declared and assigned a value
> before the print.
> But when I would like to do the same thing using the CGI.pm module it won't.
> ex:
> $p = new CGI;
I see so many people writing here-docs for HTML, I can't figure out
why.
print start_html,
"This is a variable: $p->param('fieldname')",
end_html;
And if you really want it to look clean, import the standard functions
and drop the OO interface. This works in most cases when you are
only creating one CGI object anyway:
use CGI qw(:standard);
print start_html,
"This is a variable: param('fieldname')",
end_html;
------------------------------
Date: Wed, 21 Jun 2000 14:53:51 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: CGI.pm
Message-Id: <3G445.515$My4.49505@news.dircon.co.uk>
On Wed, 21 Jun 2000 14:08:13 GMT, Gizzzmo Wrote:
> Hi
>
> I'm using the CGI.pm module to interact with my forms, but I've a small
> question concerning the print function.
> When I would like to use a 'Here'document for sending a preformatted html
> document where a want to put some variables in, it works , ex:
> print <<end;
> <html><body>
> This is a variable: $variable
> </body></html>
> end
>
> So this works perfect when the $variable is declared and assigned a value
> before the print.
> But when I would like to do the same thing using the CGI.pm module it won't.
> ex:
> $p = new CGI;
> print <<end;
> <html><body>
> This is a variable: $p->param('fieldname')
> </body></html>
> end
>
> I get something like HASH(2axfd) or something like that
> so now I am supposed to do something like this:
>
> $p = new CGI;
> print <<end;
> <html><body>
> This is a variable:
> end
> $value = $p->param('fieldname');
> print $value;
> print <<end;
> </body></html>
> end
>
Yes thats right expressions are not interpolated in double quoted strings
only $variables. You will want to read the item in perlfaq4 :
How do I expand function calls in a string?
Whic basically comes down to something like :
print <<END;
<html><body>
This is a variable: @{[$p->param('fieldname')]}
</body></html>
END
And sundry other ugly things ;-}
/J\
------------------------------
Date: 21 Jun 2000 09:55:41 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: CGI.pm
Message-Id: <87r99rrslu.fsf@limey.hpcc.uh.edu>
>> On Wed, 21 Jun 2000 10:40:43 -0400,
>> Drew Simonis <care227@attglobal.net> said:
> print start_html,
> "This is a variable: $p->param('fieldname')",
> end_html;
Did you test this before posting?
With a simple off-line test, the body comes out as:
<BODY>This is a variable: CGI=HASH(0x80ea0b8)->param('fieldname')</BODY>
> print start_html,
> "This is a variable: param('fieldname')",
> end_html;
Ditto problem.
<BODY>This is a variable: param('fieldname')</BODY>
You're still trying to interpolate a method call.
print start_html,
'This is a variable: ', param('fieldname'),
end_html;
hth
t
--
"Trying is the first step towards failure"
Homer Simpson
------------------------------
Date: Wed, 21 Jun 2000 14:21:33 +0100
From: "mike solomon" <mike.solomon@eps.ltd.uk>
Subject: cops
Message-Id: <8iqfid$5f80a$1@fu-berlin.de>
I have downloaded a program called Cops
this is a Unix security program and is written in perl
The latest version I could find was 1.04 which was written for Perl 3
when I run it using Perl 5.005_03 in AIX it goes into a loop
I have narrowed the problem down to a file called kuang
I am interested to know if anyone else uses this program and has ironed out
the problems
I have being trying for hours to find why it is looping but am not doing
very well at finding it
I hesitate to put the actual code here as there are 645 lines of it
any help would be much appreciated
Regards
Mike Solomon
------------------------------
Date: Wed, 21 Jun 2000 10:32:41 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: cops
Message-Id: <3950D209.B9F0571A@attglobal.net>
mike solomon wrote:
>
> I have downloaded a program called Cops
>
> this is a Unix security program and is written in perl
Check in comp.security.unix
I'm certain that there are folks in that group who have played with
Cops. You;ll get a better answer faster.
------------------------------
Date: Wed, 21 Jun 2000 10:32:46 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: cops
Message-Id: <3950D20E.F968AAF3@attglobal.net>
mike solomon wrote:
>
> I have downloaded a program called Cops
>
> this is a Unix security program and is written in perl
Check in comp.security.unix
I'm certain that there are folks in that group who have played with
Cops. You'll get a better answer faster.
------------------------------
Date: 21 Jun 2000 14:50:23 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: DB_File and Berkeley DB 3.1
Message-Id: <8iqknf$kc3$1@lublin.zrz.tu-berlin.de>
I built DB_File using the current version 3.1 of Berkeley DB from
sleepycat. This is with perl 5.6.0 under solaris 2.7.
Building went smoothly (I symlinked libdb-3.1.so to /usr/lib and
the corresponding db.h to /usr/include), but on use DB_File I get
ld.so.1: /usr/local/bin/perl: fatal: relocation error: file
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/auto/DB_File/DB_File.so:
symbol db_version: referenced symbol not found
nm .../DB_File.so shows that indeed db_version is undefined there, but
then again, this may be resolved only in libdb-3.1.so, where it *is*
defined.
Should I use an earlier version of Berkeley DB? Am I missing something
else?
Anno
------------------------------
Date: 21 Jun 2000 14:07:37 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: debugging an already running program
Message-Id: <8iqi79$8o7$1@slb1.atl.mindspring.net>
Jonathan Stowe (gellyfish@gellyfish.com) wrote:
: On Tue, 20 Jun 2000 04:11:40 -0700 warrenb10 wrote:
: >
: > Got questions? Get answers over the phone at Keen.com.
: > Up to 100 minutes free!
: > http://www.keen.com
: >
:
: If one of my posts turns up with this on the bottom then I'll know there
: is something going on.
It's coming from Remarq.
------------------------------
Date: Wed, 21 Jun 2000 14:40:40 GMT
From: anuragmenon@my-deja.com
Subject: Re: File and string manipulation
Message-Id: <8iqk54$7of$1@nnrp1.deja.com>
Thanks for the reply. I really REALLY appreciate it. I am quite
comfortable with VRML. Its the perl that I have some problems with and
your suggestions are really valuable.
Thanks,
Vinod.
n article
<Pine.GSO.4.10.10006201918490.29843-100000@user2.teleport.com>,
Tom Phoenix <rootbeer@redcat.com> wrote:
> On Wed, 21 Jun 2000 anuragmenon@my-deja.com wrote:
>
> > I have to write a VRML generator in perl.
> >
> > his is what I want the generator to do.
> >
> >
> > 1. Construct a string pertaining to the animation part of the VRML
> > file being generated.
>
> Okay...
>
> > 2. Lets call that say String1
>
> Okay...
>
> > 3. now what I want to do is sandwich this string between two other
text
> > files and make the whole thing one text file and name it something
like
> > test.wrl
>
> So, you want to write a new text file? See perl's open() operator,
> documented in the perlfunc manpage.
>
> > 4. What I am trying to achieve is...
> >
> > TextFile1 + String1 + TextFile2 => TextFile3
>
> Okay...
>
> > 5. rename TextFile3 as test.wrl
>
> See perl's rename() operator, also documented in the perlfunc manpage.
>
> > Is this even possible?
>
> Sure sounds like it. In fact, except for step one, it sounds pretty
> trivial. Cheers!
>
> --
> Tom Phoenix Perl Training and Hacking Esperanto
> Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 21 Jun 2000 14:45:20 GMT
From: nmm367@mail.usask.ca
Subject: Help with saving hasreffs in a dbm file
Message-Id: <8iqkdq$83q$1@nnrp1.deja.com>
I have a hash 'hash' which keys are strings and values and references
to another hash - 'hashref'. I have no problem manipulating either of
the hashes when they are in memory but when I try to save 'hash' in a
dbmfile the content of 'hashref' is lost. I understand why is that. I
know that there should be a way to do that but can't figure it out how.
Any bootstraps will be appreciated.
Naiden
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 21 Jun 2000 10:06:00 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: How can I get perl (cgi) html to work on the OS Seal ?
Message-Id: <3950CBC8.1D0CC667@attglobal.net>
Tom Phoenix wrote:
>
> > The person named Drew Simonis need not reply < rude
>
> I find him less than rude, too. :-) But I find your implication (that he
> would be rude rather than helpful) to be troublesome. Perhaps you will
> consider all of us rude, no matter how helpful we are. Maybe no one should
> answer you. Please try to see everyone's replies in the best possible
> light.
I _do_ have feelings you know! Geepers.
------------------------------
Date: Wed, 21 Jun 2000 14:26:33 GMT
From: robb4444@my-deja.com
Subject: Re: https
Message-Id: <8iqja4$74v$1@nnrp1.deja.com>
IO::Socket::SSL is already loaded in Activestate Perl
<http://www.activestate.com>. Download it and look at this example:
HTTPS
URLs with https scheme are accessed in exactly the same way as with
http scheme, provided that an SSL interface module for LWP has been
properly installed (see the README.SSL file found in the libwww-perl
distribution for more details). If no SSL interface is installed for
LWP to use, then you will get ``501 Protocol scheme 'https' is not
supported'' errors when accessing such URLs.
Here's an example of fetching and printing a WWW page using SSL:
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->;new(GET => 'https://www.helsinki.fi/');
my $res = $ua->request($req);
if ($res->is_success) {
print $res->as_string;
} else {
print "Failed: ", $res->status_line, "\n";
}
Robb
In article <8ij82m$qnj$1@orpheus.gellyfish.com>,
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> On Fri, 16 Jun 2000 09:55:03 GMT Eric Mosley wrote:
> > How can I download a file using https (notice the s for ssl) from
within a
> > perl program and save it to a local file.
> >
> > Any pointers to modules, etc, would be appreciated greatly!
> >
>
> You can do it with LWP::UserAgent if you have Net::SSL or
IO::Socket::SSL
> installed.
>
> /J\
> --
> ** This space reserved for venue sponsor for yapc::Europe **
> <http://www.yapc.org/Europe/>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 21 Jun 2000 07:35:21 -0700
From: Mike Coffin <mhc@Eng.Sun.COM>
Subject: Re: I need to get better at Perl
Message-Id: <8p63dm7t846.fsf@Eng.Sun.COM>
Jonathan Stowe <gellyfish@gellyfish.com> writes:
> On 20 Jun 2000 10:08:04 -0700, Mike Coffin Wrote:
> >
> > Avoid this newsgroup; it's a
> > very poor place to get help. Very few people here will take the time
> > to help you, unless you consider admonitions to RTFM helpful.
> >
>
> I'm sure you will be following your own advice then. I dont see many of
> your posts here trying to remedy this.
I answer a few when I have time. E.g., the post you responded to. If
everyone answered a few questions a month in a helpful fashion instead
of answering hundreds unhelpfully, don't you agree that this would be
a more useful newsgroup?
-mike
------------------------------
Date: Wed, 21 Jun 2000 14:43:05 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: IDE for perl?
Message-Id: <Zv445.512$My4.49505@news.dircon.co.uk>
On Tue, 20 Jun 2000 19:40:58 GMT, felrodian@my-deja.com Wrote:
>
> In response to the orignal question, if you plan on using a real OS
> (Linux) and want to use perl to make graphical programs usint GTK+,
> glade is a nice IDE for making the GUI and can work with perl, C, and
> others.
>
Ada for instance .... weird
/J\
------------------------------
Date: Wed, 21 Jun 2000 14:09:40 +0100
From: "W Kemp" <bill.kemp@wire2.com>
Subject: Re: Is there a dos htm enviroment for perl ?
Message-Id: <961593103.1680.0.nnrp-12.c3ad6973@news.demon.co.uk>
smile773 wrote in message ...
>
>Drew Simonis
>I am offended by your comment:
>Now go, little bird. And have a nice trip.
>
>You have an inflated opinion about yourself
>tweak tweak
>
>
Yes, but I'm sure many people don't get your question.
Are you just trying to make a file from a CGI program.
In parts the question looks like its been through some sort of random
keyword generation.
This might be offensive, but I've done worse.
------------------------------
Date: Wed, 21 Jun 2000 14:53:36 GMT
From: scarey_man@my-deja.com
Subject: Looping through records in an array
Message-Id: <8iqkt6$8hi$1@nnrp1.deja.com>
I am retreiving records from a database and placing the returned info
into a reference to an array of array of references to each row (as
worded in mysql manual)
How can I easily loop through the number of rows checking whether the
value of the same element in the next row is different or not, and
displaying it if it is different?
This is a snippet of my code, which does not work quite right and is
not very good. ($rowcount is number of returned recs from DB)
for $cntr (0 .. 5) {
my $x = 0;
while ($x < $rowcount ) {
if ($history->[$x][$cntr] ne $history->[$x+1][$cntr]) {
print "$history->[$x][$cntr] $history->[$x+1][$cntr]";
}
$x++;
}
}
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 21 Jun 2000 15:10:27 +0200
From: "JOW" <nyaga@hotmail.com>
Subject: LWP and HTTPS fail
Message-Id: <8iqepp$hcg$1@yggdrasil.utfors.se>
Hi im trying to do a POST in HTTPS using LWP
I have:
Open SSL 0.95a
Perl 5.005_03
true64 unix
But i cant make the connection, because I get this error:
500 Can't connect to secure.incab.se:443 (Bad file number)
----------------- Program basically looks like this:.----
#!/bin/perl
use LWP::UserAgent;
use HTTP::Request::Common;
use CGI qw(:standard);
$url="https://the.secure.site.com/index";
$response=LWP::UserAgent->new->request(POST $url,[%alldata]);
print header,$response->is_success ?
$response->content:$response->status_line;
-------------------------------------------------------
Anyone who knows why ?
// JOW
------------------------------
Date: Wed, 21 Jun 2000 14:51:44 GMT
From: uttam_padukone@my-deja.com
Subject: Re: Mailto accomplished via Perl / CGI ?
Message-Id: <8iqkq2$40k$1@nnrp2.deja.com>
Hello,
This is what I do on my website:
I store the email address in a file.
In place of the mailto:<email Address> I use
HREF="cgi-bin/junk.pl?file_name=filename.dat".
junk.pl accepts file_name as a name value pair
parameter, opens that file, locates the email
address and then sends an email to the address.
To further hide the filename.dat file, I store it
in a subdirectory deep inside the innards of the
website with unpronunciable ASCII characters as
Directory names ALT-243, ALT-242 etc..
ONly the perl program knows the name of the
subdirectory and uses it to prefix it to the
filename.dat before opening it.
Hope this helps..
Cheers!
Uttam
------------
> ..
> print "Content-type: text/html\n\n";
> print "<a href=mailto:$addy>$addy</a>";
> exit;
>
> Best of success...
>
> Joe
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 21 Jun 2000 14:51:43 GMT
From: uttam_padukone@my-deja.com
Subject: Re: Mailto accomplished via Perl / CGI ?
Message-Id: <8iqkq0$40j$1@nnrp2.deja.com>
Hello,
This is what I do on my website:
I store the email address in a file.
In place of the mailto:<email Address> I use
HREF="cgi-bin/junk.pl?file_name=filename.dat".
junk.pl accepts file_name as a name value pair
parameter, opens that file, locates the email
address and then sends an email to the address.
To further hide the filename.dat file, I store it
in a subdirectory deep inside the innards of the
website with unpronunciable ASCII characters as
Directory names ALT-243, ALT-242 etc..
ONly the perl program knows the name of the
subdirectory and uses it to prefix it to the
filename.dat before opening it.
Hope this helps..
Cheers!
Uttam
------------
> ..
> print "Content-type: text/html\n\n";
> print "<a href=mailto:$addy>$addy</a>";
> exit;
>
> Best of success...
>
> Joe
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 21 Jun 2000 16:27:25 +0200
From: "Poul Kornmod" <Poul.Kornmod@RadissonSAS.com>
Subject: Net::Cmd
Message-Id: <8iqjch$110$1@news.dknet.dk>
Dear All,
I'm trying to set up ftp delivery script using Net::FTP and Net::Cmd. But I
can't figure out how to implement the functions from Net::Cmd. I.e.
#!/usr/lib/perl
#
#
use Net::FTP;
use Net::Cmd;
$ftp = Net::FTP->new("some.host", Debug => 5);
#
# I would like to see the return code and text from the above command!
Something like this
#
$message = Net::Cmd::message;
$code = Net::Cmd::code;
print "Message from host is $message with code $code\n";
$ftp->login("anonymous", 'me@here.there');
#
# Again - I would like to see the return code and text from the above
command! Something like this
#
$message = Net::Cmd::message;
$code = Net::Cmd::code;
print "Message from host is $message with code $code\n";
This does of cause not work - but I can't figure out how to do it. Any help
is appreciated. Thanks on beforehand!
Best regards
Poul Kornmod
------------------------------
Date: Wed, 21 Jun 2000 16:46:18 +0200
From: "Poul Kornmod" <Poul.Kornmod@RadissonSAS.com>
Subject: Re: Net::Cmd
Message-Id: <8iqkfu$6g9$1@news.dknet.dk>
Dear All,
Just disregard my previous mail. I found the solution to the problem! Thanks
anyway.
Brgds
Poul Kornmod
"Poul Kornmod" <Poul.Kornmod@RadissonSAS.com> wrote in message
news:8iqjch$110$1@news.dknet.dk...
> Dear All,
>
> I'm trying to set up ftp delivery script using Net::FTP and Net::Cmd. But
I
> can't figure out how to implement the functions from Net::Cmd. I.e.
>
> #!/usr/lib/perl
> #
> #
> use Net::FTP;
> use Net::Cmd;
>
> $ftp = Net::FTP->new("some.host", Debug => 5);
> #
> # I would like to see the return code and text from the above command!
> Something like this
> #
> $message = Net::Cmd::message;
> $code = Net::Cmd::code;
> print "Message from host is $message with code $code\n";
>
> $ftp->login("anonymous", 'me@here.there');
> #
> # Again - I would like to see the return code and text from the above
> command! Something like this
> #
> $message = Net::Cmd::message;
> $code = Net::Cmd::code;
> print "Message from host is $message with code $code\n";
>
> This does of cause not work - but I can't figure out how to do it. Any
help
> is appreciated. Thanks on beforehand!
>
> Best regards
>
> Poul Kornmod
>
>
------------------------------
Date: Wed, 21 Jun 2000 06:28:27 PDT
From: Larry R. Waibel <lwaibel@cwia.com>
Subject: Re: NT or Unix at runtime
Message-Id: <VA.0000003a.0e57f51e@cwia.com>
In article <8io8j8$iq7$1@bcrkh13.ca.nortel.com>, Brandon Metcalf wrote:
> Don't use the Perl distribution that comes with clearcase. It's old and
> incomplete. Install your own.
>
But that would mean that all the client users would have to install Perl as
well and ClearCase. Using what comes with it means the triggers will work
since it's already installed.
------------------------------
Date: Wed, 21 Jun 2000 13:02:43 GMT
From: fperkins@my-deja.com
Subject: Perl -> AT unix scheduler ?
Message-Id: <8iqed8$355$1@nnrp1.deja.com>
Goal: Im trying to start a shell script via a perl script that will be
kicked off in the browser.
Scenario: In simpliest form, I have:
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
$test = `at now < /local/home/admin/migrate/18.sh`;
print "$test<br>\n";
print "Done<br>\n";
exit;
Problem: The shell script, 18.sh, is never started. In the browser, I
get "Done" returned to me with nothing printed in the $test var. I
played around with the at line to include | at now "+ 1 hour" | so at
least I can see if the job is scheduled, but when doing an "at -l", I
see no jobs scheduled.
When running the script from the shell, it works fine ie ./test.cgi
What am I doing wrong? This seems so simple, but it just won't work.
I have the 18.sh set at 755. Im guessing it's something with
permissions...
Thanks!
Frank
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 21 Jun 2000 14:56:25 GMT
From: smullen@oppunl.com (Samuel A. Mullen)
Subject: perl CONSTANTS
Message-Id: <slrn8l1m6e.uba.smullen@smullen.oppunl.com>
Does anyone know how much if any performance degradation is caused by
the use of perl constants via the "use constant <CONSTANT_NAME>"
module/pragma/whatever?
I know that there is also a way of creating constant variables through
the use of references and typeglobs. Is one way preferred over another?
Sam
--
_____________________
/ Samuel A. Mullen \
| Programmer Analyst |_______________________________________________
| Opportunities Unl. | And brought out Israel from among them: for \
\_____________________/| his mercy [endureth] for ever: |
| Psalms 136:11 |
\_______________________________________________/
------------------------------
Date: Wed, 21 Jun 2000 14:44:52 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: PerlDBI documentation
Message-Id: <Ex445.513$My4.49505@news.dircon.co.uk>
In comp.lang.perl.misc Somebody Special <someone@msn.com> wrote:
>
> Does anybody know of any mirrors to the DBI home page:
> http://www.symbolstone.org/technology/perl/DBI
>
> The main site has been inaccessible for several days and I need to get on
> there to finish a project...
If you have DBI then you have the documentation - I dont see what the
problem is ...
/J\
------------------------------
Date: Wed, 21 Jun 2000 14:23:27 GMT
From: fperkins@my-deja.com
Subject: Re: Print in bold to file
Message-Id: <8iqj4a$720$1@nnrp1.deja.com>
> I have a question: Is there any way to write to file, a text
file,
> a bold text, like in HTML the command <B>???
> I'm with a work to do that some words need to be printed in
bold.
> Somebody told me that there is a command like that \n, to a new
> line, but I don't discovered which command it is!!!
> So, if someone knows anything about it, please reply me!!!
> []'s
>
Use this snippet and go crazy with it:
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print "This isnt bold<br>\n";
print "<b>and this is</b><br>\n";
exit;
\n just means put it on a new line.
Frank
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
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 3440
**************************************