[12185] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5785 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 26 08:07:28 1999

Date: Wed, 26 May 99 05:00:23 -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, 26 May 1999     Volume: 8 Number: 5785

Today's topics:
        Calling a Perl script (MomLucie)
        CC with smtp MODULE (Alexandre Amelin)
    Re: Chdir not working since I went to IIS4 (Murray Nesbitt)
    Re: Couldn't find a bundle file in Bundle-libnet-1.00 (Murray Nesbitt)
    Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Pe (Sitaram Chamarty)
    Re: Get spaces off. (Bob Trieger)
    Re: hash of array ? <graham@cs.man.ac.uk>
        How to exec a program( system() ) in a limited time? <ericyu@infor.eu.org>
        How would you rewrite this piece of code? <dmelomed@pppl.gov>
    Re: How would you rewrite this piece of code? (Randal L. Schwartz)
    Re: More Oraperl pain <rhrh@hotmail.com>
        New Perl Monger group forming - Baltimore, MD <rmanning@mail.ci.baltimore.md.us>
        path relatively to webserver <kontra@gmx.net>
    Re: Perl "constructors" <garethr@cre.canon.co.uk>
    Re: Perl and MySQL <antony@fabric8_spam_i_am.com>
    Re: Perl compiler...If or when <aqumsieh@matrox.com>
    Re: Perl equivalent of c++ "struct" <jhi@alpha.hut.fi>
    Re: RDF parser for My Netscape type RDF <matt-news@sergeant.org>
    Re: removings " "s from strings (Sam Holden)
    Re: removings " "s from strings <daniel.vesma@thewebtree.com>
    Re: req: directional help (Tony Greenwood)
    Re: Security:HowTo not pass UserID/Password as hidden v (Nathan Clemons)
        simple form processing <anders-andersson@gmx.net>
    Re: simple form processing <office@asc.nl>
        SunOS-perl-html question <galina.wasama@tieto.com>
    Re: SunOS-perl-html question <office@asc.nl>
    Re: Using Perl over server, Help <gellyfish@gellyfish.com>
    Re: What's wrong with this hit counter? (Randal L. Schwartz)
        why doesn't my first program work?? (ok , third or some <office@asc.nl>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 26 May 1999 11:43:39 GMT
From: momlucie@aol.com (MomLucie)
Subject: Calling a Perl script
Message-Id: <19990526074339.01639.00006888@ng-cg1.aol.com>

Hi,
Is it possible to call a Perl script from a high level language?
Thanks



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

Date: Wed, 26 May 1999 13:48:22 +0200
From: aamelin@mmm.com (Alexandre Amelin)
Subject: CC with smtp MODULE
Message-Id: <374BDF86.936FE003@mmm.com>

Hi,
Can Anyone tell me  how to make a CC with Net::smtp module.
Thanks.



Opinions expressed herein are my own and may not represent those of my employer.



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

Date: Wed, 26 May 1999 11:18:28 GMT
From: mjn@activestate.com (Murray Nesbitt)
Subject: Re: Chdir not working since I went to IIS4
Message-Id: <8MQ23.15523$M12.12267@news.rdc1.bc.wave.home.com>

Greg Bacon <gbacon@itsc.uah.edu> writes:
>In article <MPG.11b369bf8290cf0e989aea@nntp.hpl.hp.com>,
>        lr@hpl.hp.com (Larry Rosler) writes:
>: In article <7icco6$d29$1@info2.uah.edu> on 24 May 1999 20:27:50 GMT,
>: Greg Bacon <gbacon@itsc.uah.edu> says...
>: > My heart goes out to you. :-(

Greg, please feel free to submit whatever problems you are aware of
with ActivePerl to: support@activestate.com -- I trust you have many
suggestions on how to make it a better product.

>: You should be clear -- not about using ActivePerl, which in my
>: experience is quite fine.
>
>God save The Sarathy!! :-)

FWIW, and I mean no disrespect to Sarathy (who is not just my colleague,
but my friend), ActivePerl hasn't changed all that much since he joined
ActiveState.  What you say above does disrespect to the hard work a small
group of people (including many non-ActiveState people) did in an effort
to make widespread use of Perl a reality.

Please quit spreading FUD.

Murray




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

Date: Wed, 26 May 1999 10:17:25 GMT
From: mjn@activestate.com (Murray Nesbitt)
Subject: Re: Couldn't find a bundle file in Bundle-libnet-1.00
Message-Id: <VSP23.15517$M12.13233@news.rdc1.bc.wave.home.com>

Eric Bohlman  <ebohlman@netcom.com> wrote:
> Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> : Nah, the best way of installing modules for ActiveState is via their
> : PPM (Perl Package Manager ) - this is documented in the HTML documents
> : that are available throught the shortcut in your Start Menu.  You can
> : do something like:
> 
> : C:\>ppm install XML-Parser
> 
> Actually, that's the worst possible example to use for a PPM novice.  The 
> problem is that PPM itself makes use of XML::Parser, so when it tries to 
> update expat.dll it barfs because it's already using expat.dll (the 
> problem can be easily solved by *moving* (not just copying) expat.dll to 
> the directory you're running PPM from, but that's probably a little too 
> scary for someone new to PPM).

There is only a problem with XML-Parser on Win9x systems, not NT.

Check http://www.activestate.com/packages/support/XMLParser95.zip
for a Win9x solution.

Of course, the *real* Win9x solution is NT, and I won't go into
the NT solution.

Murray




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

Date: Wed, 26 May 1999 10:39:42 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Perl Y2K compliant?
Message-Id: <slrn7klkcn.mq8.sitaram@diac.com>

On Sun, 23 May 1999 04:34:13 GMT, finsol@ts.co.nz
<finsol@ts.co.nz> wrote:
>In article <374745c3@cs.colorado.edu>,
>  tchrist@mox.perl.com (Tom Christiansen) wrote:
>technology? Come on, Perl is just another programming language - time
>you got in touch with the real world.

I think the lady means "that real world in which "consultants" can
make lots of moolah by spreading unnecessary FUD about Y2K, and
where they (as well as trial lawyers) are panicking at the thought
of NOTHING major happening, and trying their damnedest to make hay
before the sun starts shining again".

>with Perl that you will clutch at any straw to defend it - even by
>attempting to descredit me by attacking my choice in newsgroup
>technology? Come on, Perl is just another programming language - time

Jocelyn: when a "consultant" like you does not know or choose to
use a proper newsreader, and instead uses dejanews/Netscape, Tom
DOES have a point.

I dont know what services you sell, but if I saw a carpenter
trying to use a saw where a chisel is more appropriate, I would
not hire him for anything more than making a bird house.  Perhaps
not even that.

It follows therefore, that you are not qualified to pass judgement
or even make comments about that which you do not understand.  Oh,
and I notice you still havent fixed your web page to remove the
claim that CGI is a language, thus dooming your reputation in the
eyes of every knowledgeable visitor to your pages.

Tom's tone may offend, but he almost always has a point.


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

Date: Wed, 26 May 1999 11:02:30 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Get spaces off.
Message-Id: <7igiro$2ki$1@fir.prod.itd.earthlink.net>

[ courtesy cc sent by mail if address not munged ]
     
paul@vdkamer.nl (PaulK) wrote:
>Probl. a simple question but, what is the easest way to get the spaces
>of at the end of a string ?
>
>$teststring= 'Hello this is a test string                      ';
>
>How do get $teststring to be 'Hello this is a test string';

I'd do it by reading the FAQ.




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

Date: 26 May 1999 11:19:54 +0100
From: Graham Gough <graham@cs.man.ac.uk>
Subject: Re: hash of array ?
Message-Id: <ttl675gt9o5.fsf@shallot.cs.man.ac.uk>

It's all there on line
 perldoc perlref
is what you need to type

Graham


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

Date: 26 May 1999 11:49:38 GMT
From: "Eric Yu" <ericyu@infor.eu.org>
Subject: How to exec a program( system() ) in a limited time?
Message-Id: <7ign4i$fqc$1@news.seed.net.tw>

I want to use system() call to exec a program, but I want it stop(be killed)
after 1 hour, how can I do it? The second problem is that I made a menu for
user and wait for their <STDIN>. How can I automatically exit the program if
they didn't type anything after 10 minutes?

Thanks!!

Eric





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

Date: Tue, 25 May 1999 14:48:48 -0400
From: Dan Melomedman <dmelomed@pppl.gov>
Subject: How would you rewrite this piece of code?
Message-Id: <374AF090.C5282651@pppl.gov>

Hi. How would you rewrite this peice of code to make it more concise and
optimized if possible:

foreach $line (@state){
 if ($line =~/interfaces_impacts=/) {
  &split;
  push @interfaces_impacts, $value;
 }elsif ($line =~/documentation_deliverables=/){
  &split;
  push @documentation_deliverables, $value;
 }elsif ($line =~/engineering_controls=/){
  &split;
  push @engineering_controls, $value;
 }elsif ($line =~/safety_controls=/){
  &split;
  push @safety_controls, $value;
 } elsif ($line =~/required_procedures=/){
  &split;
  push @required_procedures, $value;
 }elsif ($line =~/required_testing=/){
   &split;
   push @required_testing, $value;
 }elsif ($line =~/other=/){
   &split;
   push @other, $value;
 }

}

sub split {
   ($variable, $value) = split /=/, $line;
 }

Thanks a lot.



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

Date: 26 May 1999 03:59:32 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: How would you rewrite this piece of code?
Message-Id: <m1r9o4rt9n.fsf@halfdome.holdit.com>

>>>>> "Dan" == Dan Melomedman <dmelomed@pppl.gov> writes:

Dan> Hi. How would you rewrite this peice of code to make it more concise and
Dan> optimized if possible:

Dan> foreach $line (@state){
Dan>  if ($line =~/interfaces_impacts=/) {
Dan>   &split;
Dan>   push @interfaces_impacts, $value;
Dan>  }elsif ($line =~/documentation_deliverables=/){
Dan>   &split;
Dan>   push @documentation_deliverables, $value;
Dan>  }elsif ($line =~/engineering_controls=/){
Dan>   &split;
Dan>   push @engineering_controls, $value;
Dan>  }elsif ($line =~/safety_controls=/){
Dan>   &split;
Dan>   push @safety_controls, $value;
Dan>  } elsif ($line =~/required_procedures=/){
Dan>   &split;
Dan>   push @required_procedures, $value;
Dan>  }elsif ($line =~/required_testing=/){
Dan>    &split;
Dan>    push @required_testing, $value;
Dan>  }elsif ($line =~/other=/){
Dan>    &split;
Dan>    push @other, $value;
Dan>  }

Dan> }

Dan> sub split {
Dan>    ($variable, $value) = split /=/, $line;
Dan>  }

Simply:

  push @{$data{$1}}, $2 if $line =~ /(.*?)=(.*)/;

Then @{$data{"other"}} is all the hits for "other=".  If you want
it case-folded, use:

  push @{$data{lc $1}}, $2 if $line =~ /(.*?)=(.*)/;

which means the source text can be Other or OTHER or other.

print "Just another Perl hacker,"

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Wed, 26 May 1999 09:21:40 +0100
From: Richard H <rhrh@hotmail.com>
Subject: Re: More Oraperl pain
Message-Id: <374BAF14.50AD0595@hotmail.com>

Jared Hecker wrote:
> 
> Hi, all -
> 
> Given the following snippet of code, I expected to retrieve all records
> (up to 8 ) in the 'instance_name' and 'password' fields of the table
> 'sid'.  Instead, all I get back is the first record.  Can anyone point me
> to what I am doing wrong?
> 
> #################
> 
> eval 'use Oraperl; 1' ||die $@ if $] >= 5;
> $ENV{TWO_TASK} = 'EMAN';
> $lda = &ora_login('EMAN','username','password');
> 
> $csr2 = &ora_open($lda,'select instance_name from sid',8);
> @sid = &ora_fetch($csr2);
> &ora_close($csr2);
> 
> $csr = &ora_open($lda,'select password from sid',8);
> @pw = &ora_fetch($csr);
> &ora_close($csr);
> &ora_logoff($lda);
> 

Are you sure your use of the fetch method is correct??
Unless DBI has differed significantly from Oraperl, I would imagine  to
fill up @sid with sids you will have to do a loop around your fetch

while(&ora_fetch($csr2)) {
   push @sid, newsid;
}

most fetch'es ive ever done have to loop

Richard H


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

Date: Wed, 26 May 1999 07:42:34 -0400
From: Rob Manning <rmanning@mail.ci.baltimore.md.us>
Subject: New Perl Monger group forming - Baltimore, MD
Message-Id: <374BDE2A.83B1ACFF@mail.ci.baltimore.md.us>

Hello,
        If you're in the Baltimore metropolitan and would be interested
in meeting
monthly to chat with other perl programmers in the trenches this is your

chance.   Our first meeting will be sometime in June, the exact date,
time and
place still to be determined. If you're interested in attending let us
know so
we can plan accordingly.

Rob Manning

--
Rob Manning                             manningr@tcsnet.net
Senior Systems Analyst                   Work (410) 396-3922
TeleCommunication Systems               Fax  (410) 837-0546




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

Date: Wed, 26 May 1999 13:30:30 +0200
From: "Peter Kontra" <kontra@gmx.net>
Subject: path relatively to webserver
Message-Id: <7iglsl$1p3$1@black.news.nacamar.net>

Hello!
This is Peter Kontra with a small question: How should look a path
relatively to a webserver right? For example there is
http://www.mysite-yes.com/chat/ . So I need to know the accurate path for a
file lying in the chat directory (for example
http://www.mysite-yes.com/chat/chat.htm ). With what path can a point the
webserver to this file: I guess it schould look like
/home/www/mysite-yes/chat/chat.htm . Please answer to kontra@gmx.net . That
would be very nice.




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

Date: Wed, 26 May 1999 09:40:31 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
Subject: Re: Perl "constructors"
Message-Id: <sizp2sb240.fsf@cre.canon.co.uk>

zenin@bawdycaste.org wrote:
> A __DIE__ handler will always die(), unless it exit()s

A $SIG{__DIE__} handler might do other things than simply die - in
particular, it might alter the exception object, $@.  I'm thinking here
of CGI::Carp, which converts the exception object to a string and
prepends a date/time stamp.

-- 
Gareth Rees


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

Date: Wed, 26 May 1999 02:28:23 -0700
From: antony quintal <antony@fabric8_spam_i_am.com>
Subject: Re: Perl and MySQL
Message-Id: <374BBEB7.E6C17808@fabric8_spam_i_am.com>

kickinapants@home.com wrote:

> looking at writing the program myself. What I need to know is how to
> connect to MYSQL databases from a Perl CGI.


it goes something like:

use DBI;

my $dbh = DBI->connect('DBI:mysql:dbname', 'login', 'password') or die
'couldn't connect to database';

then use all the dbi methods to access your data.

here's a favorite reference:

http://mysql.turbolift.com/mysql/DBD_3.21.X.html

lots of examples on this page.

antony

-- 
   8888
 888  888   
888    888  :::::::::::::::::::::::
 888  888   http://www.fabric8.com
   8888     san francisco
 888  888   415.487.9702
888    888  :::::::::::::::::::::::
 888  888   
   8888


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

Date: Tue, 25 May 1999 10:41:12 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Perl compiler...If or when
Message-Id: <x3y1zg5yzy0.fsf@tigre.matrox.com>


Greg Bartels <gbartels@xli.com> writes:

> My reason for wanting a compiler would be that someone could
> run my program without having any perl stuff installed.

Fair enough.

> perl is not yet a universal language, and I have people at 
> work who have not installed perl on their PC's because
> its too much work. We have no system administrator.
> and we're an engineering company...

Installing Perl is too much work? Who told you so? On Winblows, it is
completely automated, and takes around 15 minutes. On *nix, it's
almost completely automated (unless you have some weird OS which no
one has heard of) and takes around the same time.

And so what if you're an engineering company? This should give you a
bigger incentive to installing Perl. What exactly is your excuse?
I am an engineer, and I installed Perl on my PC (at home) on both
Winblows and Linux. No need for a sysadmin for that.

> getting off perl specific topic,
> 
> as far as revising someone's definition of evil goes,
> I've never found a nice, short, concise bit of text 
> which goes through the pros of open source and the cons
> of proprietary code. if someone knows of one, please
> email the URL to me. 

It's not exactly short, but it's one of the best papers around.

	The Cathedral and the Bazaar.

http://www.tuxedo.org/~esr/writings/cathedral-bazaar/

HTH,
Ala



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

Date: 26 May 1999 12:35:42 +0300
From: Jarkko Hietaniemi <jhi@alpha.hut.fi>
Subject: Re: Perl equivalent of c++ "struct"
Message-Id: <oeeiu9gp40h.fsf@alpha.hut.fi>


dave@dave.org.uk (Dave Cross) writes:
> You should probably be looking at the Perl documentation for details
> of the following functions...
> 
> perldoc -f open
> perldoc -f seek
> perldoc -f read
> perldoc -f unpack
> perldoc -f pack

For binary data sysopen, sysseek, sysread, rather than the stdio-using
open, seek, read.

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen


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

Date: Wed, 26 May 1999 12:42:30 +0100
From: Matt Sergeant <matt-news@sergeant.org>
Subject: Re: RDF parser for My Netscape type RDF
Message-Id: <374BDE26.82914E5F@sergeant.org>

Otis Gospodnetic wrote:
> 
> Hello,
> 
> Has anyone written or does anyone know of a Perl module/script that can
> parse My Netscape (or Slashdot) RDF files?
> 
> I looked at XML::Parse manpage which turned me off, to be honest... :(

Don't be turned off - it's just a different way of working - and an
extremely powerful one.

Writing an RDF parser is non-trivial, but writing parsers for particular
RDF streams is a lot easier. I've written a What's Related rdf reader at
http://www.fastnetltd.ndirect.co.uk/Perl/related.txt - but beware -
What's Related claims to be RDF, but actually isn't, and uses an old
version of RDF, prior to ratification. I hope it helps in your study of
XML parsing though.

Matt.


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

Date: 26 May 1999 09:01:54 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: removings " "s from strings
Message-Id: <slrn7kne42.kjp.sholden@pgrad.cs.usyd.edu.au>

On 26 May 1999 09:33:42 +0100, Daniel Vesma <daniel.vesma@thewebtree.com> wrote:
>
>>   Maybe the docs *are* there, but you just can't find them.
>
>
>I looked at my install log for perl, and it says that "docs" was created,
>but there are no subdirectories. Maybe the install failed?

In which case perl isn't installed...

-- 
Sam

The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..."
	--Isaac Asimov 


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

Date: Wed, 26 May 1999 11:22:08 +0100
From: "Daniel Vesma" <daniel.vesma@thewebtree.com>
Subject: Re: removings " "s from strings
Message-Id: <7ighuj$jmm$1@gxsn.com>

>In which case perl isn't installed...


c:\perl5\perl5\ has the following executable and batch files perl.exe,
install.bat, P12bat.bat and uninstall.bat. There are not sub-directories.
install.log has the following...

Thu May 14 15:15:35 1998
creating C:\perl5\perl5\bin
Installing Perl for Win32 into C:\perl5\perl5
Copying over perl100.dll to C:\perl5\perl5\bin
Copying over perl and utility scripts to C:\perl5\perl5\bin
Added key for Perl 5 to NT Registry Database..
Adding C:\perl5\perl5\bin to script path information
Adding C:\perl5\perl5\lib to library include path information
Adding C:\perl5\perl5\docs to documentation directory
Attempting to change path in autoexec.batbootdrive is C:
Copying over PerlIS.dll to C:\perl5\perl5\bin
**Association of .pl to C:\perl5\perl5\bin\PerlIS.dll failed!!
Perl 95 installation finished.

perl.exe works fine.

Sorry for any inconvenience that has caused, I'll download the latest
release when I get a min.







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

Date: Wed, 26 May 1999 09:29:43 GMT
From: webdesign@accrington-web.co.uk (Tony Greenwood)
Subject: Re: req: directional help
Message-Id: <3750bcac.5889641@news.freeserve.co.uk>

Hey!  "Bastiaan S van den Berg" <office@asc.nl> 

>>You might also want to read this article, which will tell you
>>how to look things up in the extensive Perl docs:
>>   http://www.perlmonth.com/articles//rtfm.html
>

This sounds like somehting I could benefit from.. I find the perl
docs/faq very hard to read.. probably because of a limited education..
some of the terms and big words go right over my head :)

Unfortunatly it just times out.. I also tried http://www.perlmonth.com
and nothing there either..

Is there a mirror perchance? :)

--
          Tony Greenwood
  webdesign@accrington-web.co.uk
PORTFOLIO:www.accrington-web.co.uk


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

Date: Wed, 26 May 1999 11:45:08 GMT
From: nathan@ici.net (Nathan Clemons)
Subject: Re: Security:HowTo not pass UserID/Password as hidden variables from page to page
Message-Id: <374bde93.170457336@news.goodnet.com>

On Wed, 05 May 1999 16:14:39 GMT, dstorrs@megazone.bigpanda.com wrote:

>Probably the easiest is to encrypt the userID/password and pass the
>encrypted form.
>
>Alternatively, you can have a login page where the user is assigned a
>sessionID and the sessionID is passed in the hidden fields.  There are
>modules on CPAN that will do this for you...don't remember the names,
>but you might look for Apache::Session.  Last time I had to do this, I
>rolled my own because we were building from the ground up and it was
>easy enough to integrate.
>
>        Hope this helps.
>
>                   Dave Storrs

With the power and simplicity of Berkeley DB under Perl, this is
VERY easy to accomplish, since the DB is treated as an assoc.
array.

--Nathan


_________________________________________________________________________
Nathan Clemons
Associate Systems Engineer
WinStar iCi
Broadband Services
Great Woods Office Park 800 South Main St. Mansfield, MA 02048
_________________________________________________________________________
nclemons@winstar.com   http://www.winstar.com/  (v) 800-234-0002
   nathan@ici.net      http://www.ici.net/      (f) 508-261-0430


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

Date: Wed, 26 May 1999 12:16:26 +0200
From: "Anders Andersson" <anders-andersson@gmx.net>
Subject: simple form processing
Message-Id: <7ighho$s5k$1@black.news.nacamar.net>

Hello!
This is Anders Andersson and I have a simple problem with form. I have a
html-page filled with forms and like to save the entries in a sperate
text-file. Can you help me? I started like this but I couldn't manage it to
get it work:

#!c:\programme\perl\bin\perl.exe -w
# don't mind the first line, I'm testing it on my local computer
require ("cgiuprgs.pl")
$daten = <STDIN>;
%daten = &CGIDatenaufbereiter ($daten);

print "Content-type: text/html\n\n";

$textfile = 'c:/programs/perltest/text.txt';

open (TEXT, ">>$textfile") or die ("Coul'dnt open a textfile");
print TEXT ("$daten{'Von'}");
close (TEXT);

sub CGIDatenaufbereiter
{
  local ($cgidatenskalar, $name, $daten);
  local @cgidatenliste;
  local %cgidatenhash;
  if ( $_[0] ) {
    $cgidatenskalar = $_[0];
  }
  else {
    print STDERR ("Es wurden keine Daten an den CGIDatenaufbereiter
bergeben\n");
  }
  @cgidatenliste = split(/[&;]/ , $cgidatenskalar);
  foreach $listeneintrag (@cgidatenliste)
  {
    $listeneintrag =~ s/\+/ /go;
    ($name, $daten) = split( /=/ , $listeneintrag );
    $name =~ s/\%(..)/pack("c",hex($1))/ge;
    $daten =~ s/\%(..)/pack("c",hex($1))/ge;
    $cgidatenhash{$name} = $daten;
  }
  return %cgidatenhash;
}

I'll add the html Code below as well so that you can see the values how I
named the input-areas. Please answer to anders-andersson@gmx.net



the HTML-Code:
<form name="mail" action="../cgi-bin/1st-cgi9b.pl" method="post" ">
<INPUT TYPE="hidden" NAME="info">
<div align="left">
  <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
      <td width="12%">Name: </td>
      <td width="88%"><select name="Mitarbeiter" size=1>
<option value="1" selected>Nummer 1
<option value="2">Nummer 2
<option value="3">Nummer 3
<option value="4">Nummer 4
<option value="5">Nummer 5
<option value="6">Nummer 6
<option value="7">Nummer 7
<option value="8">Nummer 8
<option value="9">Nummer 9
<option value="10">Nummer 10
<option value="11">Nummer 11
</select></td>
    </tr>
    <tr>
      <td width="12%"></td>
      <td width="88%"><image src="" width="1" height="5"></td>
    </tr>
    <tr>
      <td width="12%"></td>
      <td width="88%"><input type="checkbox" name="Kommen" value="Kommen">
Kommen</td>
    </tr>
    <tr>
      <td width="12%"></td>
      <td width="88%"><image src="" width="1" height="5"></td>
    </tr>
    <tr>
      <td width="12%"></td>
      <td width="88%"><input type="checkbox" name="Gehen" value="Gehen">
Gehen</td>
    </tr>
    <tr>
      <td width="12%"></td>
      <td width="88%"><image src="" width="1" height="5"></td>
    </tr>
    <tr>
        <td width="12%">Zeit:</td>
      <td width="88%"><input type="text" name="Von" size="10" > : <input
type="text" name="bis" size="10"> Uhr</td>
    </tr>
    <tr>
      <td width="12%"></td>
      <td width="88%"><image src="" width="1" height="5"></td>
    </tr>
    <tr>
      <td width="12%"></td>
      <td width="88%"><input type=submit value="Speichern"><input type=reset
value="Zur|cksetzen">
      </td>
    </tr>
    <tr>
      <td width="12%"></td>
      <td width="88%"><image src="" width="1" height="5"></td>
    </tr>
  </table>
</div>
</form>





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

Date: Wed, 26 May 1999 12:32:40 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: Re: simple form processing
Message-Id: <7igimd$bu7$1@zonnetje.NL.net>

>Hello!
hi!

>This is Anders Andersson and I have a simple problem with form. I have a
>html-page filled with forms and like to save the entries in a sperate
>text-file. Can you help me? I started like this but I couldn't manage it to
>get it work:


i found this 'example' in the perl docs .. while i was searching some cgi
stuff
maybe you can understand and learn from it ..

-=[code]=-

#!/usr/bin/perl
# CGI script that creates a fill-out form
# and echoes back its values.
use CGI qw/:standard/;
print header,
 start_html('A Simple Example'),
 h1('A Simple Example'),
 start_form,
 "Whats your name? ",textfield('name'),p,
 "Whats the combination?", p,
 checkbox_group(-name=>'words',
                -values=>['eenie','meenie','minie','moe'],
                -defaults=>['eenie','minie']), p,
 "Whats your favorite color? ",
 popup_menu(-name=>'color',
            -values=>['red','green','blue','chartreuse']),p,
 submit(-name=>'isse ikke'),
 end_form,
 hr;

if (param()) {
 print "Your name is",em(param('name')),p,
 "The keywords are: ",em(join(", ",param('words'))),p,
 "Your favorite color is ",em(param('color')),
 hr;
}

-=[code end]=-

cul8r
buZz

Account Software Consultancy




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

Date: Wed, 26 May 1999 12:12:56 +0300
From: Galina Wasama <galina.wasama@tieto.com>
Subject: SunOS-perl-html question
Message-Id: <374BBB17.9CCC2420@tieto.com>

This is a multi-part message in MIME format.
--------------AA24B5EA26BF670A3B79D246
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi!

I havent any experience in a perl programming.
I need to write a perl program/script which run a HTML page on a SunOS
(v. 5.5.1) platform.

Can any one help ?

Thanks,
Galina


--------------AA24B5EA26BF670A3B79D246
Content-Type: text/x-vcard; charset=us-ascii;
 name="galina.wasama.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Galina Wasama
Content-Disposition: attachment;
 filename="galina.wasama.vcf"

begin:vcard 
n:Wasama;Galina
tel;work:+358 9 862 65 762
x-mozilla-html:FALSE
org:Tieto Corporation Oyj;Telecom
version:2.1
email;internet:galina.wasama@tieto.com
title:System Analyst
adr;quoted-printable:;;Kumpulantie 11, =0D=0AP.O.Box 156=0D=0A;00521 Helsinki;;;Finland
x-mozilla-cpt:;0
fn:Galina Wasama
end:vcard

--------------AA24B5EA26BF670A3B79D246--



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

Date: Wed, 26 May 1999 12:24:50 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: Re: SunOS-perl-html question
Message-Id: <7igi7n$bkm$1@zonnetje.NL.net>

first ., try finding a way to run perl on your page

next , look into some info about perl coding

then , try to find some cgi/perl related info (cgi is the protocol which you
want to use in perl)

and finally , code it :)

cul8r
buZz

Galina Wasama heeft geschreven in bericht <374BBB17.9CCC2420@tieto.com>...
>Hi!
>
>I havent any experience in a perl programming.
>I need to write a perl program/script which run a HTML page on a SunOS
>(v. 5.5.1) platform.
>
>Can any one help ?
>
>Thanks,
>Galina
>
>




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

Date: 26 May 1999 09:51:07 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Using Perl over server, Help
Message-Id: <374bb5fb@newsread3.dircon.co.uk>

Jody Fedor <JFedor@datacom-css.com> wrote:
> 
> Jonathan Stowe wrote in message <374aa879@newsread3.dircon.co.uk>...
>>WebWizard0 <webwizard0@aol.com> wrote:
>>> Im trying to run my perl script from over a server.  A very simple
> program
>>> like;
>>>
>>> #!!/user/local/bin/perl
>>> $temp = 'test';
>>> print "$temp";
> 
> 
> Try using:
> 
>     #!/usr/bin/perl -w
>     $temp = "test";
>     print "Content-type: text/html\n\n";
>     print $temp;
> 
> You need to let your browser know what type of data you are sending to it.
> 

Isnt that what I said ?

>>>
>>>
>>> Fails when I try calling it from a browser by using the URL;
>>> http://www.webpage.com/cgi-local/program.pl
>>>
>>> I get internal (500) errors.
>>
>>Its not entirely surprising that this does not work because it doesnt
>>make any effort to co-operate with the CGI specification - it needs
>>to return at least one header.
>>
>>Why dont you try:
>>
>>#!/usr/local/bin/perl -w
>>
>>print "Content-type: text/plain\n\n";
>>print "Hello, World";
>>
>>Which should work.
>>
>>You should really address questions about the CGI to the newsgroup:
>>
>>comp.infosystems.www.authoring.cgi
>>
>>/J\
>>--
>>Jonathan Stowe <jns@gellyfish.com>
>>
> 
> 

Can you please try to sort out your quoting.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: 26 May 1999 03:52:17 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: What's wrong with this hit counter?
Message-Id: <m1yaicrtlq.fsf@halfdome.holdit.com>

>>>>> "Felix" == Felix  <felixtse@crosswinds.net> writes:

Felix> How about this?

[bad code deleted]

Doesn't work when there's more than one user hitting at the same time.

Of course, if your page is so boring that you can guarantee that... :)

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Wed, 26 May 1999 12:22:59 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: why doesn't my first program work?? (ok , third or something)
Message-Id: <7igi4v$bip$1@zonnetje.NL.net>

hiya

 i made the following program :

-=[code]=-

#!/usr/bin/perl

require 'subtemp.cgi';

$test = "123meuk meuk321";
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "$ENV{'QUERY_STRING'}\n";
print &template("neuk.html");
print "</HTML>\n";

-=[code end]=-

 and the subroutine that it opens is :

-=[code]=-

sub template {
local(*FILE);
local($file);
local($HTML);

$file = $_[0] || die "template error: no file specified\n";

open(FILE, "<$file") || die "template error: couldn't open $file : $!\n";
while (<FILE>) { $HTML .= $_; }
close(FILE);

$HTML =~ s/$(w+)/${$1}/g;

return $HTML;
}

1;

-=[code end]=-


the html is something like this :

<div align="right"><font color="bright green with yellow dots
inside">$test</font></div>


in dos , the output looks like this :

C:\scripts>perl test.pl
Content-type: text/html

<HTML>

<div align="right"><font size="3" face="tahoma">buZz's test v1.0</div>
<font size="1">waarde van test : $test</font></font></HTML>

on the net , i just get <HTML> back !!

i feel like i'm going crazy :) i've only first picked up perl 2/3 days ago
 .. but i'm learning

i loooooove the concept of no typecasting :) makes me feel homesick to good
ol' basic :)

cul8r
buZz

Account Software Consultancy





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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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