[16353] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3765 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 21 06:10:29 2000

Date: Fri, 21 Jul 2000 03:10:18 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <964174218-v9-i3765@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 21 Jul 2000     Volume: 9 Number: 3765

Today's topics:
    Re: Perl job offered San Mateo Perm <nospam@nospam.com>
    Re: Perl job offered San Mateo Perm (Eric Bohlman)
        Please help with regular expression thailand@altavista.net
    Re: Please help with regular expression (Bernard El-Hagin)
    Re: Please help with regular expression (Rafael Garcia-Suarez)
    Re: Please help with regular expression <godzilla@stomp.stomp.tokyo>
    Re: PLEASE HELP!!!! <nospam@nospam.com>
        Populating Complex Data Structure Problem N.Jennings@soton.ac.uk
    Re: Quoting, interpolation and regular expressions <roman.stawski@fr.adp.com>
        Reading 3D form into 3D Array <studentfl@hotmail.com>
    Re: READING hashes eats memory!? <frolcov@dsd.fbm.msu.ru>
    Re: READING hashes eats memory!? (Ilya Zakharevich)
    Re: Recursive subroutine output to recursive subroutine <bart.lateur@skynet.be>
    Re: Saving space in a hash <nospam@nospam.com>
        Script to upload pic into predefined template susan@tribeagles.org
        Submit forms to perl/cgi pepebordoy@my-deja.com
        Submit forms pepebordoy@my-deja.com
    Re: Test CGI IE5 <gellyfish@gellyfish.com>
    Re: What is the differance? <bart.lateur@skynet.be>
    Re: Where can I find more information <dmmiller@acs-24-154-24-131.zoominternet.net>
    Re: Why does this reverse() not work??? - thanks <rhys.tucker@dtn.ntl.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 21 Jul 2000 04:29:11 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: Perl job offered San Mateo Perm
Message-Id: <8l8jin$s0l$1@216.155.32.126>

In article <fbed5.130$KR1.2983@news6-win.server.ntlworld.com>, "Cal 
Henderson" <cal@iamcal.com> wrote:

 | :
 | : It really does sound like comedy - every meaningless buzzword of the
 | : computer industry, strung together.
 | :
 | 
 | does it also 

"
 | deliver a bespoke turnkey solution in a robust and 
 | scableable environment?
" 

*stashing that one in the buzzword script*. :) 

 | i hope it does

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


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

Date: 21 Jul 2000 08:40:18 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Perl job offered San Mateo Perm
Message-Id: <8l929i$813$13@slb1.atl.mindspring.net>

Pjtg0707 (Pjtg0707@Netscape.net) wrote:
: On 18 Jul 2000 21:02:53 GMT, Eric Bohlman <ebohlman@netcom.com> wrote:
: >zack3011@my-deja.com wrote:
: >: Zack Network is the Internet's leading server-side infomediary. Using its
: >: unique ability to sit between users and the Web, the company has introduced a
: >: new paradigm of online content or functionality delivery: a next generation
: >: enabling technology. Zack's server-side application platform, the Zack
: >: Engine, is designed exclusively for Internet Service Providers and content
: >: providers. The technology can deliver any type of content or functionality to
: >: users in real time anywhere on the Internet.
: >
: 
: I am pretty slow today, much slower than usual, but can someone translate i
: this for me into everyday 
: Perl? I could of swear the message went right    over my head.

Nope.  It went right *under* your head.  It was a lump of text that had 
all the superficial characteristics of a message without actually being 
one.  The author said nothing, and used 75 words to say it.



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

Date: Fri, 21 Jul 2000 05:28:09 GMT
From: thailand@altavista.net
Subject: Please help with regular expression
Message-Id: <8l8n14$pc7$1@nnrp1.deja.com>

I run my perl script on pc with this code.

****************** $data='<a href="http://www.uyam.com/MusicVideo.htm">Music
Video</a><a href="http://www.ohoa.com/ja.htm">Saramander</a><a
href="http://www.ohoa.com/xx.htm">Tamagot</a>';

while ($data=~ /(<a\s+href\s*=\s*\"http:.+\<\/a>)/ig) {
	print "$1 \n";
}

****
I expect to see the result like this.

<a href="http://www.uyam.com/MusicVideo.htm">Music Video</a>
<a href="http://www.ohoa.com/ja.htm">Saramander</a>
<a href="http://www.ohoa.com/xx.htm">Tamagot</a>';

Ôbut the result are

<a href="http://www.uyam.com/MusicVideo.htm">Music Video</a><a
href="http://www.ohoa.com/ja.htm">Saramander</a><a
href="http://www.ohoa.com/xx.htm">Tamagot</a>';

instead.

Could you suggest me why this happen ? I think I use
the regular expression incorrectly.

Please suggest me what code should be if I like the result
as mention above.

Thank in advance.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 21 Jul 2000 07:21:23 GMT
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: Please help with regular expression
Message-Id: <slrn8nfu6s.1qr.bernard.el-hagin@gdndev25.lido-tech>

thailand@altavista.net <thailand@altavista.net> wrote:
>I run my perl script on pc with this code.
>
>****************** $data='<a href="http://www.uyam.com/MusicVideo.htm">Music
>Video</a><a href="http://www.ohoa.com/ja.htm">Saramander</a><a
>href="http://www.ohoa.com/xx.htm">Tamagot</a>';
>
>while ($data=~ /(<a\s+href\s*=\s*\"http:.+\<\/a>)/ig) {
>	print "$1 \n";
>}
>
>****
>I expect to see the result like this.
>
><a href="http://www.uyam.com/MusicVideo.htm">Music Video</a>
><a href="http://www.ohoa.com/ja.htm">Saramander</a>
><a href="http://www.ohoa.com/xx.htm">Tamagot</a>';
>
>Ôbut the result are
>
><a href="http://www.uyam.com/MusicVideo.htm">Music Video</a><a
>href="http://www.ohoa.com/ja.htm">Saramander</a><a
>href="http://www.ohoa.com/xx.htm">Tamagot</a>';
>
>instead.
>
>Could you suggest me why this happen ? I think I use
>the regular expression incorrectly.

If your $data string was one long line without \n's and you'd change
the ".+" in your regex to "+.?" you'd get what you want. There are also
some useless escapes which we can get rid of.

__________________
#!/usr/bin/perl -w
use strict;

my $data = '<a href="http://www.uyam.com/MusicVideo.htm">Music
Video</a><a href="http://www.ohoa.com/ja.htm">Saramander</a><a
href="http://www.ohoa.com/xx.htm">Tamagot</a>';

$data =~ s/\n/ /g;
while ($data =~ m#(<a\s+href\s*=\s*"http:.+?</a>)#ig){
	print "$1 \n";
}
__________________

Bernard
--
perl -e'@x=(3,2,4,1,3,2,1,3,1,3,2,3,3,2,3,0,0,1,2,1,1,1,4,1,2,1,1,2,2,1,
2,1,2,1,2,1,2,1,1,1,2,1,0,0,3,2,3,2,3,2,1,1,1,1,1,2,4,2,3,2,1,2,1,0,0,1,
2,1,1,1,4,1,2,1,1,1,2,2,1,1,4,1,1,1,2,1,1,1,2,1,0,0,3,2,4,1,1,2,1,1,1,3,
1,1,1,4,1,1,1,2,1,1,3,0,0);sub x{print q x$xx$_;print q x x x shift@x};#
while(defined($_=shift @x)){s o0o\no;$_!=0?x:print}' #Symmetry yrtemmyS#


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

Date: Fri, 21 Jul 2000 07:22:11 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Please help with regular expression
Message-Id: <slrn8nfuq8.gmr.rgarciasuarez@rafael.kazibao.net>

thailand@altavista.net wrote in comp.lang.perl.misc:
>I run my perl script on pc with this code.
>
>****************** $data='<a href="http://www.uyam.com/MusicVideo.htm">Music
>Video</a><a href="http://www.ohoa.com/ja.htm">Saramander</a><a
>href="http://www.ohoa.com/xx.htm">Tamagot</a>';
>
>while ($data=~ /(<a\s+href\s*=\s*\"http:.+\<\/a>)/ig) {
>	print "$1 \n";
>}
>
>****
>I expect to see the result like this.
>
><a href="http://www.uyam.com/MusicVideo.htm">Music Video</a>
><a href="http://www.ohoa.com/ja.htm">Saramander</a>
><a href="http://www.ohoa.com/xx.htm">Tamagot</a>';
>
>Ôbut the result are
>
><a href="http://www.uyam.com/MusicVideo.htm">Music Video</a><a
>href="http://www.ohoa.com/ja.htm">Saramander</a><a
>href="http://www.ohoa.com/xx.htm">Tamagot</a>';
>
>instead.
>
>Could you suggest me why this happen ? I think I use
>the regular expression incorrectly.

That's because of the '.+' in your regexp, that matches as many chars
as it can. Replace it by '.+?' or by '[^"]+"' and read the perlre
manpage.

BTW, '\' are unnecessary before '"' or '<' in regexps.

-- 
Rafael Garcia-Suarez


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

Date: Fri, 21 Jul 2000 01:55:21 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Please help with regular expression
Message-Id: <39780FF9.549B7FDF@stomp.stomp.tokyo>

thailand@altavista.net wrote:

(snippage)
 
> I run my perl script on pc with this code.
 
> $data='<a href="http://www.uyam.com/MusicVideo.htm">Music
> Video</a><a href="http://www.ohoa.com/ja.htm">Saramander</a><a
> href="http://www.ohoa.com/xx.htm">Tamagot</a>';
 
> while ($data=~ /(<a\s+href\s*=\s*\"http:.+\<\/a>)/ig)
> {
>  print "$1 \n";
> }

> I expect to see the result like this.
 
> <a href="http://www.uyam.com/MusicVideo.htm">Music Video</a>
> <a href="http://www.ohoa.com/ja.htm">Saramander</a>
> <a href="http://www.ohoa.com/xx.htm">Tamagot</a>';


Maybe it's just me...

If you treat your $data as one long line, no line breaks
and spaces restored lost to your copy and paste, there
is a remarkably simple solution. If it cannot be treated
as one long line, simply remove all \n characters. Note
you are missing a space after ' Music ' and after a
' <a ' up there second line end. Anyhow, one long line
or remove all newlines, restore those missing spaces
and run it per my script below. You might prefer to
use <BR> in place of where I inserted a \n in my 
script. This would be consistent with your html.


This will remove \n if needed:

$data =~ s/\n//g;

This will insert <BR> for your html:

$data =~ s/></><BR></g;

This will make a neat looking document source:

$data =~ s/></><BR>\n</g;


Incidently, these results you provided for your
script output are not consistent with what your
script actually produces.



TEST SCRIPT:
____________

Note I have split your $data line logically
to prevent word wrapping from messing it up.
It should be one long line.

#!/usr/local/bin/perl

print "Content-Type: text/plain\n\n";

$data=
'<a href="http://www.uyam.com/MusicVideo.htm">Music Video</a> 
<a href="http://www.ohoa.com/ja.htm">Saramander</a> 
<a href="http://www.ohoa.com/xx.htm">Tamagot</a>';
 
$data =~ s/></>\n</g;

print $data;

exit;


PRINTED RESULTS:
________________

<a href="http://www.uyam.com/MusicVideo.htm">Music Video</a>
<a href="http://www.ohoa.com/ja.htm">Saramander</a>
<a href="http://www.ohoa.com/xx.htm">Tamagot</a>


Godzilla!

-- 
$godzilla = "godzilla rocks!";
srand(time() ^ ($$ + ($$ << 15))); 
sub randcase
 { rand(40) < 20 ? "\u$1" : "\l$1" ; }
$godzilla =~  s/([a-z])/randcase($1)/gie;
print $godzilla; exit;


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

Date: 21 Jul 2000 08:40:03 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: PLEASE HELP!!!!
Message-Id: <8l9293$6l4$0@216.155.33.92>

In article <8l70f0$n8n$2@internal-news.uu.net>, Erik van Roode 
<newsposter@cthulhu.demon.nl> wrote:

 | kj0 <kj0@mailcity.com> wrote:
 | 
 | > The server error log says
 | 
 | >     httpd: [Wed Jul 19 19:35:39 2000] [error] (8)Exec format error: 
 | >     exec of /home/doe/xyz/www/cgi/hi.js failed
 | >     httpd: [Wed Jul 19 19:35:39 2000] [error] [client ***.***.**.***] 
 | >     Premature end of script headers: /home/doe/xyz/www/cgi/hi.js
 | 
 | > Does anybody know what this means?  The file permissions are all OK.
 | > The server (apache) is configured to export javascript.
 | 
 | This means the prowser is trying to fetch the hi.js file, but your
 | server tries to execute it as if it is a cgi script.
 | 
 | Either configure the server to not execute *.js, or move the .js file
 | into another no-cgi directory.
 | 
 | And ofcourse, this question has nothing to do with Perl, but with
 | webserver configuration ...

you might also use 

    use CGI::Carp 'FatalsToBrowser';

:)

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


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

Date: Fri, 21 Jul 2000 08:26:11 GMT
From: N.Jennings@soton.ac.uk
Subject: Populating Complex Data Structure Problem
Message-Id: <8l91ev$b6$1@nnrp1.deja.com>

Hi,

I am having problem automatically populating a complex data structure of
roughly the type:

Records =

IDNO1 => {
   TypeA => [
                      { field1 => val1, field2 => val2, field3 => val3
},
                      { field1 => val1, field2 => val2, field3 => val3 }
                    ],
  TypeB => [
                      { field1 => val1, field2 => val2, field3 => val3
},
                      { field1 => val1, field2 => val2, field3 => val3 }
                    ],
                },
IDNO2 => {
   TypeA => [
                      { field1 => val1, field2 => val2, field3 => val3
},
                      { field1 => val1, field2 => val2, field3 => val3 }
                    ],
  TypeB => [
                      { field1 => val1, field2 => val2, field3 => val3
},
                      { field1 => val1, field2 => val2, field3 => val3 }
                    ],
                }
)


I have a loop in which the values of fields are determined as well as a
hash array for the
{ field1 => val1, field2 => val2, field3 => val3} structure is created.
I need to put these elements together

e.g.

while ($line = <INFILE>)
        {
                chomp($line);

                @tmp = split(/:/,$line,5);
                $idno = $tmp[4];
                $type = $tmp[3];
                undef(%fields);
                %fields = (map(split(/\=/,$_),split(/,/,$tmp[5])));

                 push @{ $records{$idno}{$type} }, { %fields };
}

However, my push statement isnt working as I hoped. I have looked at the
Perl Data Structures Cookbook pages but still can't get a working
solution.

Any help steering me in the right direction will be much appreciated.

Cheers

Neville



Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 21 Jul 2000 09:17:47 +0200
From: Roman Stawski <roman.stawski@fr.adp.com>
Subject: Re: Quoting, interpolation and regular expressions
Message-Id: <3977F91B.A52D0FE8@fr.adp.com>

Ilmari Karonen wrote:
> 
> PSI::ESP indicates he wants to turn a glob into a regexp:

Huh, that ruddy module must be a security hazard. Perhaps that's
why CPAN restricts access to it :-)

>   sub glob2re {
>       my $re = quotemeta(shift);
>       $re =~ s/\\\*/.*?/g;
>       $re =~ s/\\\?/./g;
>       return qr/^$re$/s;
>   }

That was my conclusion with the slight exception that the regexp
is compared against paths so I'm using something more like 
s'\\\*'[^/]*?'g;

-- 
Roman Stawski - ADPgsi


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

Date: Fri, 21 Jul 2000 07:47:05 GMT
From: "Robert Brooks" <studentfl@hotmail.com>
Subject: Reading 3D form into 3D Array
Message-Id: <ZdTd5.4612$eS6.148282@news1.rdc1.md.home.com>

Howdy folks,
I am having a problem. I have a page with a form, something like this

Tom    Red    Ford
Bill   Green  Chevy
Jake   Blue   Toyota
Chad   Pink   Cadillac

Ok, I have it setup so that the page where these get entered is a series of
(for the sake of this example) 12 text-box forms with the names:

name1    color1    car1
name2    color2    car2
name3    color3    car3
name4    color4    car4

I need to read this information in to a perl program. I tried to do a loop
with a variable inside a variable, for instance $name = $INPUT{'name$x'}
Needless to say, that didn't work. I did some research and concluded that it
isn't possible. But I didn't get any clear-cut answers on how this can be
read in. Any ideas? Source examples would be helpful, I have been stuck on
this one for a while. I have read through all the perl faqs and most of the
docs.

Thanks.





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

Date: Fri, 21 Jul 2000 10:36:24 +0400
From: "Ivan Frolcov" <frolcov@dsd.fbm.msu.ru>
Subject: Re: READING hashes eats memory!?
Message-Id: <8l8qv7$9o2$1@news.msu.ru>


Ken Barr <kenneth.c.barr.nospam@intel.com> wrote in message
news:8l84he$96o@news.or.intel.com...
> I have a huge hash-of-hash table (with 1st and 2nd level keys that are 32
> bit ints, if that matters).  It gets created in about 2-3 megs of
memory...
> When I start to access the table in a loop, however, memory usage
> BALLOONS!!!  Reading from the table once it exists in memory shouldn't
> require more than one extra word of memory (which I would happily reuse
each
> iteration of the loop).  How can I do:
>
> foreach $src (keys(%src)){
>     foreach $dst (keys(%dst)){
>          $i=$cell{$src}{$dst}{packets}
>     }
> }
>
> without running out of memory?  BTW, swapping the foreach/keys with
> while/each doesn't help.

perldoc -f keys
    keys HASH
            Returns a list consisting of all the keys of the named
            hash...

and in your program you have two additional arrays of keys of hashes.
If you hashes are huge then this lists also huge, I think.





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

Date: 21 Jul 2000 06:45:41 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: READING hashes eats memory!?
Message-Id: <8l8ril$h3c$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to Ken Barr
<kenneth.c.barr.nospam@intel.com>],
who wrote in article <8l84he$96o@news.or.intel.com>:
> I have a huge hash-of-hash table

> foreach $src (keys(%src)){
>     foreach $dst (keys(%dst)){
>          $i=$cell{$src}{$dst}{packets}
>     }
> }

If we believe you about hash-of-hashes, then

  a) You do not use strict;
  b) You are making your table into a hash of hashes of hashes.
  c) The references to the internal hashes are symbolic;

No wonder the memory usage increases...

Ilya


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

Date: Fri, 21 Jul 2000 09:34:15 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Recursive subroutine output to recursive subroutine problem
Message-Id: <s56gnsglre99p36v2u1j29obn8m1fua5nr@4ax.com>

firstname.lastname@nokia.com wrote:

>BTW for some reason I'm not able to use the my() operator.  Every time
>I try to execute the script with a my () the script will fail at that
>point.  This is something completely different to my problem listed
>above but I just want you to be aware of it.

Perl 4 alert!

-- 
	Bart.


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

Date: 21 Jul 2000 04:49:37 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: Saving space in a hash
Message-Id: <8l8kp1$s0l$3@216.155.32.126>

In article <3975F296.A02CD3CF@rac.ray.com>, Russ Jones 
<russ_jones@rac.ray.com> wrote:

 | 
 | I'm building a hash that contains the same line of data, referenced
 | three different ways, like this:
 | 
 | 	$snmp{$ip}    = $snmp_info;
 | 	$snmp{$dns}   = $snmp_info;
 | 	$snmp{$alias} = $snmp_info;
 | 
 | 	(repeat for about five thousand different ip's)

how about a simple HoL ? 

    $snmp{$ip} = [ $dns, $alias, $snmp_info ];

de-references via 

  foreach (keys %snmp) {

      my $dns = $snmp{$_}->[0];
      my $alias = $snmp{$_}->[1];
      my $info = $snmp{$_}->[2];
      
      #do something with the data here... 
  }

just as an example.. 

see perllol and perldsc for more info. 

HTH.

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


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

Date: Fri, 21 Jul 2000 06:54:55 GMT
From: susan@tribeagles.org
Subject: Script to upload pic into predefined template
Message-Id: <8l8s3t$s5h$1@nnrp1.deja.com>

Heya,

Forgive me if this is the wrong forum for this question. I work for an
animal shelter and want to develop a tool that visitiors to our website
can use to generate "lost dog" posters to put up in their own
neighborhoods.

I evision it thusly: Fido goes AWOL, user goes to our web site, fills
out a form, uploads a picture of Fido from his computer, and our system
spits back a preformatted web page with two functions: (1) the URL can
be posted, and (2) (most importantly) the page itself can be easily
printed (with no manipulation) to give a decent 'lost dog' poster with
a pic of the dog (if available) and all relevant information.

I thought I could just adapt another script for this purpose (I'm not a
programer nor even a very good 'tweaker', but I may have been able to
pull that off), but I'm not finding any (free) scripts that combine
image uploading with web page generation (which is rather strange, I
think...). I'd like it to be VERY easy to use, and very non-flexible -
that is, I want the output to be very standardized. It'd be nice if the
script itself could fix the image to make it fit in the predetermined
space on the poster, but I'm not sure how difficult that would be.

Believe it or not, such a tool would be (I believe) *incredibly*
useful - since most lost dogs are very close ton their home, this may
be the best use of the internet in helping to find lost dogs. The
benfit of having a standardised form is that often people forget to
include relevant inforamtion, and often their formatting makes the
posters difficult to read...

Could anyone perhaps point me in the right direction as to 'tweakable'
scripts, or perhaps would anyone want to take this on as a 'pro bono'
project? It'd be an ENORMOUS benefit to lost dogs and cats...

Thanks for any help anyone can give me!

- Susan Hogarth
susan@tribeagles.org



Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 21 Jul 2000 09:14:38 GMT
From: pepebordoy@my-deja.com
Subject: Submit forms to perl/cgi
Message-Id: <8l949p$21o$1@nnrp1.deja.com>



hi,
I am looking for simple perl/cgi
coding that will process a form sent
from html to an email address.

There are alot of these scripts around but they contain other stuff for
different functions.

if anyone could help me on this it would be great, ohh I'D say you will
have to tell me how to alter it to suit myself.

thanks
brian


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 21 Jul 2000 09:12:48 GMT
From: pepebordoy@my-deja.com
Subject: Submit forms
Message-Id: <8l946b$219$1@nnrp1.deja.com>



hi,
I am looking for simple perl/cgi
coding that will process a form sent
from html to an email address.

There are alot of these scripts around but they contain other stuff for
different functions.

if anyone could help me on this it would be great, ohh I'D say you will
have to tell me how to alter it to suit myself.

thanks
brian


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 21 Jul 2000 09:07:54 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Test CGI IE5
Message-Id: <8l90cq$goe$1@orpheus.gellyfish.com>

On Thu, 20 Jul 2000 18:36:51 GMT ocean77@my-deja.com wrote:
> I have written a executable CGI and want to test it using Omnihttpd.
> However, I do not know how to config IE5 to run the script to test it
> like the IP address ot others config.I did not change the default
> settings of Omnihttpd.
> 

You dont have a Perl question,  please ask in :

               comp.infosystems.www.servers.ms-windows

about the configuration of Omnihttpd.

/J\
-- 
yapc::Europe in assocation with the Institute Of Contemporary Arts
   <http://www.yapc.org/Europe/>   <http://www.ica.org.uk>


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

Date: Fri, 21 Jul 2000 09:42:54 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: What is the differance?
Message-Id: <kb6gnsgoi9q8flhd620nfaiarglbj03aeo@4ax.com>

Mark E. Drummond wrote:

>	(length($octet) == 1) ? $mac.="0$octet" : $mac.=$octet;

You're abusing the "?:" operator set. This is how it was intended to be
used:

	$mac .= (length($octet) == 1? "0$octet" : $octet; 

And, uh, everybody must have told you by now you have aprecedence
problem.

And since you're trying to do some padding with zeroes, try this:

	@mac = map { sprintf '%02s', $_ } split /:/, $mac;

-- 
	Bart.


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

Date: 21 Jul 2000 06:19:30 GMT
From: Donn Miller <dmmiller@acs-24-154-24-131.zoominternet.net>
Subject: Re: Where can I find more information
Message-Id: <3977eb72$0$3982@wodc7nh6.news.uu.net>

nikita <nikitta@ica.net> wrote:

> Hello
> Where can I find more information about Perl programming,
> exactly
> ****Reading N consecutive rows from an arbitrary starting point, and
> finishing.*******

Well, as far as books go, _Programming Perl_ by O'Reilly is a decent
reference, although it doesn't look all that great for beginners.  As for web
sites, there's http://www.perl.com/.
-- 
- Donn


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

Date: Fri, 21 Jul 2000 09:42:16 +0000
From: rhys <rhys.tucker@dtn.ntl.com>
Subject: Re: Why does this reverse() not work??? - thanks
Message-Id: <39781AF8.9A6F54FE@dtn.ntl.com>

Thank you Walt.

rhys

Walt Mankowski wrote:
> 
> rhys <rhys.tucker@dtn.ntl.com> writes:
> 
> > You may recognise this as an example from Learning Perl. The reverse()
> > refuses to operate for me (running RedHat 6.2, kernel-2.2.14-6.1.1,
> > perl-5.00503-10).
> >
> > #!/usr/bin/perl -w
> >
> > print "Enter the list of strings \n";
> > @list = <STDIN>;
> >
> > @reversed = reverse(@list);
> >
> > print @reversed;
> 
> When you use <> in list context, it stores each line as a separate
> entry in the list.  So if you enter
> 
> 1 2 3 4
> 
> you just get back
> 
> 1 2 3 4
> 
> because @list only has one element in it.  If, however, you put them
> each on their own line:
> 
> 1
> 2
> 3
> 4
> 
> then @list has 4 elements in it, and you get back
> 
> 4
> 3
> 2
> 1
> 
> Walt


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

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


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 3765
**************************************


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