[8895] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2512 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 6 06:07:18 1998

Date: Wed, 6 May 98 03:00:34 -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           Wed, 6 May 1998     Volume: 8 Number: 2512

Today's topics:
        Aaargh databases <Lee@sibsoft.force9.co.uk>
        CGI call: open or save as file??? <thack@metronet.de>
        cgi-lib trieu8@hotmail.com
    Re: COUNTING DAYS UNTIL 2000 <RIHPowell@rl.ac.uk>
    Re: CPAN & Module gripes (was Re: Ever Wonder...?) <rjk@coos.dartmouth.edu>
    Re: CPAN & Module gripes (was Re: Ever Wonder...?) (Tom Mornini)
    Re: CPAN & Module gripes (was Re: Ever Wonder...?) <qdtcall@esb.ericsson.se>
    Re: Ever Wonder Why Not Everyone Uses Modules? (Chip Salzenberg)
    Re: Ever Wonder Why Not Everyone Uses Modules? <aas@sn.no>
    Re: help on perl5.004_04 installation <qdtcall@esb.ericsson.se>
    Re: HELP: line continuation character appears to fail <brannon@lnc.usc.edu>
    Re: HELP: line continuation character appears to fail <qdtcall@esb.ericsson.se>
    Re: How to compare to files <qdtcall@esb.ericsson.se>
    Re: How To Concatenate Discrete Elements (Martien Verbruggen)
    Re: How to delete an element in an array? (Charles DeRykus)
        HTML Strip Tags <feargalh@shipping-guides.co.uk>
        HTML::Parser to remove all tags (Jared Evans)
    Re: I/O to serial device jim@buttafuoco.mv.comNOSPAM
    Re: Perl Net App doesn't play well w/ C Net App <roach@necrosis.com>
        Please help me edit this script... (The Hitman)
    Re: Please help me edit this script... (brian d foy)
    Re: Please help me edit this script... (Martien Verbruggen)
    Re: problem reading DB_File on win32 platform <piet@cs.uu.nl>
    Re: problem reading DB_File on win32 platform <terdoest@cs.utwente.nl>
        References <eck@hl.siemens.de>
        Regular Expression <arlt@dik.maschinenbau.tu-darmstadt.de>
        removing nested parentheses <dhaber@seas.upenn.edu>
    Re: Scheduling a perl script under NT, makes stat() ret (Michael Kristensen)
    Re: Share an array <rjk@coos.dartmouth.edu>
    Re: Share an array <qdtcall@esb.ericsson.se>
        SYBASE ODBS <sixtoeb@pop3.cris.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Wed, 6 May 1998 10:22:28 +0100
From: "Lee Sibbald" <Lee@sibsoft.force9.co.uk>
Subject: Aaargh databases
Message-Id: <6ipb7h$2c6@news1.force9.net>

Hi everyone,

    I'm attempting to convince my Uni Unix administrators that I really need
a good Oracle DBI instead of the crappy one they wrote themselves.  I
originally went for MsqlPerl but that fell through the floor, so I'm
wondering if there is a good Perl DBI for Oracle (other than OraPerl) which
doesn't require a million changes to a University server and which can be
implemented painlessly and quickly.

Does anyone know of such a DBI or am I really away with the pixies?

Cheers

Lee Sibbald




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

Date: Wed, 06 May 1998 08:29:56 +0200
From: Thomas Hack <thack@metronet.de>
Subject: CGI call: open or save as file???
Message-Id: <35500364.7AEA@metronet.de>

Hi there,

making my first steps in CGI/PERL programming I
keep running into a problem that I can't
figure out (looked at various FAQs ...):

                                                     
>From a HTML-page, I submit a form:
 ...
<FORM METHOD=POST ACTION="c:/inetpub/wwwroot/cgi-bin/test.pl">
 ...
But instead of processing the form, a windows pops up:
"   Download of a file from this location
    test.pl from c:\inetpub\wwwroot\cgi-bin
     - open file from current location
     - save file to disk                         "

When I choose to open the file, a DOS window pops up
and Perl prints the HTML tags in the script to the screen.
Basically, it is the same as if typing test.pl at the DOS-
prompt.  
It appears Perl is running fine, but it doesn't get the
parameters from the HTML-page, nor does it return anything
to my browser.

WHAT AM I MISSING?                              
Please: any ideas, hints, help are much appreciated!
                              
My system: NT4.0, Peer Web Server, Perl5 port for Windows32,
all paths set, .pl associated with perl.exe, execute permissions

Thanks

Tom Hack
thack@metronet.de
for the cgi-bin set in Web Server administrator.


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

Date: Wed, 06 May 1998 00:11:10 -0600
From: trieu8@hotmail.com
Subject: cgi-lib
Message-Id: <6iorde$302$1@nnrp1.dejanews.com>

I'm learning CGI & Perl, and I have to use CGI-lib.pl for my project. I put it
in cgi-bin and it works alright in Unix, but when I call my script form HTML,
I always have an alert box "Document contains no data". I don't know why I
have that although I fill in all the text box of the form?
Is there someone can help me?

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Wed, 06 May 1998 09:38:30 +0100
From: Rosemary Powell <RIHPowell@rl.ac.uk>
Subject: Re: COUNTING DAYS UNTIL 2000
Message-Id: <35502186.5389@rl.ac.uk>

Mathijs Oosterom wrote:
> 
> Hi there,
> 
> Does anyone has a Perl-script that counts the days until the year 2000?
> 
> Or does anybody know how to do that? Is there a function that gives a value
> in days for each given date?
> 
> Thanx in advance,
> 
> Thijs.
Well, I hate to say it in this group, but the much reviled Matt's script
archives
has a general countdown script, which will work for any given date.
I have also seen a countdown written by the one and only Jeffery Friedl
of Regex(p) fame.
Look at one of these, and you will get the general idea, they both use
similar
techniques to do the actual countdown calculation.

I have also written such a script; I wanted to use all the nice
date/time modules 
but my ISP doesn't have them installed. Have a look at: 
http://www.dozyrosy.demon.co.uk/countdown/
Being bloody minded my countdown is to the true millennium (2001) not
2000 though :-))
It can be modified to do (almost) any date you want. I used a couple of
julian date routines,
which I found, to do the actual countdowns. Let me know if you want
these.

Rosemary
(Just Another Micro$oft Idiot)
(posting from work: rihpowell@rl.ac.uk)
(home is : rosie@dozyrosy.demon.co.uk)


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

Date: Wed, 06 May 1998 00:02:04 -0400
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <354FE0C3.5D93653E@coos.dartmouth.edu>

Chris Nandor wrote:
> 
> In article <6ila3p$53b$2@marina.cinenet.net>, cberry@cinenet.net (Craig
> Berry) wrote:
> 
> # CPAN consists entirely of a search/retrieval interface plus the contained
> # modules.  Of these, the modules are by far the more important part.  If
> # the module descriptions suck, then CPAN sucks.
> 
> Can you blame Blockbuster because most movies made today suck?  Or a
> library for certain books that suck?  That makes no sense to me.

Irrelevant.  Craig wasn't *blaming* CPAN for the poor quality of module
descriptions.  He simply said that if the module descriptions suck, then CPAN sucks.

Similarly, if all of the movies that you can rent from Blockbuster suck, then
Blockbuster sucks.

-- 
 _ / '  _      /         - aka -             rjk@coos.dartmouth.edu
( /)//)//)(//)/(    Ronald J. Kimball           chipmunk@m-net.arbornet.org
    /                                   http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Wed, 6 May 1998 04:34:30 GMT
From: tmornini@netcom.com (Tom Mornini)
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <tmorniniEsIq1I.85p@netcom.com>

I'm sure this thread was started as constructive criticism, but I find it
hard to imagine describing CPAN, a free and voluntarily maintained wealth
of free Perl code, as "sucking" or "stinking" in any way, shape or form.

Since it is a volunteer effort, perhaps those that think it lacks should
work to help perfect it!

When something is free, and has ANYTHING, of ANY VALUE at all, then it's
GOOD. The question is simply "How good".

-- Tom Mornini
-- InfoMania


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

Date: 06 May 1998 10:40:37 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <ishg33g5bu.fsf@godzilla.kiere.ericsson.se>

cpierce1@cp500.fsic.ford.com (Clinton Pierce) writes:

> The problem is that I'm behind _VERY_ thick firewalls here.  I'm going
> through HTTP proxies, FTP bastion-hosts and internal newsfeeds to hear
> anything about Perl.  

So do I, and I still use (and like) CPAN.pm. It handles proxies just fine.
-- 
		    Calle Dybedahl, UNIX Sysadmin
       qdtcall@esavionics.se  http://www.lysator.liu.se/~calle/


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

Date: Wed, 06 May 1998 00:32:35 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <6iob65$g1b$1@cyprus.atlantic.net>

According to Derek Balling <dballing@speedchoice.com>:
>John Porter wrote:
>> How convenient for you!  I wouldn't have an account without a shell.
>
>Then you wouldn't have an account at a large percentage of
>ISP's these days, since most are getting away from allowing
>people to have shell accounts.

I don't know about you, but I don't *need* an account at a large
percentage of ISPs.  I just need one, or maybe two.

And they offer shell accounts.

Heck, is it *that* much of a burden to pay $20 to AT&T WorldNet or
some such and also $10 to J. Random Shell Access Provider that you
reach via your local AT&T dialup?  I know it isn't for me.
-- 
Chip Salzenberg                - a.k.a. -               <chip@pobox.com>
"I brought the atom bomb.  I think it's a good time to use it."  //MST3K
           ->  Ask me about Perl training and consulting  <-
     Like Perl?  Want to help out?  The Perl Institute: www.perl.org


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

Date: 06 May 1998 11:18:40 +0200
From: Gisle Aas <aas@sn.no>
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <m3u373iwpb.fsf@furu.g.aas.no>

phdss@writeme.comm (Brett Tabke) writes:

> And yes using it has proven to be the slowest thing I've
> ever run under Perl.

The loading time for large modules is a problem.

There is probably a niche for a small and fast loading HTTP library
besides LWP.  The problem is that if you start adding features like
transparent handling of redirects, soon people will tell you that some
servers send relative URLs in the Location header and you will have to
add code to absolutize URLs and before you know you end up with
something like LWP.

Also note that &LWP::Simple::get will bypass the rest of LWP for plain
HTTP requests.  We can still not compete with the loading time of
lynx, but as you can see from the following examples you take a
serious hit even for just loading the basic Socket.pm module.

$ time perl -MLWP::UserAgent -e 'LWP::UserAgent->new->request(HTTP::Request->new(GET => "http://localhost"))'
1.75user 0.18system 0:01.97elapsed 97%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (240major+478minor)pagefaults 0swaps

$ time perl -MLWP::Simple -e 'get "http://localhost/"'
0.85user 0.07system 0:00.93elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (236major+248minor)pagefaults 0swaps

$ time lynx -source http://localhost >/dev/null
0.19user 0.35system 0:00.54elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (1696major+736minor)pagefaults 0swaps

$ time perl -MIO::Socket -e ''
0.72user 0.04system 0:00.75elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (221major+201minor)pagefaults 0swaps

$ time perl -MSocket -e ''
0.34user 0.03system 0:00.36elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (214major+111minor)pagefaults 0swaps

$ time perl -e ''
0.02user 0.01system 0:00.03elapsed 90%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (155major+16minor)pagefaults 0swaps

(I used a 90Mhz i586 running Linux for these timings.)

-- 
Gisle Aas


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

Date: 06 May 1998 11:00:42 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: help on perl5.004_04 installation
Message-Id: <isemy7g4ed.fsf@godzilla.kiere.ericsson.se>

lab318@osu.edu writes:

> Any suggestions on how to fix them?  Thanks.

Which compiler are you using?
-- 
		    Calle Dybedahl, UNIX Sysadmin
       qdtcall@esavionics.se  http://www.lysator.liu.se/~calle/


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

Date: 06 May 1998 01:36:13 -0700
From: Terrence Brannon <brannon@lnc.usc.edu>
Subject: Re: HELP: line continuation character appears to fail
Message-Id: <lbk97zx0ci.fsf@seal.usc.edu>

Tom Phoenix <rootbeer@teleport.com> writes:

 : > 	if (not ref $P{$periodicity}{$synchronicity}{$ampa_gmax}) {
 : > 	    system "cat $file";
 : 
 : Of course, you know that that line is potentially dangerous.

What's dangerous about cat'ing a file?

-- 
Terrence Brannon * brannon@lnc.usc.edu * http://lnc.usc.edu/~brannon
USC, HNB, 3614 Watt Way, Los Angeles, CA 90089-2520 * (213) 740-3397
Great Milk Debate...  http://www.milk.com vs. http://www.notmilk.com


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

Date: 06 May 1998 11:53:15 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: HELP: line continuation character appears to fail
Message-Id: <is67jjg1ys.fsf@godzilla.kiere.ericsson.se>

Terrence Brannon <brannon@lnc.usc.edu> writes:
> Tom Phoenix <rootbeer@teleport.com> writes:
>  : > 	    system "cat $file";
>  : Of course, you know that that line is potentially dangerous.
> What's dangerous about cat'ing a file?

The danger comes when $file contains "foo;/bin/rm -rf /".
-- 
		    Calle Dybedahl, UNIX Sysadmin
       qdtcall@esavionics.se  http://www.lysator.liu.se/~calle/


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

Date: 06 May 1998 11:03:36 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: How to compare to files
Message-Id: <isbttbg49j.fsf@godzilla.kiere.ericsson.se>

brandsoft@aol.com (BrandSoft) writes:

> 		if ($origline = <MASTER>) {
                             ^^^
That's not a comparison, that's an assignment. 
-- 
		    Calle Dybedahl, UNIX Sysadmin
       qdtcall@esavionics.se  http://www.lysator.liu.se/~calle/


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

Date: 6 May 1998 06:52:29 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: How To Concatenate Discrete Elements
Message-Id: <6ip1bd$ash$1@comdyn.comdyn.com.au>

In article <354DF208.3FF1@thank.you>,
	Frank Blanchard <nospam@thank.you> writes:
> this code concatenates each
> non-empty $field with a <br>
> 
> but i only want to concatenate
> the fifth and seventh $field 
> (or any combination) in the row

Just use $row[4] and $row[6].  Duh.

# perldoc perldata
# perldoc perlop

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Inside every anarchy lurks an old boy
Commercial Dynamics Pty. Ltd.       | network - Mitchell Kapor
NSW, Australia                      | 


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

Date: Wed, 6 May 1998 00:32:18 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: How to delete an element in an array?
Message-Id: <EsIEtu.J9G@news.boeing.com>

In article <6invtl$rio@hplntx.hpl.hp.com>, Larry Rosler <lr@hpl.hp.com> wrote:
>[posted and mailed]
>
>Mark-Jason Dominus <mjd@op.net> wrote in message
><6ink5q$k5u$1@monet.op.net>...
>> In article <354F3CD1.18FC648@cbmi.upmc.edu>,
>> Rich Tsui  <tsui@cbmi.upmc.edu> wrote:
>> >For example, I have an array @foo=('Jan', 'Feb', 'Dec', 'Bar', 'Mar')
>and I
>> >would
>> >like to delete item 'Bar' in array @foo without knowing the index of
>the item
>> >'Bar'.
>> >
>> >Any suggestion?
>>
>> You should be using a hash instead.
>>
>>  %foo = map {($_ => 1)}  @foo;
>>
>>  # Now forget about @foo, and never use it again.
>>  undef @foo;
>>
>>  $foo{new_item} = 1;   # Insert new item into list
>>  delete $foo{Bar};     # Delete item from list
>>
>>  foreach $item (keys %foo) {
>>    # Do something for each item in the list
>>  }
>
>I posted my response to this question (and got a nice thank-you for the
>one-liner) before I read your response.  I can't decide if you were
>being facetious (if so, why?) or instructive.  If the latter, why not
>teach him hash slices too:
>
>@foo{@foo} = (1) x @foo;    # 1 as values
>
>or
>
>@foo{@foo} = @foo;    # keys as values
>
>I'm sure that would mystify him even more than the "map" way, and it's
>*lots* faster.  (I am indebted to Uri Guttman for this insight.)
>
>By the way, what if he liked the order of the items in the array (such
>as the names of months)?  How would you get it back to him?
>

faster yet if you're in a hurry:)

    @foo{@foo} = (undef) x @foo;


HTH,
--
Charles DeRykus


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

Date: Wed, 06 May 1998 08:54:36 +0100
From: Feargal Hogan <feargalh@shipping-guides.co.uk>
Subject: HTML Strip Tags
Message-Id: <3550173C.371613A8@shipping-guides.co.uk>

Hi
I have some SGML "snippets" that I would like to convert to straight
text.
I have very little PERL experience and have been trying to use the =~
s/\<.*\>//g; form to convert the strings.
Reading the documentation I see that by default PERL is "greedy" when
pattern matching i.e.finding the longest possible match. So where there
were 2 tags in the string it was stripping everything from the start of
the first to the end of the last.
So I tried =~ s/\<[^\>]\>//g;
This doesn't work either.
I need to strip everything from < to the next > inclusive. Is there a
simple s/// pattern I can use.
Thanks in advance

--
__________________________________________________________________
Feargal Hogan
Director, I.S.,
Shipping Guides Ltd, 75 Bell Street, Reigate, United Kingdom
Tel: +44 1737 242255    Fax: +44 1737 222449    Telex: 917070 Shipg G
Personal Email: feargalh@shipping-guides.co.uk
Corporate Email: sgl@shipping-guides.co.uk
Web Site: http://www.shipping-guides.co.uk/shipping-guides/
__________________________________________________________________




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

Date: 6 May 1998 04:54:38 GMT
From: jared@frontiernet.net (Jared Evans)
Subject: HTML::Parser to remove all tags
Message-Id: <6ioqee$o88$1@node17.cwnet.frontiernet.net>

I tried this:

use LWP::Simple;
use HTML::Parse;
print parse_html(get 'http://www.sn.no/libwww-perl/')->format;

No cigar, as the HTML::Parser v2.17 (latest version?) doesn't have parse_html.

Is there anything out there that will make it simple for me to remove all
HTML tags to convert into a simple n' sweet TEXT-only output?

-Jared


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

Date: 5 May 1998 23:37:59 GMT
From: jim@buttafuoco.mv.comNOSPAM
Subject: Re: I/O to serial device
Message-Id: <6io7sn$omd$1@eb64p.buttafuoco.net>

Gary,

	Please check out my web page for an example of using the POSIX
module to talk to the serial port. 

The URL is http://www.mv.com/ipusers/buttafuoco/perl

Let me know if you have any problems.

Jim


Gary Trachier <trachier@crrel.usace.army.mil> wrote:
: Hi All,

: I am working on a UNIX system.  I need to do I/O to a serial device;
: specifically a modem that is connected as /dev/ttyb.  I am using the
: following program which uses pieces from the Perl FAQ.  I find though
: that the open() always fails.  I know that the modem is not in use.  Any
: suggestions?  Thanks very much.

: use IO::Handle;
: MAIN: {
:  my $modem = '/dev/ttyb'; # the modem device
:  my $response;    # response from the modem
:  local *MODEM;

:  open (MODEM, "<+ $modem") || die ("Can't open $modem."); # open the
: modem

:  print MODEM "ATZ\n"; # send something to it
:  MODEM->autoflush(1);

:  sleep 4;
:  print "Done sleeping.\n";

:  $response = <MODEM>; # read the response

:  print "\$response = $response";

:  close (MODEM); # close the device
: }

: -Gary T


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




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

Date: Wed, 06 May 1998 04:09:10 +0000
From: Brian Roach <roach@necrosis.com>
To: Kirk Metz <kirk.metz@waii.com>
Subject: Re: Perl Net App doesn't play well w/ C Net App
Message-Id: <354FE266.17F65323@necrosis.com>

Kirk Metz wrote:

>         Is there something special I should know about perl and its behavior
> with sockets?

Nope. I have perl progs that talk to C progs and vice versa without
any probs.

Without seeing any of your code, I can't offer much in the way
of suggestions. You may want to post the perl code that's not
working. A wild guess says you are using buffered I/O in perl
and it's not doing what you think it is.

- Brian


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

Date: Wed, 06 May 1998 04:01:27 GMT
From: hitman@3lefties.com (The Hitman)
Subject: Please help me edit this script...
Message-Id: <354fdfb9.107979811@news.3lefties.com>

Can someone please tell me how to edit the following script so that
when a person fills out a form on my webpage, his/her e-mail address
is automatically sent in the "from" line of my e-mail program.

$backurl = "http://www.hitmansports.com/index.htm";
$backname = "Horrible Hitman Fantasy Football";
$mailprog = '/bin/sendmail';
$youmail = 'commissioner@hitmansports.com';

read(STDIN, $namevalues, $ENV{'CONTENT_LENGTH'});

open (MAIL, "|$mailprog $youmail") || die "Can't open $mailprog!\n";
print MAIL ("To: $youmail\n");
print MAIL ("From: Internet User\n");
print MAIL ("Subject: Entry Form\n\n");

# Process info from Fill in Form

@namevalues = split(/&/, $namevalues);
foreach $namevalue (@namevalues) {
	($name, $value) = split(/=/, $namevalue);
	$name =~ tr/+/ /;
	$value =~ tr/+/ /;
	$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
	$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
	$INPUT{$name} = $value;
	unless ($value eq "") {
		print MAIL ("$name: $value\n");
	}
}

close (MAIL);

Any help is greatly appreciated,  Chris


The Hitman
--------------------------------------->

Co-Owner of Hitman Sports - FREE Sports Picks!!!
http://www.hitmansports.com  (Hire the Hitman...and make a killing!!!)

Commissioner of Horrible Hitman Fantasy Football Leagues
http://www.hitmansports.com/index2.html


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

Date: Wed, 06 May 1998 01:01:50 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Please help me edit this script...
Message-Id: <comdog-ya02408000R0605980101500001@news.panix.com>
Keywords: from just another new york perl hacker

In article <354fdfb9.107979811@news.3lefties.com>, hitman@3lefties.com (The Hitman) posted:

>Can someone please tell me how to edit the following script so that
>when a person fills out a form on my webpage, his/her e-mail address
>is automatically sent in the "from" line of my e-mail program.
>
>$backurl = "http://www.hitmansports.com/index.htm";
>$backname = "Horrible Hitman Fantasy Football";
>$mailprog = '/bin/sendmail';

# that's a strange place for sendmail...

>$youmail = 'commissioner@hitmansports.com';
>
>read(STDIN, $namevalues, $ENV{'CONTENT_LENGTH'});

#delete the above line

>open (MAIL, "|$mailprog $youmail") || die "Can't open $mailprog!\n";
>print MAIL ("To: $youmail\n");
>print MAIL ("From: Internet User\n");

use CGI;
my $input = new CGI;
my $email = $input->{'email'};
#if sendmail let's you do this...
print MAIL  ("From: $email\n");

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>
Holy MTA Batman! to the Bat Book!


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

Date: 6 May 1998 06:56:09 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Please help me edit this script...
Message-Id: <6ip1i9$ash$2@comdyn.comdyn.com.au>

In article <354fdfb9.107979811@news.3lefties.com>,
	hitman@3lefties.com (The Hitman) writes:
> Can someone please tell me how to edit the following script so that
> when a person fills out a form on my webpage, his/her e-mail address
> is automatically sent in the "from" line of my e-mail program.

Automatically? You will have to do some work. Use CGI.pm to get 
to whatever was submitted in that form.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | We are born naked, wet and hungry. Then
Commercial Dynamics Pty. Ltd.       | things get worse.
NSW, Australia                      | 


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

Date: 06 May 1998 10:59:01 +0200
From: Piet van Oostrum <piet@cs.uu.nl>
Subject: Re: problem reading DB_File on win32 platform
Message-Id: <wzsomnsrl6.fsf@kemmel.cs.ruu.nl>

>>>>> jtaylor@ala.net (Jason Taylor) (JT) writes:

JT> I'm not a 100% sure on this, but Unix starts newlines with the newline
JT> (/n) character and NT uses the linefeed-carriage return pair. This may
JT> be the source of your problem.

But DB files are binary files, so they should be in principle
transportable, without CR/LF problems.

On the other hand internally they may use integers in native format, and if
the Unix platform is a big-endian architecture you are in trouble. I
haven't looked at the code, but I suspect Berkeley DB uses native formats
in the file.
-- 
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: Piet.van.Oostrum@pi.net


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

Date: Wed, 06 May 1998 11:57:43 +0200
From: Hugo ter Doest <terdoest@cs.utwente.nl>
Subject: Re: problem reading DB_File on win32 platform
Message-Id: <35503417.394E9C5B@cs.utwente.nl>

Piet van Oostrum wrote:

> >>>>> jtaylor@ala.net (Jason Taylor) (JT) writes:
>
> JT> I'm not a 100% sure on this, but Unix starts newlines with the newline
> JT> (/n) character and NT uses the linefeed-carriage return pair. This may
> JT> be the source of your problem.
>
> But DB files are binary files, so they should be in principle
> transportable, without CR/LF problems.
>
> On the other hand internally they may use integers in native format, and if
> the Unix platform is a big-endian architecture you are in trouble. I
> haven't looked at the code, but I suspect Berkeley DB uses native formats
> in the file.
> --
> Piet van Oostrum <piet@cs.uu.nl>
> URL: http://www.cs.uu.nl/~piet [PGP]
> Private email: Piet.van.Oostrum@pi.net

maybe it's a big/small-endian problem?

Hugo



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

Date: Wed, 06 May 1998 10:39:30 +0200
From: Mike van Eck <eck@hl.siemens.de>
Subject: References
Message-Id: <355021C1.449C0B0A@hl.siemens.de>

I have a problem with references:

In my source I have created references such as:

$selected_database = \%package_database;
$selected_database = \@ { $package_database{$packagename}{other} };

(%package_database is quite a complex structure)

How can I approach this reference, for example, how do I retrieve the
number of keys ? I've tried everything, but it seems that I'm
overlooking
something.

Any help is welcome,

Best regards,
Mike van Eck.

--
 .---------------------------------------------------------.
| Mike van Eck               -( Siemens Semiconductors )- |
| HL CAD SYS                Business : +49 (0)89 63622788 |
|                                Fax : +49 (0)89 63627681 |
| eck@christl.hl.siemens.de     Home :                    |
`---------------------------------------------------------'




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

Date: Wed, 6 May 1998 09:13:17 +0200
From: Martin Arlt <arlt@dik.maschinenbau.tu-darmstadt.de>
Subject: Regular Expression
Message-Id: <Pine.GSO.3.96.980506083321.3710F-100000@ceres.dik.maschinenbau.tu-darmstadt.de>

Hi,

I have a question about regular expression: It is possible to build a
regular expresion in perl which can do the following:

Suppose you have a text line:

 ... \begin{note}hhh\end{note}\item abc\begin{example}def\end{example}\begin{note}ghi\end{note}.\begin{note}sad\end{note}. ...  (<- the point is important)

The above line does not have a <cr>.
Now, I want to move the point in the middle of this line behind to \item abc
so, that I have:

 ... \begin{note}hhh\end{note}\item abc.\begin{example}def\end{example}\begin{note}ghi\end{note}\begin{note}sad\end{note} ...

Does anybody have an idee for this problem? I have to convert such line in
an over 2000pages TeX document.

Thanx for any help.

Martin



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

Date: Wed, 6 May 1998 02:48:21 -0400
From: "Doug E Fresh" <dhaber@seas.upenn.edu>
Subject: removing nested parentheses
Message-Id: <6ip0i2$afn$1@netnews.upenn.edu>

Is it possible to create a search string that will find the most nested
parentheses in a string or do I have to use index, substr etc. etc.

i.e.

$string = "2*(3+(4+5))"
$string =~ s/somthing/&process($1)/e
# where $1 = "4+5"

thanks a bunch,

Doug



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

Date: Wed, 06 May 1998 09:51:52 GMT
From: mk@eradic8.dk (Michael Kristensen)
Subject: Re: Scheduling a perl script under NT, makes stat() return 1 no matter what!?
Message-Id: <35503274.11273320@news.uni-c.dk>

Okay, the problem has been solved. It was the path to the files, that
didn't work. I fixed it with using chdir instead.

Thanks for all your help.

Regards,
  Michael

-----------------------------------------------------------------------------
Michael Kristensen
  E-mail: mk@eradic8.dk
    ICQ UIN: 478933
      Homepage: http://www.cyberjunkie.com/mk
-----------------------------------------------------------------------------


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

Date: Wed, 06 May 1998 00:50:27 -0400
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
Subject: Re: Share an array
Message-Id: <354FEC1C.197C5A65@coos.dartmouth.edu>

Razmik Khachikyan wrote:
> 
> Does anyone know how to share an array?

Make applesauce.

-- 
 _ / '  _      /         - aka -             rjk@coos.dartmouth.edu
( /)//)//)(//)/(    Ronald J. Kimball           chipmunk@m-net.arbornet.org
    /                                   http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: 06 May 1998 11:16:16 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Share an array
Message-Id: <is90ofg3of.fsf@godzilla.kiere.ericsson.se>

Razmik Khachikyan <rxk@cobra.jpl.nasa.gov> writes:

> Does anyone know how to share an array?

Print it out and give it to those you want to share it with?
-- 
		    Calle Dybedahl, UNIX Sysadmin
       qdtcall@esavionics.se  http://www.lysator.liu.se/~calle/


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

Date: 06 May 1998 02:04:43 EDT
From: "Becerra" <sixtoeb@pop3.cris.com>
Subject: SYBASE ODBS
Message-Id: <6iouhr$lve@examiner.concentric.net>

I am looking for a way to access sybase database using Perl for Win32.
Anybody heard or knows about a DBI?
Any help will be greatly appreciated.
Sixto




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

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

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