[8299] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1916 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 17 04:07:19 1998

Date: Tue, 17 Feb 98 01:00:46 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 17 Feb 1998     Volume: 8 Number: 1916

Today's topics:
    Re: ? Regular Expressions ? (Martien Verbruggen)
    Re: ? Regular Expressions ? uri@sysarch.com
        Associateve Array - Eval'ing the Value Part <pjmcclor@fedex.com>
    Re: Associateve Array - Eval'ing the Value Part (Martien Verbruggen)
    Re: Creating Arrays from a file of names uri@sysarch.com
    Re: Duplicate lines in associative array: keeping (Gabor)
    Re: Happy with Perl? <seans@chiefaircraft.com>
        HELP!  My ISP claims that Perl access is a serious secu (Tom Gooding)
    Re: Help: Why does sysread give false end of file? (Jonathan Feinberg)
    Re: Help: Why does sysread give false end of file? uri@sysarch.com
    Re: HTTP::Daemon _with_ Authentication <aas@sn.no>
    Re: Interpeter For The PC Chris_Schoenfeld@sonic.net
        newbie question about reloading a web page through perl <kigray@cs.utexas.edu>
    Re: on reading FAQs and gurus answering questions (John Stanley)
    Re: on reading FAQs and gurus answering questions <swimmer@digital.de>
        Pattern Matching ??? (Burt Lewis)
    Re: Pattern Matching ??? (Martien Verbruggen)
        PERL Programmer needed dma@adscape.com
    Re: perlshop with cybercash (Martien Verbruggen)
    Re: Q: Storing complex records in DBM files (Sitaram Chamarty)
        Retrieving mail from host (Paul Farber)
        script won't run...displays script text <gameday@uslink.net>
    Re: Stripping HTML tags in 5.004 (Abigail)
    Re: The Young Man and the Beach (Abigail)
    Re: The Young Man and the Beach (Richard Bellavance)
    Re: The Young Man and the Beach (I R A Aggie)
    Re: Using HTML Tags in forms (Content Type) (Craig Berry)
    Re: Using HTML Tags in forms (Content Type) (Jonathan Feinberg)
    Re: Using HTML Tags in forms (Content Type) (Abigail)
    Re: WANTED UK PEARL SCRIPT PROGRAMER (Martien Verbruggen)
    Re: what is exaclty the "_" Variable ?!?! (Martien Verbruggen)
    Re: Why is Tom Christiansen so rude? (Andreas Karrer)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 17 Feb 1998 01:26:46 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: ? Regular Expressions ?
Message-Id: <6cap0m$5kj$2@comdyn.comdyn.com.au>

In article <6caj98$bh3$1@csnews.cs.colorado.edu>,
	Tom Christiansen <tchrist@mox.perl.com> writes:

> In comp.lang.perl.misc, mgjv@comdyn.com.au (Martien Verbruggen) writes:
>:I would use man if Solaris didn't have such a
>:broken version of makewhatis installed. 
> 
> Get the linux or perl versions.

And try to convince the admins here that that would be better than a
commercial product? Naw. I'd rather use perldoc :)

Now, if I had a say in it, it would have been replaced a long time ago :)

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | In the fight between you and the world,
Commercial Dynamics Pty. Ltd.       | back the world - Franz Kafka
NSW, Australia                      | 


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

Date: 16 Feb 1998 21:26:17 -0500
From: uri@sysarch.com
Subject: Re: ? Regular Expressions ?
Message-Id: <x7ra53j7au.fsf@sysarch.com>

Tom Christiansen <tchrist@mox.perl.com> writes:

>  [courtesy cc of this posting sent to cited author via email]
> 
> In comp.lang.perl.misc, mgjv@comdyn.com.au (Martien Verbruggen) writes:
> :I would use man if Solaris didn't have such a
> :broken version of makewhatis installed. 
> 
> Get the linux or perl versions.
> 

or use tkman which makes its own database, has good and fast searching
within a man page, links from a man page to other man pages, global full
text search (using glimpse) and many other good features. best man
reading program i know. the author even wishes (i think i have read
this) he would rather it was written in perl-tk instead of tcltk.

uri

-- 
Uri Guttman		        SYStems ARCHitecture and Software Engineering
uri@sysarch.com			                         Have Perl, Will Hack
http://www.sysarch.com		                        "Your Web Specialist"
(617) 643-7504 x*2  FAX: (617) 643-2710    These ARE the opinions of Sysarch!


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

Date: Mon, 16 Feb 1998 13:11:26 -0600
From: Phillip Juan McClore <pjmcclor@fedex.com>
Subject: Associateve Array - Eval'ing the Value Part
Message-Id: <34E88F5D.F9F0ED4A@fedex.com>

I need to look at a hash's value and keep up with the key, qualify the
value and process.  For example,  if the value is greater than 0,  then
I want to "do something".  I am reall stuck here. I know I am going to
kick myself when I find out how to do this . . .but it has been two days
now  . . . and I have not got it yet!  Will ya'll please help a kid out?

Thanks in advance!

New on the Perl block,
Juan



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

Date: 17 Feb 1998 01:36:36 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Associateve Array - Eval'ing the Value Part
Message-Id: <6capj4$5kj$4@comdyn.comdyn.com.au>

In article <34E88F5D.F9F0ED4A@fedex.com>,
	Phillip Juan McClore <pjmcclor@fedex.com> writes:
> I need to look at a hash's value and keep up with the key, qualify the
> value and process.  For example,  if the value is greater than 0,  then
> I want to "do something".  I am reall stuck here. I know I am going to
> kick myself when I find out how to do this . . .but it has been two days
> now  . . . and I have not got it yet!  Will ya'll please help a kid out?

I don't think I understand your problem. What you describe is:

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

my %hash = ( foo => 12, bar => -12 );

foreach my $key (keys %hash)
{
    print "key: $key, value: $hash{$key}";
    print ", greater than 0" if ($hash{$key} > 0);
    print "\n";
}

Which part is causing you trouble?

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | You can't have everything, where would
Commercial Dynamics Pty. Ltd.       | you put it?
NSW, Australia                      | 


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

Date: 16 Feb 1998 21:36:02 -0500
From: uri@sysarch.com
Subject: Re: Creating Arrays from a file of names
Message-Id: <x7pvknj6ul.fsf@sysarch.com>

Chipmunk <rjk@coos.dartmouth.edu> writes:

> Holly Sommer wrote:
> > 
> > $i = 0;
> > foreach $host (@hosts) {
> >    if ( $i < 10 ) {
> >       print STDOUT "$host ";
> >       $i++;
> >    } else {
> >       print STDOUT "$host\n";
> >       $i = 0;
> >    }
> > }
> 
> A more compact way to do it:
> 
> $i = 0;
> foreach $host (@hosts) {
>   print $host, ((++$i % 10) ? ' ' : "\n");
> }
> 
> Chipmunk


another way try using join and splice (or array slices). this doesn't
need the $i or the math and is more swartzian (which may be a plus or
minus depending on your taste).

print join( ' ', splice( @hosts, 0, 10 ) ), "\n" while( @hosts ) ;


uri

-- 
Uri Guttman		        SYStems ARCHitecture and Software Engineering
uri@sysarch.com			                         Have Perl, Will Hack
http://www.sysarch.com		                        "Your Web Specialist"
(617) 643-7504 x*2  FAX: (617) 643-2710    These ARE the opinions of Sysarch!


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

Date: 16 Feb 1998 19:41:30 GMT
From: gabor@vmunix.com (Gabor)
Subject: Re: Duplicate lines in associative array: keeping
Message-Id: <slrn6eh5fe.654.gabor@vnode.vmunix.com>

In comp.lang.perl.misc, Craig A. Keefner <keefner@kinetic.com> wrote :
# I read in multi-line file and want to display each line, even some of  the
# lines which are duplicates. Is there a way to simply modify this script
# so that unique numbers are not assumed?
# 
#  for $i (0..$#array) {
#   $partno[$i] = substr( $array[$i], -9 );
#   $text = substr( $array[$i], 1, -9 );
#   $text =~ s/\.*\s*$//; # strip off trailing "..."
#   $text =~ s/\'//; # strip off trailing "..."
#   $label{$partno[$i]} = $text;  # assumes unique numbers?

    push @{$label{$partno[$i]}}, $text;

# }

Each key will then hold an array of values.
Getting at the values is left as an exercise. ;-)

gabor.
--
    stab_val(stab)->str_nok = 1;    /* what a wonderful hack! */
        -- Larry Wall in stab.c from the perl source code


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

Date: 17 Feb 1998 01:56:23 GMT
From: "Sean Smithers" <seans@chiefaircraft.com>
Subject: Re: Happy with Perl?
Message-Id: <01bd3b47$562935a0$020210ac@mail.chiefaircraft1.com>

Clueless dorkage, he's never read a standard software EULA in his life.

nwi-tech <nwi-tech@dircon.net> wrote in article
<01bd3613$2e469ca0$ea3670c2@lwnvf>...

> if i wrote a program in perl which backed up $100 million worth of
dealing
> information, and that program failed because of a bug in the perl source,
> my company would not be able to sue anyone, and other than perlclinic
> (found them now), i would have only you lot to ask advice of.  with
> respect, you do not have any obligation to help me, and might even
provide
> inaccurate advice given that the situation i would be in where we would
be
> losing $60,000 an hour is one that is easy to misinterpret given its
> complexity.
> 



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

Date: Mon, 16 Feb 1998 21:13:12 -0600
From: tgooding@millcomm2.com (Tom Gooding)
Subject: HELP!  My ISP claims that Perl access is a serious security risk!
Message-Id: <tgooding-ya023580001602982113120001@news2.ibm.net>

I've been trying to convince my ISP to grant access to the Perl
interpretter on their Unix box (which is already installed).  Currently,
we're allowed to make shell scripts.  Thats it.  No C/C++, Perl, Fortran,
nada!

Here's what they said:
------------
We do
not allow any sort of compiler/interpreter access for the simple reason of
security.  Due to the nature of Today's sort of attacks, this method
assures a higher level of security.  PEople who have scripts to run a cc,
compile a security bug exploit, and then use it to overflow a buffer to
gain root are usually stopped.  
At the moment, we only allow perl/compiler access to our webserver
accounts, and then only if they ask for it.  We also limit perl due to the
nature of it.  if a language, interpreted or not, can do direct i/o
control and do direct memory access, it too can be used to exploit bugs in
security.  It seems possible for me to allow perl to a user, but then you
must make sure your password is indeed secure, and that you are liable for
any actions taken from your account.
------------

Personally, I think he's just a BIT paranoid.  Probably trying to talk his
way out of doing some work.  Is it even possible to do what he claims from
Perl?  I'd like to refuse his arguement so completely that he can't say
anything.

And no, i'm not talking about cgi-bin stuff.  Just vintage perl from the
user's home directory.  (I do understand his comment about compiled
binaries however)

Just seems WRONG that anyone would provide a Unix box with no compilers or
anything.

Thanks,

Tom

-- 
To reply, delete the '2' from my email address.  
                         And take a byte of out of SPAM!!!


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

Date: Mon, 16 Feb 1998 21:06:23 -0500
From: jdf@pobox.com (Jonathan Feinberg)
Subject: Re: Help: Why does sysread give false end of file?
Message-Id: <MPG.f52baaa8474a64c9896e3@news.concentric.net>

  [courtesy cc of this posting sent to cited author via email]

spamblock_majka@richmond.infi.net said...
: why isn't sysread seeing a 
: continuous file as it appears when I open it with a text editor?
: 
: Running Perl for Win32 on NT 4.0.

Is it possible that some of the bytes in your file are equal to ^Z?  If so, 
did you

open(THEFILE, "<thefile") or die "$!";
binmode THEFILE;

?

-- 
#!/usr/bin/perl -w -- Just another Perl hacker,
 (open 0),$_=<0>,s,.*-+ ,,,chop;for(split?@*?){($$_++or$}=$_,y,
 y \,y,<STDIN>,,eval"sub $_ {print'$}'}"),y,} \,},>STDOUT,,&$_}
# Jonathan Feinberg    jdf@pobox.com    Sunny Brooklyn, NY


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

Date: 16 Feb 1998 21:43:58 -0500
From: uri@sysarch.com
Subject: Re: Help: Why does sysread give false end of file?
Message-Id: <x7n2frj6hd.fsf@sysarch.com>

spamblock_majka@richmond.infi.net (Stan Majka) writes:

  SM> I'm trying to read a 711 KB file, but a straightforward sysread
  SM> loop quits after only about 42 KB.
  SM> 
  SM> The file contains variable length records.  Each record starts and
  SM> ends with a 2-byte record length.  I read the length of the first
  SM> record, then loop, reading each record plus the 2-byte length
  SM> field for the next record.
  SM> 
  SM> I can successfully read 162 records, but on the 163rd, I ask for
  SM> 280 bytes but only get 10.  If I do another sysread for 270 bytes,
  SM> I get 0.  If I keep doing sysreads for 999 bytes, I keep getting 0
  SM> bytes read.
  SM> 
  SM> If I put in an error recovery routine, I can read the entire 711
  SM> KB.  Whenever the bytes read is less than the record length, I
  SM> close the file, re-open it, seek to where the next record is
  SM> supposed to be, and continue from there.  This gets me through the
  SM> file, but it seems kludgy; why isn't sysread seeing a continuous
  SM> file as it appears when I open it with a text editor?

some example code would be helpful. we can't diagnose what we don't
see. i have done what you are doing with no problem so it does
work. have you called binmode (for the godawful NT files)? are you sure
all the previous reads are correct or maybe they failed in a way that
make it fail harder at this spot in the file? are you sure you are where
you expect to be in the file (try printing out the current seek position
after every read record and comparing that to the read sizes)?

uri


-- 
Uri Guttman		        SYStems ARCHitecture and Software Engineering
uri@sysarch.com			                         Have Perl, Will Hack
http://www.sysarch.com		                        "Your Web Specialist"
(617) 643-7504 x*2  FAX: (617) 643-2710    These ARE the opinions of Sysarch!


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

Date: 16 Feb 1998 20:49:43 +0100
From: Gisle Aas <aas@sn.no>
Subject: Re: HTTP::Daemon _with_ Authentication
Message-Id: <m33ehjgwiw.fsf@furu.g.aas.no>

Hartmut Palm <palm@gfz-potsdam.de> writes:

> How to use HTTP::Daemon with authentication?

use HTTP::Daemon;
use HTTP::Status;

$d = new HTTP::Daemon;
print "Please contact me at: <URL:", $d->url, ">\n";
while ($c = $d->accept) {
    $r = $c->get_request;
    if ($r) {
	my($user, $pass) = $r->authorization_basic;
	unless ($user && auth_ok($user, $pass)) {
	    $c->send_basic_header(RC_UNAUTHORIZED);
	    $c->print('WWW-Authenticate: Basic Realm="XYZZY"');
	    $c->send_crlf;
	    $c->send_crlf;
	    undef($c);
	    next;
	}

	# We now have an authorized user
	if ($r->method eq 'GET' and $r->url->path eq "/xyzzy") {
	    # this is *not* recommened practice
	    $c->send_file_response("/etc/passwd");
	} else {
	    $c->send_error(RC_FORBIDDEN)
	}
    }
    $c = undef;  # close connection
}

sub auth_ok
{
    my($user, $password) = @_;
    return 1 if $user eq "aladdin" && $password eq "open sesame";
    0;
}

-- 
Gisle Aas


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

Date: Mon, 16 Feb 1998 13:16:56 -0600
From: Chris_Schoenfeld@sonic.net
To: aml@world.std.com
Subject: Re: Interpeter For The PC
Message-Id: <6ca3b8$44u$1@nnrp2.dejanews.com>

Possible, but unadvisable for several reasons:

1. Typing arguments gets old FAST.
2. This doesn't help debug your HTML rendering.
3. Some things are best known rather than assumed: such as env. vars.
4. You can still run from command-line whenever you want.
5. Installing a windows webserver is easier to do than not to do - and the
experience of installing, configuring, and maintaining it is a good skill to
have.

Chris

In article <EoH82z.Mrw@world.std.com>,
  aml@world.std.com (Andrew M. Langmead) wrote:
>
> Chris Schoenfeld <chris@ixlabs.com> writes:
>
> >You will need to install a webserver on your PC - I don't know of any
> >free ones offhand but I know there are some fine ones which do exist.
>
> You do not need a HTTP server to run perl scripts on Windows. Even
> ones that implement the CGI protocol.
>
> You can use the "offline mode", if you use the CGI.pm module.
>
> You can set whatever environment variables, command line arguments,
> and other input that the HTTP server would.
>
> Both of these methods have the advantage that you can use the perl
> debugger on your code.
>
> --
> Andrew Langmead
>


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


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

Date: Mon, 16 Feb 1998 20:06:06 -0600
From: Kimbrough Gray <kigray@cs.utexas.edu>
Subject: newbie question about reloading a web page through perl
Message-Id: <34E8F08E.183@cs.utexas.edu>

I have a perl script that updates a unix file called page2.html.
I also have a link to page2.html on my web page.  My problem is
that if the user has visited page2.html recently when they return
to page2.html their browser will not display the changes until
they hit the reload button on their browser.  Is their anyway
one can force the browser to reload through perl.  

kigray@cs.utexas.edu
Kimbrough Gray


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

Date: 17 Feb 1998 07:26:45 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: on reading FAQs and gurus answering questions
Message-Id: <6cbe3l$8mn$1@news.orst.edu>

In article <34E814CB.32942E70@5sigma.com>,
Joseph N. Hall <joseph@5sigma.com> wrote:
>I personally favor the absence of a mainstream unmoderated group.

Why do you care? The "noise" won't be a problem for you, because 
you won't be reading it. What could possibly be the reason?

>The problem is that the endless blather in the group has long
>driven off smart, lazy people and is very taxing to the smart,
>industrious crowd.  

So they get driven into the moderated group and you win. Or are you
worried that the smart lazy people aren't going to use a group where
they have to hand their email addresses to spammers on a silver
platter?




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

Date: Mon, 16 Feb 1998 15:01:09 +0100
From: Stefan Wimmer <swimmer@digital.de>
Subject: Re: on reading FAQs and gurus answering questions
Message-Id: <34E846A5.2781@digital.de>

Hi, 

First of all I have to admit 2 facts:

1. I'm starting to learn Perl
2. English isn't my native language

=> So please be patient while reading but read!

Second, I understand the complaints of all the helpfull and wise people
who know the answers to almost all the questions posted here and who are
now more and more bothered to find only FAQS etc. It is a shame to see
what's happening to c.p.l.m the last few weeks. And of course it's the
fault of all the clueless novices who don't care any rules - neither
netiquette nor common sense.

I never posted any question to solve one of my tiny little beginners
problems, because I found solutions in the FAQs or in the (unfortunately
decreasing) useful answers to NOT clueless questions (this isn't good or
any english - I know =8-). 

BUT - I really enjoy to parse this newsgroup in a way of hunting &
collecting informations and thus learning how to use Perl. It IS a
helpfull tool to understand the ways of Perl and it would be a great
loss for me and other people who endeavour seriously to lean Perl. 

Are there any chances to keep this information flow running?

A simple question: isn't it possible to still ignore (with a little help
from killfiles etc.) those clueless postings?

I'd really appreciate to continue learning by reading this NG and
perhaps (in the distant future =8-) answering some questions.

Best regards
Stefan

-- 
Stefan Wimmer				Technical Consultant
Digital Equipment GmbH			Tel:	089/9591-4459
Freischuetzstr. 91			Fax:	089/9591-1050
81927 Muenchen				email: 	swimmer@digital.de

		"Never touch a running systemmanager ..."


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

Date: 16 Feb 1998 22:40:14 GMT
From: burt@ici.net (Burt Lewis)
Subject: Pattern Matching ???
Message-Id: <6caf8e$nda$1@bashir.ici.net>

Hi,

Am having trouble getting the following to work correctly.

I'm using this:

if ("doris" =~ m/doris/i)

This will hit on d, do, dor, dori, doris - which is fine but I also want it 
to match on anything after doris, like doriss or dorisabc.

Appreciate any help with this.

Thanks!

Burt Lewis



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

Date: 17 Feb 1998 01:43:35 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Pattern Matching ???
Message-Id: <6caq07$5kj$5@comdyn.comdyn.com.au>

In article <6caf8e$nda$1@bashir.ici.net>,
	burt@ici.net (Burt Lewis) writes:
> Hi,
> 
> Am having trouble getting the following to work correctly.
> 
> I'm using this:
> 
> if ("doris" =~ m/doris/i)
> 
> This will hit on d, do, dor, dori, doris - which is fine but I also want it 
> to match on anything after doris, like doriss or dorisabc.

It won't hit on anything. You have two constants there. They don't
change. 

First of all, you will need to specify what you want to happen. Do you
want to match a string with doris in it? doris at the beginning? Any
subset of doris from the start of doris (d, do, dor...)? What do you
want to match?

$var =~ /doris/i

Will match 'doris', 'look at doris', 'doris is a name', 'hey, doris,
hey', or capitalised versions of that.

$var =~ /^doris/i

Will match any string starting with doris.

You really should read up on perl regular expressions.

perldoc perlre

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 
Commercial Dynamics Pty. Ltd.       | What's another word for Thesaurus?
NSW, Australia                      | 


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

Date: Tue, 17 Feb 1998 01:53:02 GMT
From: dma@adscape.com
Subject: PERL Programmer needed
Message-Id: <34ebed55.23510814@news2.new-york.net>

for development project. Please be familiar with the latest release of
PERL and sockets, specifically.
Please reply with tel# and best time to call.

DA


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

Date: 17 Feb 1998 01:46:21 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: perlshop with cybercash
Message-Id: <6caq5d$5kj$6@comdyn.comdyn.com.au>

In article <6calie$hp3$1@nnrp1.dejanews.com>,
	airpix@hotmail.com writes:
> We are using perlshop.  It works well, but we are having trouble interfacing
> with cybercash.  Please help if you can.  Need no know how to put the cart
> into a this cart type id and carry it on into cybercash's invoice.

This has nothing to do with the Perl language at all. Contact the
authors of perlshop.

Do you ask questions about perl on comp.lang.c, simply because perl is
written in c?

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | For heaven's sake, don't TRY to be
Commercial Dynamics Pty. Ltd.       | cynical. It's perfectly easy to be
NSW, Australia                      | cynical.


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

Date: 16 Feb 1998 22:48:05 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: Q: Storing complex records in DBM files
Message-Id: <slrn6eh520.9g0.sitaram@ltusitaram.unidata.com>

On Mon, 16 Feb 1998 09:42:57 +0100, Boris Boehlen
<boris@i3.informatik.rwth-aachen.de> wrote:
>Hi,
>
>I'd like to know how I can store a complex record using one of the DBM
>modules. Since the records might be very large I want use the GNU or
>Berkley DBM.
>
>The records I'd like to store contain some scalar and array fields. All
>my attempts to use the GDBM or MLDBM module failed, because I don't
>understand how perl the treats the arrays in my record.

Look on CPAN for "MLDBM".  Was meant to do just that, I think.


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

Date: Tue, 17 Feb 1998 01:43:29 GMT
From: farber@f-tech.net (Paul Farber)
Subject: Retrieving mail from host
Message-Id: <34e8ea7a.11827036@news.f-tech.net>

Hello all,

I need to take delivered mail (from /var/spool/mail/$username) and
take the message out of the header and do some processing with it. 
Basically, I want to send commands to a script via e-mail.  For
example, if an e-mail comes in and has "add this line to the page", I
want to remove the message and then pass it on to a script. Easy???

Well, does perl have a module or something that will just return teh
message of an e-mail????

Anyone do anything like this??

thanks 

Paul


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

Date: Mon, 16 Feb 1998 21:06:10 -0600
From: SmallWorks <gameday@uslink.net>
Subject: script won't run...displays script text
Message-Id: <34E8FEA2.C7D140F1@uslink.net>

how do i make my perl script run?

UNIX system...
I've uploaded the script file via ftp...
I've used chmod 755 on the file name and checked that using the command
ls -l...

I know the 'action' in the HTML page is correct (directory-wise) because

the script does display as text.

I'm using cgi-lib.pl with require "cgi-lib.pl"; in the script...

any response greatly appreciated,

Kelly Monsrud





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

Date: 17 Feb 1998 00:59:51 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Stripping HTML tags in 5.004
Message-Id: <6cane7$l2i$1@client3.news.psi.net>

Russ Allbery (rra@stanford.edu) wrote on 1630 September 1993 in
<URL: news:m3btw7e6fl.fsf@windlord.Stanford.EDU>:
++ [ Posted and mailed. ]
++ 
++ Andrew Haylett <ajh@primag.co.uk> writes:
++ 
++ > "perldoc perlfaq9" yields the RE s/<(?:[^>'"]*|(['"]).*?\1)*>//gs,
++ > which works fine in 5.001 but bites the dust in 5.004 ("regexp *+
++ > operand could be empty").
++ 
++ At least by my eyeballing of it, s/<(?:[^>'"]+|(['"]).*?\1)*>//gs should
++ be equivalent and not have that problem.

But it strips too much.  'a < b' is pure data.

On the other hand, it strips too little:
   <!--> This is a comment <!-->



Abigail
-- 
perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-


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

Date: 17 Feb 1998 01:03:05 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: The Young Man and the Beach
Message-Id: <6cank9$l2i$2@client3.news.psi.net>

Richard Bellavance (charlot@CAM.ORG) wrote on 1630 September 1993 in
<URL: news:6c9vi7$rcl@ocean.CAM.ORG>:
++ 
++ "posting to usenet" and "having an account on someone else's machine" are two
++ different things.  (of course, you need an account to access Usenet...) 
++ What I meant to say is that if you have an Internet account, you have the right
++ to post a message to Usenet.  Do note that I don't mean anyone *should* post
++ anything anywhere, but simply that one *can*.  Maybe I should say "anyone has
++ the right" instead of "posting is a right" ?


I guess you have the legal right to post. But noone has the right to
get his/her question answered, or to not be ridiculed for posting
FAQs or off topic postings.


Abigail
-- 
No one has the right not to be insulted.  //John Cleese.


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

Date: 16 Feb 1998 21:10:24 -0500
From: charlot@CAM.ORG (Richard Bellavance)
Subject: Re: The Young Man and the Beach
Message-Id: <6carig$b5f@ocean.CAM.ORG>

In article <6cank9$l2i$2@client3.news.psi.net>,
Abigail <abigail@fnx.com> wrote:
>
>I guess you have the legal right to post. But noone has the right to
>get his/her question answered, or to not be ridiculed for posting
>FAQs or off topic postings.
>

I never said, or even implied such a thing !  In fact, I agree completely with
the above statement.  In my first message in this thread, I was pointing
out the fact that posting is something to be done responsibly.  I'm not
trying to defend the posters of FAQs here...

Richard, hoping that the moderated group will become a reality.
-- 
Richard Bellavance -- charlot@cam.org -- http://www.cam.org/~charlot/
    "All along this path I tread  /  My heart betrays my weary head
     With nothing but my love to save / From the cradle to the grave"
                                 (Eric Clapton, "From the cradle")


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

Date: Mon, 16 Feb 1998 14:16:29 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: The Young Man and the Beach
Message-Id: <fl_aggie-1602981416290001@aggie.coaps.fsu.edu>

In article <EoHCFI.GK4@world.std.com>, c28f62@world.std.com (Mark Kramer) wrote:

+ In article <fl_aggie-1402981550230001@aggie.coaps.fsu.edu>,
+ I R A Aggie <fl_aggie@thepentagon.com> wrote:
+ >Is there anything wrong with being a "dirty beggar" or a shoeless child?
+ >Don't think so. 
+ 
+ Then you don't agree with the fable? Tom msde it pretty clear that
+ these were the "bad guys".
+ 
+ >On the other hand, if they are unwilling to help themselves,
+ >why should I be bothered to help them?

+ And if they are willing to help themselves?

Then I'm willing to help them.
 
+ >I'm _sure_ they'll thank you. Eventually. Maybe.
 
+ Well, I would have thought that those who got lumped int the class of
+ "rabble" who weren't would say "thank you", but I guess you won't. Did
+ I forget to mention, YOU were on the beach the day the Young Man saw
+ all the rabble.

Yeah, I was. I was the guy on the end of the pier, catching his dinner,
offering the occasional tip or story to my fellow fishers. I didn't bother
the Young Man, unless there was a mishap with a cast of line...
 
+ >I myself post from one of those "wrong newsreaders". I am also very
+ >concious of my formatting...
 
+ Good for you. I bet you would be unhappy if you got flamed for using
+ shitty software and being clueless because you did.

Not really. You see, I have a life...
 
+ >+ You tell me, Mr. Barr. Which is it?
+ >
+ >I suspect that your pride has been hurt.
+ 
+ That is usually the result of being insulted without cause.

Its usually the result of having too much pride...

James

-- 
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>


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

Date: 17 Feb 1998 01:56:50 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Using HTML Tags in forms (Content Type)
Message-Id: <6caqp2$5sl$6@marina.cinenet.net>

JesusDLG wrote: 
: I'm looking for a Mailing List script and I want to inlude some HTML Tags
: in my message. Can anyone know a "free" script that handle this? 

The question of whether anyone can know this belongs on an epistemology 
or ontology newsgroup. :-)

More seriously, it's not clear what you mean by 'a mailing list script'.  
What specific problem are you trying to solve?  If you just want to emit 
HTML in a more Perl-ish way, check out CGI.pm.  It's free, but it's not a 
standalone app, but rather a library of tools for building your app.

: If so, where 
: can I find it?

CGI.pm and other Neat Stuff can be found on CPAN.  See www.perl.com.

: Also, I'm doing some test modyifing some free scripts that I found on the 
: net, and perhaps someone can help me with an answer, Did I need to have 
: something in my server to handle HTML Tags in my forms? or just I need to 
: modify or include the Contet-Type... in the script?

>From Perl's point of view, HTML is just text going to stdout (or 
wherever); it has no intrinsic knowledge of HTML syntax and conventions.  
CGI.pm provides this knowledge (and a lot of support).  For outputing the 
content type header, if you're generating an HTML page,

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

will always do the job.  Or, if you're using CGI.pm (with :all imported),
just

  print header;

: I need that my users receive an email like a WebPage. Something like a I 
: fill a field named message with some HTML code and my user receive an
: email in HTML format. 

Hrm.  Still need a better description, please.

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Mon, 16 Feb 1998 20:57:20 -0500
From: jdf@pobox.com (Jonathan Feinberg)
Subject: Re: Using HTML Tags in forms (Content Type)
Message-Id: <MPG.f52b88b8843fd279896e2@news.concentric.net>

  [courtesy cc of this posting sent to cited author via email]

JesusDLG said...
:     Any comments or suggestions will be really apreciatte it.

If you say so...

<flame href="http://www.perl.com/" target="_cited_author" strength="mild">
Comments: The people who constitute this newsgroup cannot teach you the 
fundamental concepts of the Perl language, HTML, or CGI scripting.  The 
problems you are trying to solve are trivial once you have basic knowledge of 
these things.  It *appears* that you haven't done any work towards obtaining 
the answers to your questions yourself.
</flame>

Suggestions: Go to http://www.dejanews.com/ and search for some of the words 
that relate to your questions.  Do the same at http://www.yahoo.com/ .  Buy 
some books on Perl, CGI, and HTML.  Read the documentation that comes with 
Perl.  Avoid posting questions on this newsgroup that are either FAQs or 
unanswerable because of their breadth.

Oh yeah, go to Matt's Script Archive and get formmail.pl.  It does what you 
want.  But you already have to know HTML, CGI scripting, and a little Perl.

    http://www.worldwidemart.com/scripts/

And then if you have any trouble configuring it, or getting it to work, then 
go to news://comp.infosystems.www.authoring.cgi .
-- 
#!/usr/bin/perl -w -- Just another Perl hacker,
 (open 0),$_=<0>,s,.*-+ ,,,chop;for(split?@*?){($$_++or$}=$_,y,
 y \,y,<STDIN>,,eval"sub $_ {print'$}'}"),y,} \,},>STDOUT,,&$_}
# Jonathan Feinberg    jdf@pobox.com    Sunny Brooklyn, NY


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

Date: 17 Feb 1998 02:02:48 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Using HTML Tags in forms (Content Type)
Message-Id: <6car48$lk3$2@client3.news.psi.net>

JesusDLG (JesusDLG) wrote on 1630 September 1993 in
<URL: news:6caidv$6bm@edrn.newsguy.com>:
++  
++     This it's my 1st. post and probably you can give a hand with this:

Please, before your next post, subscribe to news.announce.newusers
and read the posting there, specially those about off topic postings
and how to find the right newsgroup.

This group is about growing cucumbers, not about HTML.



Abigail
-- 
perl -wle '$, = " "; sub AUTOLOAD {($AUTOLOAD =~ /::(.*)/) [0];}
           print+Just (), another (), Perl (), Hacker ();'


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

Date: 17 Feb 1998 01:51:08 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: WANTED UK PEARL SCRIPT PROGRAMER
Message-Id: <6caqec$5kj$7@comdyn.comdyn.com.au>

In article <34E8A153.7E3@dotuk.com>,
	"www.DotUK.com" <info@dotuk.com> writes:

> We are a design company looking for a UK based PEARL wizard. 

YAY! Finally someone who needs my year long experience in PEARL. And
everyone told me I was crazy when I learned it, like they told me when
I got into COBBOL, PACSAL, LIPS, FORTAN and Visual Basic.

Now, if only someone would need my Visual Basic experience.

> We need to have someone on hand to develop scripts for our client's web
> sites when requied. It would suit someone in full time job and would
> like to earn some extra money for a couple of hours work here and there.
> We could offer our service in return.

I am requied! very requied. I'll emigrate. I have lots of couple of
hours.

> Please email us DIRECT with your experience and what services you can
> offer us.

I don't know yet how to email. I just got the hang of this FREE
newsgroup thing.

> We look forward to hearing from you soon.

Me too!

Duh.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Begin at the beginning and go on till
Commercial Dynamics Pty. Ltd.       | you come to the end; then stop.
NSW, Australia                      | 


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

Date: 17 Feb 1998 01:29:37 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: what is exaclty the "_" Variable ?!?!
Message-Id: <6cap61$5kj$3@comdyn.comdyn.com.au>

In article <34E8360E.372D71FF@uni-oldenburg.de>,
	Claus van de Vlierd <vlierd@uni-oldenburg.de> writes:
> I did not find in Larry Wall's "Programming Perl" - book
>   (O'Reilly , second edition , September 1996) a precise
>  definition of this (at least for me ..) strange Variable "_" .

It's in there.

It's also in the documentation shipped with perl

perldoc perlvar
look for $_

Martien
-- 
Martien Verbruggen                  | My friend has a baby. I'm writing down
Webmaster www.tradingpost.com.au    | all the noises the baby makes so later
Commercial Dynamics Pty. Ltd.       | I can ask him what he meant - Steven
NSW, Australia                      | Wright


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

Date: 16 Feb 1998 19:30:11 GMT
From: karrer@ife.ee.ethz.ch (Andreas Karrer)
Subject: Re: Why is Tom Christiansen so rude?
Message-Id: <slrn6eh4ti.8dn.karrer@sax.ee.ethz.ch>

In article <6c7tbu$rng@gap.cco.caltech.edu>, Shimpei Yamashita wrote:
>Rich Grise  <lovegod@earthling.net> writes:
>>Jonathan Stowe wrote:
>>> In article <6bv95t$ira$1@csnews.cs.colorado.edu>, tchrist@mox.perl.com
>>> says...
>>> >For this, Ken invented grep.
>>> This probably is not why Bill G. "invented" the happless find though ;-{
>>I've heard, "There are two notable things that have come from Berkely in
>>this century. LSD and Unix. We do not believe this to be a coincidence."
>
>Almost.
>s/Berkely/Berkeley/
>s/Unix/BSD/

And LSD wasn't discovered at Berkeley, but was first synthesized by
Albert Hofmann, in 1938, at Sandoz (now part of Novartis), in Basel,
Switzerland.

The people over in alt.folklore.urban would call this a FOAF.   

 - Andi


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

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

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