[8932] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2550 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun May 10 15:07:28 1998

Date: Sun, 10 May 98 12:00:35 -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           Sun, 10 May 1998     Volume: 8 Number: 2550

Today's topics:
    Re: "Dynamic" forms--Perl question <rootbeer@teleport.com>
        Associative array woes <jgirard@starnetusa.com>
    Re: Associative array woes (Mark-Jason Dominus)
    Re: Associative array woes <jdf@pobox.com>
    Re: Can I select(STDOUT)? and read the text into a @var <rootbeer@teleport.com>
    Re: CPAN & Module gripes (was Re: Ever Wonder...?) (Gabor)
        DBM and Split Problem (Henry Lifton)
    Re: DBM and Split Problem (Mark-Jason Dominus)
    Re: DBM and Split Problem (Mike Heins)
    Re: Does Perl have a IDE?I don't like command line. <zenin@archive.rhps.org>
    Re: Does Perl have a IDE?I don't like command line. (Greg Bacon)
    Re: Email Authentication <zenin@archive.rhps.org>
    Re: How to export constants in modules without C code <jdf@pobox.com>
    Re: how to ignore new line characters in textarea - in  <bholzman@mail.earthlink.net>
    Re: I'm looking for a voting script <rootbeer@teleport.com>
    Re: is it possible to grab email address from visitor o <lr@hpl.hp.com>
        Local GUI Perl Apps via DHTML <mike@coylesystems.com>
    Re: MODULE MANIA STRIKES (Was Re: What does this do?) (Greg Bacon)
    Re: QRe: == vs. eq (Greg Bacon)
        Questions about direct device access, magic, and other  <acroft@cyber-wizard.com>
    Re: reading a text file w/Perl <lr@hpl.hp.com>
        Sender.pm module - Where can one obtain this file? (Tecelote)
    Re: Stumped on opening file to print. <info@purco.qc.ca>
    Re: tip for Solaris in PERL jim@buttafuoco.mv.comNOSPAM
    Re: Web Hosting (Alex K)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Sun, 10 May 1998 16:13:50 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: "Fred R. Cronkhite" <fred.r.cronkhite@erols.com>
Subject: Re: "Dynamic" forms--Perl question
Message-Id: <Pine.GSO.3.96.980510091255.3651F-100000@user2.teleport.com>

On Sat, 9 May 1998, Fred R. Cronkhite wrote:

> I cannot find any reference on how I can populate an the on the fly form
> with data obtained from, say, a registration data file. 

The docs for CGI.pm or a similar module should help you. Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sun, 10 May 1998 12:10:04 -0500
From: Jason <jgirard@starnetusa.com>
Subject: Associative array woes
Message-Id: <3555DF6C.63EF8D2D@starnetusa.com>

I'm creating an associative array and trying to print out the name/value
pairs in
the exact same order I put them into the hash.  Not sorted, not in a
random fashion.
How can I accomplish this?  Many of the values are the same.   
I'm not sure what modules my admin has installed, so if possible, please
show a way without using modules.


%data_hash = 
(                      
    "valuezero" => $r_array->[0],
    "valueone"  => $r_array->[1]    ## and so on...
);

## later in the program...

for ($i=0;$i<=$last_elem;$i++)
{    # can print out values in same order easily, but what about their
corresponding keys?
     print "value: $r_array->[$i] key: ????????????  <BR>";   
}              


Thanks in advance,
Jason

jgirard@starnetusa.com


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

Date: 10 May 1998 13:14:04 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Associative array woes
Message-Id: <6j4n8s$j87$1@monet.op.net>
Keywords: airtight amphioxis covariate irresponsible


In article <3555DF6C.63EF8D2D@starnetusa.com>,
Jason  <jgirard@starnetusa.com> wrote:
>I'm creating an associative array and trying to print out the name/value
>pairs in
>the exact same order I put them into the hash.  

This is a FAQ.

perlfaq4:	How can I make my hash remember the order I put
		elements into it?

>I'm not sure what modules my admin has installed, so if possible, please
>show a way without using modules.

This is *also* a FAQ.

perlfaq8:	How do I install a CAPN module?
		How do I keep my own module/library directory?



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

Date: 10 May 1998 14:12:17 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Associative array woes
Message-Id: <4syyj5ym.fsf@mailhost.panix.com>

mjd@op.net (Mark-Jason Dominus) writes:

> perlfaq8:	How do I install a CAPN module?

use CAPN::Crunch qw( :Crunchberries );

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf/


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

Date: Sun, 10 May 1998 16:18:13 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: DannyM <maldonadod@ct-arng.ngb.army.mil>
Subject: Re: Can I select(STDOUT)? and read the text into a @variable?
Message-Id: <Pine.GSO.3.96.980510091624.3651G-100000@user2.teleport.com>

On Sat, 9 May 1998, DannyM wrote:

> I know select is only used for the write and print functions but I need
> to trap STDOUT in one of my scripts. 

Can't you just append to a variable instead of printing? But it sounds as
if you want to use a tied filehandle which will save output to a variable.
There should be a module on CPAN which can help you to do this. Hope this
helps! 

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 10 May 1998 16:30:20 GMT
From: gabor@vmunix.com (Gabor)
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <slrn6lblr2.48s.gabor@vnode.vmunix.com>

In comp.lang.perl.misc, Clinton Pierce <cpierce1@cp500.fsic.ford.com> wrote :
[snip]
# If you can't/won't use the CPAN.pm interface to CPAN, then CPAN is lame.
# It's got some nice resources, but without CPAN.pm, it's exceedingly 
# frustrating.

Why?  I grab modules by hand.  It won't kill you to get your hands
dirty once in a while. ;)


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

Date: Sun, 10 May 1998 15:34:50 GMT
From: henlif@elsfl.com (Henry Lifton)
Subject: DBM and Split Problem
Message-Id: <6j4hml$bvc$1@supernews.com>

Being a relative newbie, working with inherited code from someone who is gone, 
and not being able to find these answers in the faq's or anywhere else I 
tried, I ask you for help.

I have a database in Access that I convert to a tab delimited file, upload to 
my site and run a convert program that consists of this line of code:

/elsflc/cgi-local/convsuites.pl < /elsflc/xcom/data/suites.txt 2>&1

I know that this brings the file into the convsuites program (below) but I do 
not know what the "2>&1" mean.

Next question.  In the program below, the data is converted to .pag and .dir 
files, but it is split on a key.  Since this table is the "many" table of a 
"one to many" database, I do not want them spllit on a key (which eliminates 
duplicates). I thought I could use the $notes field because they would all be 
different, but that is not the case.

How can I split this file and not have a key.

The ~ is the end of record indicator.

#! /usr/local/bin/perl

dbmopen(suites,'/u/web/elsflc/prucom/db/db-suites',0666);

while(<>){
        chop; $record .= $_;
        if(/~/){
                ($id,$unit,$flr,$rent,$notes)=split("\t",$record);
                $record =~ s/\t/\|/g; print "id=$id\n";
                $suites{$notes}=$record; $record="";
        }
}


Thanks for your help

Henry Lifton
henlif@elsfl.com




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

Date: 10 May 1998 13:20:51 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: DBM and Split Problem
Message-Id: <6j4nlj$jbd$1@monet.op.net>
Keywords: Rowland tin Tulsa woo


In article <6j4hml$bvc$1@supernews.com>, Henry Lifton <henlif@elsfl.com> wrote:
>/elsflc/cgi-local/convsuites.pl < /elsflc/xcom/data/suites.txt 2>&1
>
>I know that this brings the file into the convsuites program (below) but I do 
>not know what the "2>&1" mean.


It attaches the standard error output to whatever the standard output
was attached to.  For the command you showed, it does nothing.  

The difference between

	command >output
and	command 2>&1 >output

is that in the first case, error messages go to the terminal even
though the normal output goes into the `output' file, and in the
second case the error messages get mixed in with the normal output in
the `output' file.



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

Date: 10 May 1998 13:59:02 -0500
From: mikeh@minivend.com (Mike Heins)
Subject: Re: DBM and Split Problem
Message-Id: <3555eae6.0@news.one.net>

Mark-Jason Dominus <mjd@op.net> wrote:

> The difference between

> 	command >output
> and	command 2>&1 >output

> is that in the first case, error messages go to the terminal even
> though the normal output goes into the `output' file, and in the
> second case the error messages get mixed in with the normal output in
> the `output' file.

I would quibble with this a bit -- actually what you have there in the
second case is a noop. You need to reverse them to get the desired effect.

I have been shell programming for 15+ years and STILL have to look
that one up on occasion -- that idiom doesn't seem to stick in my mind.

-- 
Mike Heins                          http://www.minivend.com/  ___ 
                                    Internet Robotics        |_ _|____
There ain't nothin' in this world   131 Willow Lane, Floor 2  | ||  _ \
that's worth being a snot over.     Oxford, OH  45056         | || |_) |
--Larry Wall                        <mikeh@minivend.com>     |___|  _ <
                                    513.523.7621 FAX 7501        |_| \_\


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

Date: 10 May 1998 17:35:59 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <894822208.415652@thrush.omix.com>

Rich Morin <rdm@cfcl.com> wrote:
: In contrast, most Mac OS commands are interactive; very few just take a
: set of directions and run.

	You say this like it's a Good Thing[tm].

	While such interface styles are arguably much easier to use then
	Unix style et al, they are also inherently much less efficient for
	most uses.

	That Holy War[tm] started, I'd like to say that for me, the best
	Perl "IDE" is three or four xterms and a good code (not text)
	editor (currently "joe").  I'd use xemacs, but my P5/200 with only
	64 megs of ram can't handle many copies of it running at once. :-)

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: 10 May 1998 18:42:55 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6j4sff$jn0$9@info.uah.edu>

In article <rdm-1005980644350001@140.174.42.30>,
	rdm@cfcl.com (Rich Morin) writes:
: Actually, the Unix shell is more of an RJE (Remote Job Entry) system with
: mudflaps.  The typical Unix command (e.g., grep) is run in "batch" (non-
: interactive) mode.  Only a few commands (e.g., vi) expect user interaction.

Umm.. so?

: Anyway, I do know of one Perl system that has some IDE features: MacPerl.
: The base application includes a simple editor/debugger/... which, though
: limited to smallish (32 KB) files, is quite convenient.  Larger scripts
: can be handled using a text editor such as BBEdit, which offers syntax-
: directed text coloring and other Perl-sensitive features.

Using an editor that claims to do syntax highlighting is like riding a
bicycle with training wheels so rickety they're bound to break at any
moment.  Parsing Perl is no small problem, and any editor that claims to
do more than a half-ass job is lying.

You want to know what I use to highlight my Perl syntax?

    XTerm*background: darkslateblue
    XTerm*foreground: lightblue

Greg
-- 
open(G,"|gzip -dc");$_=<<EOF;s/[0-9a-f]+/print G pack("h*",$&)/eg
f1b88000b620f22320303fa2d2e21584ccbcf29c84d2258084
d2ac158c84c4ece4d22d1000118a8d5491000000
EOF


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

Date: 10 May 1998 18:04:38 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: Email Authentication
Message-Id: <894823927.942045@thrush.omix.com>

Alex K <techsoft@abcpages.com> wrote:
: try to use finger command , if it says user name , etc, than you can
: go ahead and send e-mail to him , otherwise, just skip his/her
: e-mail.. 

	That won't work in probably 9 out of 10 valid addresses in use
	today.

	Once again, the *only* way to validate an email address is to send
	a message to it and hope they respond.

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: 10 May 1998 11:42:42 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: "Ephrayim \"EJ\" Naiman" <enaiman@ndsisrael.com>
Subject: Re: How to export constants in modules without C code
Message-Id: <ogx62i2l.fsf@mailhost.panix.com>

"Ephrayim \"EJ\" Naiman" <enaiman@ndsisrael.com> writes:

> I didn't realize "use constant" defined the constants as
> subroutines.

The documentation for the "constant" module states this explicitly.

> I was hoping to avoid the overhead of subroutines.

There is no "overhead" associated with a constant scalar function,
since they are inlined, as documented in perlsub.

>  I tried to create a file called "errlist.pm" and have it filled
> with a bunch of "use constant ...".  Then in all application-level
> files just do a "use errlist" or require("errlist.pm") or
> do("errlist.pm").  None of those seem to work.

What do you mean by that?  In what way do they not work? 

> Can somebody post a small succinct example of how to use EXPORT_TAGS?  I
> have not been successful at using it.  Can EXPORT_TAGS be used as
> constants?  I've read the Exporter man page and see definitions but not
> code use of the values.

If you have, for example

   @EXPORT_OK = qw( $foo @bar &baz );

and you want to provide a convenient way for the user to specify a
subset of those names, you may, e.g.,

   %EXPORT_TAGS = ( Quux => [qw($foo @bar)] );

and now the user of your module may

   use YourModule qw( :Quux );

at which point they'll have access to $foo and @bar.  This is
documented in perlmod and Exporter.pm.  Since functions are among the
kind of names that may be exported, you may export constants.

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf/


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

Date: Sun, 10 May 1998 13:22:57 -0400
From: Benjamin Holzman <bholzman@mail.earthlink.net>
To: Denko <d.sarajlic2@wlv.ac.uk>
Subject: Re: how to ignore new line characters in textarea - in forms
Message-Id: <3555E271.520E4C7A@mail.earthlink.net>

my $text = $q->param('text');
$text =~ s/\n//g;

Denko wrote:
> 
> I have problems in my script for guestbook. When I am processing the
> guestbook form. If guest press ENTER inside textarea it messes up my script.
> So how do you ignore enter character inside the textarea.
> 
> Denijal S.


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

Date: Sun, 10 May 1998 16:24:04 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Dan Serban <judas@interprice.com>
Subject: Re: I'm looking for a voting script
Message-Id: <Pine.GSO.3.96.980510092036.3651H-100000@user2.teleport.com>

On Sun, 10 May 1998, Dan Serban wrote:

> I'm looking for a voting script example preferrably where both text and
> multiple choice answers could be entered.  Needed for a web site.

I've heard that somebody was working on one. You simply configure it with
the votes you want, and it uses LWP to post five or six new votes each
second. With a little work, you can make it randomize such things as the
name of the "browser". Of course, if the opposition has the same script
running on more, faster machines, your candidate may still lose.

Is that what you wanted? Because it's likely to be what you'll get.  :-)

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sun, 10 May 1998 07:45:04 -0700
From: "Larry Rosler" <lr@hpl.hp.com>
Subject: Re: is it possible to grab email address from visitor of your web page
Message-Id: <6j4eig$ipv@hplntx.hpl.hp.com>

Denko wrote in message <6j4414$8rb@ccuh.wlv.ac.uk>...
>Is it possible to get email address from someone who visits your home
page -
>like as you can grab their IP address and things like that as
environment
>variables(if he/she has specified it in browser they use)
>
>Denijal S.


Not unless you ask (via a form) and they tell you.
__
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com




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

Date: Sun, 10 May 1998 14:31:43 -0400
From: "Mike Coyle" <mike@coylesystems.com>
Subject: Local GUI Perl Apps via DHTML
Message-Id: <6j4rpa$k6n@world6.bellatlantic.net>

While many individuals have cited that Perl's end user GUI is the web
browser, typically this has involved users interacting with a Perl program
running on a remote web server.

Has anyone investigated the possibilty of having some sort of applet/plugin
that would enable local Perl programs to be called from within the web
browser.  This way, Dynamic HTML could be used to provide a rich front-end,
and remote/local processing can be optimized for the job at hand.

Thanks,
            Mike




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

Date: 10 May 1998 18:36:51 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: MODULE MANIA STRIKES (Was Re: What does this do?)
Message-Id: <6j4s43$jn0$8@info.uah.edu>

In article <6j01hm$k98@fridge.shore.net>,
	Art Cohen <upsetter@shore.net> writes:
: This is a perfect example of module-mania run amok. There are plenty of
: perfectly good reasons why someone might not want to use CGI.pm, yet the
: immediate knee-jerk reaction is "Use CGI.pm". If you don't want to tell
: him the answer, don't, but don't imply that using CGI.pm will make his
: life easier.

Art, I can only assume that you haven't seen this wheel misinvented as
many times as most of us.  If the root poster had been a Perl hacker of
clue, he wouldn't be asking a question that is clearly answered in the
docs.  I stand by my response.

: Maybe he's a beginning perl programmer, and maybe he doesn't know anything
: about modules, references or objects (believe it or not, it's possible to
: write working perl code for many different tasks without knowledge of any
: of these things). If he needs to write a cgi script, it makes infinitely
: more sense to learn cgi (the interface) on its own, based on a simple
: knowledge of perl, and then later -- iff he has complicated CGI
: programming needs -- learn enough about modules, references and objects to
: use CGI.pm. 

This approach is fundamentally flawed and ignorant.  I'll bet you didn't
know that the CGI module doesn't force OO or references on the programmer.
It's much simpler for a beginner to learn that CGI programs' output go
to the browser and to learn to write programs that generate the
appropriate HTML for the conditions they wish to handle.  Until they
develop their skill further, they should let well used and well tested
code to grab parameters and other tasks which are full of pitfalls for
the neophyte.  According to Larry, it's Officially Okay to use a subset
of the language.  Using the CGI module does not force any particular
language feature on the programmer.

: Or maybe -- imagine this -- he's been using CGI.pm for a long time, but
: now he needs to write a script for a host that's running Perl 4. Not an
: ideal situation to be in by any means, but hardly beyond the realm of
: possibility. 

In that case, CGI.pm is a double blessing because the flea-bitten camel
carcasses don't stand a chance with it.  There have been CERT advisories
against every version of perl up to (but not including) 5.004.  Having
old perls around is just plain dangerous.

Greg
-- 
open(G,"|gzip -dc");$_=<<EOF;s/[0-9a-f]+/print G pack("h*",$&)/eg
f1b88000b620f22320303fa2d2e21584ccbcf29c84d2258084
d2ac158c84c4ece4d22d1000118a8d5491000000
EOF


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

Date: 10 May 1998 18:20:44 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: QRe: == vs. eq
Message-Id: <6j4r5s$jn0$7@info.uah.edu>

In article <6j25e3$sp2$0@206.165.146.153>,
	"Allan M. Due" <due@murray.fordham.edu> writes:
: What kind of problems is Outlook causing?  I
don't mind using it too much if
: it just brands me a looser, but if I am causing
folks problems I will stop
: using it immediately.  Any information is
appreciated.

I intentionally broke the quoted lines at fifty columns.  Isn't that
nearly impossible to read?

I can only assume that Lookout! doesn't warn posters when their lines
are beyond the 78 columns that netiquette requests.  (Keep in mind that
you should try to keep the lines you write around 72 columns to allow
for future quoting.)  This is all outlined in the news.announce.newusers
periodic posts.

I beg of everyone within the reach of these words: even if your
newsreader will let you include the newest and neatest Mega-MIME
attachments, don't do it.  MIME sucks on Usenet.  Many people will skip
over MIMEd articles, which might be to your detriment.  If you really
must include a file, put a separator at the bottom of your message and
include it.  If you need to include a few files from a directory, shar
it up.

Greg
-- 
open(G,"|gzip -dc");$_=<<EOF;s/[0-9a-f]+/print G pack("h*",$&)/eg
f1b88000b620f22320303fa2d2e21584ccbcf29c84d2258084
d2ac158c84c4ece4d22d1000118a8d5491000000
EOF


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

Date: Sun, 10 May 1998 13:26:14 -0500
From: "Albert T. Croft" <acroft@cyber-wizard.com>
Subject: Questions about direct device access, magic, and other dark secrets...
Message-Id: <3555F146.521D9C59@cyber-wizard.com>

First of all, I don't get to read newsgroups often, so if you respond to
this, please email me, or both post and email to me. I would appreciate
it.

Questions:
    1) Is there a way with Perl for Win32 to directly read from a drive?
I know that in *n?x it could be done with something along the lines of
open(DATA, "/dev/hdb1), but is there a way to do something like this in
Perl for Win32?
    2) How can I get Perl to read and use /etc/magic (or its equivalent
under Win32, if there is such a thing)?

Reason for questions:
    Recently, following a hard drive crash, while trying to reinstall
Win95 (a necessary evil in this case), the Win95 reinstall accidentally
reformatted (as VFat, OSR-1) my removable cartridge drive, which
contained a large number of important backups (it wrote command.com,
io.sys, msdos.sys, and drivespace.bin). I do not know of, nor can I
find, a utility to unformat the drive or recover the information (which
consistes of tarred/gzipped, WinZipped, zipped, text, and Win95
executable files). I know that the majority of the information still
exists on the drive, and was wondering if and how I might could use Perl
in the recovery.

Any suggestions, code snippets, or any other forms of help will be
greatly appreciated. Thank you for your attention.

--
-Albert Croft
------------------------------------------------------------------------------------------

Current contact information:
    Email: acroft@cyber-wizard.com  (permanent)
    WWW: www.tyler.net/acroft  (subject to move at a later date)
    ICQ UIN: 710904    (ICQ available from www.mirabilis.com)




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

Date: Sun, 10 May 1998 07:42:14 -0700
From: "Larry Rosler" <lr@hpl.hp.com>
Subject: Re: reading a text file w/Perl
Message-Id: <6j4edm$ipu@hplntx.hpl.hp.com>

Scott Vetter wrote in message <35559E65.2E0A@ameritech.net>...
>Is there an easy way to read a text file with Perl?  I've looked in


Yes.  We do it all the time :-).

>the book to see if there was an easy way, but so far I haven't found


Read a better book ('Learning Perl' from O'Reilly and Associates).

>it.  The read specifies that you have to give it a line length, but
what
>if there are viariable lenght records?

Use the "diamond" operator (<> or <FILE>), which reads a line at a time,
however long it is.

Enjoy learning Perl from 'Learning Perl', and visit
<URL:http://www.perl.com>.

--
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com





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

Date: Sun, 10 May 1998 16:05:34 GMT
From: tecelote@kpac.com (Tecelote)
Subject: Sender.pm module - Where can one obtain this file?
Message-Id: <3555ce03.350141217@news.aa.net>

It seems I finally found a group that will probably understand my
situation and be able to help.

I've been asked to help a client with Perl/CGI scripting. So far we're
doing very well, but now we're at another stall point.

Situation:

My client wants to use his PWS on Win95 as a testbed for his scripts.
The scripts run correctly we just can't figure out the email problem.

The script is intended to handle the processes of an online job
application form. The script needs to send an email with the form
information to his email, write(append) the information to a data file
and give a response page thanking the individual for their application
information.  The response page and writing to the data file work just
fine, but we can't figure a way to get the script to send the desired
email message.  It's been suggested we use the sender.pm module, but
are unable to locate the file. The given URL is either down or not
responding. 

Suggestions to solving this problem would be greatly appreciated.


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

Date: Sun, 10 May 1998 14:06:37 GMT
From: Leon Stepanian <info@purco.qc.ca>
Subject: Re: Stumped on opening file to print.
Message-Id: <3555B549.5DEBD903@purco.qc.ca>



Leon Stepanian wrote:

> [snipped]

O.K. I managed with some direct e-mail advise and from the newgroups help to
get this to work as follows. My main mistake was that Content-type:
text/html\n\n was at top line in my html code and not in my perl script.
Here is what I have changed to make it work.

In Perl code.

sub return_access_page
{
print "Content-type: text/html\n\n";
open(MAINFILE, "$maindir/access6.txt");
while (<MAINFILE>) {
        print $_;
    }
 close<MAINFILE>;
}

One of my html pages has this general form; Of course there is alot more in
between.

<HTML>
<HEAD>
<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">

   <TITLE>WELCOME TO LEVEL 1 ACCESS</TITLE>
</HEAD>
<BODY>
<CENTER><B><FONT COLOR="#000099">$USER{accesscode} Enter Your Information.
</FONT></B></CENTER>
Other fine dodads here.....
</BODY>
</HTML>

The problem that remains is that my html code also has some Perl variables
such as the $USER{accesscode}. While the html page is now visible on the
screen, but the variables are printed as written and not substituted by
their actual values.

>From what I am observing, once I access a remote html page, there is no
possibility for Perl to recognise the difference between simple text (or
html code) and actual Perl variables. if this is the case, then I am back
where I started since I have variables all over the html pages so i would
have to refer to these as they appear on the html code, but inside my perl
script. This jumping back and forth would complicate matters more than it
would help save code in my perl scripts.

I there something to do for this situation.

Thank again.

Leon Stepanian
Perl............from an ocean of human kinds.



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

Date: 10 May 1998 13:59:09 GMT
From: jim@buttafuoco.mv.comNOSPAM
Subject: Re: tip for Solaris in PERL
Message-Id: <6j4brd$6in$1@eb64p.buttafuoco.net>

Steven,

	Check out my web page at http://www.mv.com/ipusers/buttafuoco/perl.  I have written a 'tip' like program call perlterm.  Let me know if you need any help with it.

Jim



Steven Smith <steves@wco.com> wrote:
: Does anyone know of a version of tip written in perl??

: Thanks
: Steve Smith
: DSC Communications
: Petaluma, CA 95404


-- 
****************************************************************************
Jim Buttafuoco                 Senior Unix Consultant
Perl Hacker                    email: jim@buttafuoco.mv.com
Linux Fan                      web:   http://www.mv.com/ipusers/buttafuoco
****************************************************************************




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

Date: Sun, 10 May 1998 16:56:08 GMT
From: techsoft@abcpages.com (Alex K)
Subject: Re: Web Hosting
Message-Id: <3555dc11.3031254@news.ica.net>

try www.philex.net , 250Mb/19.95$/month...
On Sun, 10 May 1998 07:15:22 -0400, Yevgeniy Leshchinskiy
<yevlesh@hempseed.com> wrote:

>5mb of space for 600 dollars a year is a great deal? You have to be
>joking! I doubt that you will get any clients with this pricetag.
>
>DCD wrote:
>
>> Our Standard Package for virtual servers includes free domain
>> name registration and free DNS mapping, and features...
>>
>>     * 5Mb server space
>>     * Full HTTP and FTP
>>     * Unlimited mail aliasing
>>     * Full support for CGIs (Perl5 and C++)
>>     * Full Telnet access
>>     * USD $595 or IRP #400 Per Year
>>
>> There's no catch. It's a great deal with great backup.
>>
>> More info: http://www.dcd.net/web/
>
>
>



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

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

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