[18514] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 682 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 12 06:05:44 2001

Date: Thu, 12 Apr 2001 03:05:15 -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: <987069914-v10-i682@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 12 Apr 2001     Volume: 10 Number: 682

Today's topics:
    Re: $text in a text file - how do I get it to print? <moiraine:-P@qwest.net>
    Re: A CGI question <comdog@panix.com>
        A_Geekette is a stupid wench <moiraine:-P@qwest.net>
    Re: Can I communicate with cgi? (Logan Shaw)
    Re: changing @INC permenently nobull@mail.com
    Re: Empty Parenthesis Evaluting to True -- WHY? (Logan Shaw)
    Re: Executing Perl script from C or C++ program. <zonnebloem@zonnet.nl>
        File Upload <ixanthi@ixanthi.gr>
        How can a SMTP mail be deleted from a Unix mailbox by a <ELF@Messer.de>
    Re: How can a SMTP mail be deleted from a Unix mailbox  (Logan Shaw)
    Re: How can I use a variable variable name? (Damian James)
    Re: How can I use a variable variable name? <uri@sysarch.com>
    Re: How to send a formatted string through a socket? (Tassilo v. Parseval)
    Re: How to send a formatted string through a socket? (Anno Siegel)
    Re: inheritance within one file? <uri@sysarch.com>
        Is a function/class library for processing of SMTP-mail <ELF@Messer.de>
    Re: Is a function/class library for processing of SMTP- <comdog@panix.com>
    Re: Is a function/class library for processing of SMTP- (Logan Shaw)
        mailing list for general Perl discussion? (F. Xavier Noria)
    Re: mailing list for general Perl discussion? <comdog@panix.com>
    Re: online editing of a text form (Bernard El-Hagin)
        Perl script using sFTP <mmonteiro@skysoft.pt>
    Re: Perl script using sFTP (Logan Shaw)
        post to my yahoo/hotmail accounts via automatic scipt? (cRYOFAN)
    Re: post to my yahoo/hotmail accounts via automatic sci <comdog@panix.com>
    Re: Regex: Finding multiple targets <p.carmichael@btinternet.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 12 Apr 2001 01:09:05 -0700
From: Elizabeth <moiraine:-P@qwest.net>
Subject: Re: $text in a text file - how do I get it to print?
Message-Id: <3AD562A0.5235C660@qwest.net>

brian d foy wrote:

> if you can't be bothered to test your code please stop posting
> it.

I step back with a humble apology.  You are absolutely right.  Besides
the lack of semi-colon and the added colon after die (duh), I made a
blunderous error.




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

Date: Thu, 12 Apr 2001 01:50:20 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: A CGI question
Message-Id: <comdog-23EFF5.01502012042001@news.panix.com>

In article <987043406.28371.0.nnrp-01.c2ded7c2@news.demon.co.uk>, "Karl 
Young" <karlyoung@unconscious.co.uk> wrote:

> Hi Alan, I am a newbie here & a newbie to Perl & CGI. I read your comments
> about CGI questions being unwelcome here, but then plenty of people answered
> the question. Also there doesn't seem to be a Perl CGI group (or if there is
> my newserver doesn't carry it). 

comp.infosystems.www.authoring.cgi.

in general, if there is a more specific newsgroup, that's where the
questions should go.  indeed, that's why they exist.

> I have also been browsing c.l.perl.modules ,
> this is a much lower traffic newsgroup than c.l.perl.misc & what if one is
> not using CGI.pm? 

> It is hard for newbies to find answers & I think it is sad

use the CGI Meta FAQ

    http://www.sri.net/public/CGI_MetaFAQ.html

> if CGI questions aren't welcome here.

go to the other newsgroup.  

> What does the misc stand for anyway?

miscellaneous, connoting "not contained in other topics".  

> Is CGI not covered under misc? 

there is a more specific group mentioned above.  

> I would be interested to know what the
> consensus is in this group as I would hope to be able to learn a lot from
> people here.

Alan has told you already.

-- 
brian d foy <comdog@panix.com>



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

Date: Thu, 12 Apr 2001 01:46:06 -0700
From: Elizabeth <moiraine:-P@qwest.net>
Subject: A_Geekette is a stupid wench
Message-Id: <3AD56B4E.8D22BB52@qwest.net>

I apologize for fscking up so much and typing before thinking.  I'll
just lurk and learn the ropes.  Thank you to those who have been patient
with me.

Elizabeth Crawford Johnson
A stupid wench.


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

Date: 11 Apr 2001 23:19:07 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Can I communicate with cgi?
Message-Id: <9b3abr$1lt$1@charity.cs.utexas.edu>

In article <9b37nh$hj5@netnews.hinet.net>,
jackkon <jackkon@pchome.com.tw> wrote:
>Many html page use cgi to get the user's name and password.
>I am just interested if some method to communicate with the cgi?
>In perl, how can I do that?

Do you mean that you want to write a program that acts like
it is a web browser?  If so, you want to use libwww-perl.
See http://www.linpro.no/lwp/ .  Also see
http://search.cpan.org/search?mode=dist&query=libwww-perl .

  - Logan
-- 
my  your   his  her   our   their   _its_
I'm you're he's she's we're they're _it's_


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

Date: 12 Apr 2001 08:45:42 +0100
From: nobull@mail.com
Subject: Re: changing @INC permenently
Message-Id: <u9wv8q5y3w.fsf@wcl-l.bham.ac.uk>

Kim C <kimmfc@mydeja.com> writes:

> Is there a way to permanently add a path to @INC

> I'm running ActivePerl 5.6 on w2k.

I asked this exact same question here a couple of weeks ago yet for
some reason I does not appear on groups.google.com.  Deja was much
better.

Look for the word "registry" in the "perlwin32" manual.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 11 Apr 2001 23:23:35 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Empty Parenthesis Evaluting to True -- WHY?
Message-Id: <9b3ak7$1mk$1@charity.cs.utexas.edu>

In article <3AD5272C.9FAEDE76@cfl.rr.com>, tuxy  <nospam@cfl.rr.com> wrote:
>Randal it prints
>
>
>  perl x.pl
>  Just another Perl hacker,[tux@tuxxe ~]$ 
>
>so what?

http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?japh

  - Logan
-- 
my  your   his  her   our   their   _its_
I'm you're he's she's we're they're _it's_


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

Date: Thu, 12 Apr 2001 11:42:33 +0200
From: Jurgen Boerboom <zonnebloem@zonnet.nl>
Subject: Re: Executing Perl script from C or C++ program.
Message-Id: <3AD57889.E09A1C88@zonnet.nl>

Sorry about the format, but it should be better now..

I donīt see any reason for you to be shocked. Parts of this world are
different: Like being implemented in C. And as this is a fact there
might sometimes be a need to interface from C īTOī  Perl, especially as
I as Perl programmer would like to implement the required fuctionality
in Perl.

The alternative is to re-write PVCS Dimensions in Perl. I dont think
this is an alternative, or are you offering ....

regards,

Jurgen


Gwyn Judd wrote:
> 
> I was shocked! How could Jurgen Boerboom <zonnebloem@zonnet.nl>
> say such a terrible thing:
> ><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
> ><html>
> >I&acute;m struggling creating a C program that executes a perl script from
> >a file. I have gone through the Perl docs several times, tried several
> >things, but can get the grip on it. (See my posting of&nbsp; Thu, 01 Mar
> >2001 16:00:46)
> ><p>Can any body tell if it has been done before and maybe provide me with
> >a coding example.
> 
> This isn't really a Perl question. You might have better luck posting to
> a C/C++ newsgroup. Given that, you probably want to use the system(3) or
> exec(3) functions. And please post in plain text next time.
> 
> --
> Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
> When life hands you a lemon, it rarely offers a glass.


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

Date: Thu, 12 Apr 2001 10:59:57 +0300
From: "Vassilis G. Tavoultsidhs" <ixanthi@ixanthi.gr>
Subject: File Upload
Message-Id: <987062486.536837@athnrd02.forthnet.gr>

I am trying to create a cgi script which will send among other things and a
file to the server in a specified location. I have made the form in HTML but
I don't know how to handle the file which I get from it in order to send it
to my server. Anybody who has any idea please help.

Thank you

ixanthi@ixanthi.gr




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

Date: Thu, 12 Apr 2001 09:04:27 +0100
From: "Markus Elfring" <ELF@Messer.de>
Subject: How can a SMTP mail be deleted from a Unix mailbox by a script?
Message-Id: <9b3k0i$47k$1@news.messer.de>

I've written a script that processes a SMTP mail to import it into another
system after it was piped by the forward command (see "man forward"). The
script should delete the original message from the inbox or mailbox after a
successful import.

- How can the mail deleted with the use of the Unix commands "mail" or
"mailx" in the preferred programming languages "bash", "Perl", "PHP" or
"TCL"?
- What actions must be performed to remove the specific mail from the mbox
file?




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

Date: 12 Apr 2001 02:44:33 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: How can a SMTP mail be deleted from a Unix mailbox by a script?
Message-Id: <9b3md1$2hr$1@charity.cs.utexas.edu>

In article <9b3k0i$47k$1@news.messer.de>, Markus Elfring <ELF@Messer.de> wrote:
>I've written a script that processes a SMTP mail to import it into another

The phrase "SMTP mail" doesn't make sense.  SMTP is a protocol
(specifically, a way of transporting something); mail is what it
transports.  Saying "a SMTP mail" is like saying "a FedEx golf club".

(Maybe you mean regular Internet e-mail, in which case it would make
more sense to say "an RFC-822 mail".)

>system after it was piped by the forward command (see "man forward"). The
>script should delete the original message from the inbox or mailbox after a
>successful import.

If you used the .forward file to specify that the message goes to a
program, it should go to the program and not to a mailbox.  That is,
unless you specified that the message should go to both, but I don't
know why you'd send it to two places and do nothing but immediately
delete it from one.

>- How can the mail deleted with the use of the Unix commands "mail" or
>"mailx" in the preferred programming languages "bash", "Perl", "PHP" or
>"TCL"?

If you really have to delete a mail message from a mailbox, there are
Perl modules that can load a mailbox, separate it into messages, let
you do things with the list of messages (like delete some of them), and
then write the updated set of messages back to the mailbox file.

>- What actions must be performed to remove the specific mail from the mbox
>file?

It's a file.  It's in a certain format.  You just have to understand
the format, be able to parse it, and be able to write a modified
version out.

  - Logan
-- 
my  your   his  her   our   their   _its_
I'm you're he's she's we're they're _it's_


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

Date: 12 Apr 2001 04:37:02 GMT
From: damian@qimr.edu.au (Damian James)
Subject: Re: How can I use a variable variable name?
Message-Id: <slrn9dac53.ol6.damian@puma.qimr.edu.au>

tuxy chose Thu, 12 Apr 2001 02:56:36 GMT to say this:
>Damian et al:
>
>Never having been misdirected by you in this group or at Open Source
>last year in Monterray, I'll take your advice and abandon the variable
>variable approach. I'll use a hashref instead and point it at the
>various hashes. Uncle!
>...
>PS See you in San Diego this summer?
>

Erm, I suspect you might have me mixed up with *another* Damian from
Australia. Note the surname. I can tell you right off, I am nowhere near
the Perl Guru he is (merely an Adept: search for 'The Seven Steps to Perl
Mastery' on google).

I guess this was bound to happen sooner or later. 

Cheers,
Damian
-- 
Damian James       //  Systems Developer
Queensland Institute of Medical Research
damian@qimr.edu.au //    +61 7 3362 0253


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

Date: Thu, 12 Apr 2001 05:38:32 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: How can I use a variable variable name?
Message-Id: <x7lmp6oexy.fsf@home.sysarch.com>

>>>>> "DJ" == Damian James <damian@qimr.edu.au> writes:


  DJ> Erm, I suspect you might have me mixed up with *another* Damian
  DJ> from Australia. Note the surname. I can tell you right off, I am
  DJ> nowhere near the Perl Guru he is (merely an Adept: search for 'The
  DJ> Seven Steps to Perl Mastery' on google).

i was wonder what that exchange was about. but if you want to meet and
learn from damian conway, check out the class in boston below.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info:     http://www.sysarch.com/perl/OOP_class.html


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

Date: 12 Apr 2001 07:14:21 GMT
From: Tassilo.Parseval@post.rwth-aachen.de (Tassilo v. Parseval)
Subject: Re: How to send a formatted string through a socket?
Message-Id: <9b3kkd$70p$1@nets3.rz.RWTH-Aachen.DE>

On Wed, 11 Apr 2001 18:00:10 GMT, Chris Fedde <cfedde@fedde.littleton.co.us> wrote:
>It looks to me that something is missing from your explanation.  I expect
>that you are using Term::ANSIColor which eplains the "BLUE, GREEN" stuff.
>You don't describe what sort of socket we are talking about or, unless I
>missed it, what os you are running under.  More data and a small but
>comlete bit of test code that exibits the problem would help us help you.

True, my program is using Term::ANSIColor. I'll try to give some snippets of 
code which is a little bit tricky since the whole matter is split into loads
of modules.
The whole stuff is supposed to run under Linux.

# The server goes like that:

use Socket;
sub start_server {

        my $port = shift || 9876;
	my $proto = getprotobyname('tcp');

	socket SERVER, PF_INET, SOCK_STREAM, $proto   || die "socket: $!";
  	bind SERVER, sockaddr_in($port, INADDR_ANY)   || die "bind: $!";
	listen SERVER, SOMAXCONN                      || die "listen: $!";

	print "server started on port $port";

	my $paddr;

	for ( ; $paddr = accept(CLIENT,SERVER); close CLIENT) {

		my($port,$iaddr) = sockaddr_in($paddr);
		my $name = gethostbyaddr($iaddr,AF_INET);
		recv CLIENT, my $msg, 1000, 0;
														    my @ret = some_function($msg);
	}

	send CLIENT, $_, 0 for (@ret);

}

# client

use Socket;
use Term::ANSIColor qw(:constants);

my ($remote,$port, $iaddr, $paddr, $proto, $line);
$remote = 'localhost';
$port    = 9876; 
$iaddr   = inet_aton($remote)
$paddr   = sockaddr_in($port, $iaddr);
$proto   = getprotobyname('tcp');

socket(SOCK, PF_INET, SOCK_STREAM, $proto)  || die "socket: $!";
connect(SOCK, $paddr)    || die "connect: $!";

send SOCK, $ARGV[0]."\r\n", 0;

# and now I am trying to somehow deal with the response

my @reply;
while (defined($line = <SOCK>)) {
        push @reply, $line;
}

printf @reply;
print "\n";
print @reply; # just to test whether I receive the whole array

close (SOCK)            || die "close: $!";
exit;

__END__

If some_function() returns 

(GREEN."%-8.8s%-8.8s%-8.8s%-8.8s\n".
 "%-8.8s%-8.8s%-8.8s%-8.8s\n".
 "%-8.8s%-8.8s%-8.8s%-8.8s",
 "a", "b","c", "d",
 "e", "f", "g", "h",
 "i", "j", "k", "l")

the client will print out:
%-8.8s%-%-8.8s%- 

%-8.8s%-8.8s%-8.8s%-8.8s
%-8.8s%-8.8s%-8.8s%-8.8s
%-8.8s%-8.8s%-8.8s%-8.8sabcdefghijkl

What I am probably looking for is a way to receive the server's reponse not by 
lines but by array-elements but I have no idea how to achieve that.  


I hope this helps. I wouldn't know how to make this clearer to you as you 
probably don't want me to post a few hundred lines of source.


Greetings,
Tassilo

-- 
In case of atomic attack, all work rules will be temporarily suspended.


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

Date: 12 Apr 2001 09:58:25 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How to send a formatted string through a socket?
Message-Id: <9b3u81$983$1@mamenchi.zrz.TU-Berlin.DE>

According to Tassilo v. Parseval <tassilo.parseval@post.rwth-aachen.de>:

[...]
 
> # The server goes like that:
> 
> use Socket;
> sub start_server {
> 
>         my $port = shift || 9876;
> 	my $proto = getprotobyname('tcp');
> 
> 	socket SERVER, PF_INET, SOCK_STREAM, $proto   || die "socket: $!";
>   	bind SERVER, sockaddr_in($port, INADDR_ANY)   || die "bind: $!";
> 	listen SERVER, SOMAXCONN                      || die "listen: $!";
> 
> 	print "server started on port $port";
> 
> 	my $paddr;
> 
> 	for ( ; $paddr = accept(CLIENT,SERVER); close CLIENT) {
> 
> 		my($port,$iaddr) = sockaddr_in($paddr);
> 		my $name = gethostbyaddr($iaddr,AF_INET);
> 		recv CLIENT, my $msg, 1000, 0;
> 														    my @ret = some_function($msg);
> 	}
> 
> 	send CLIENT, $_, 0 for (@ret);

This looks funny.  You are accepting any number of client requests
in the for loop, generating a reply to each in @ret, but you're
returning only the last reply (after the loop).  Is that how it's
supposed to work?

Further, you are sending the array elements with no delimiters between
them.  This means they will coalesce in the data stream.  There is
no way the receiving side can tell which part of the data came from
what call of send().

[part of client code snipped]

> my @reply;
> while (defined($line = <SOCK>)) {

Here you are reading the data in a line-oriented manner, but the
sending side made no efforts to control what goes in each line.

>         push @reply, $line;
> }
> 
> printf @reply;

You don't want printf here.  Use print.

> print "\n";
> print @reply; # just to test whether I receive the whole array
> 
> close (SOCK)            || die "close: $!";
> exit;
> 
> __END__
> 
> If some_function() returns 
> 
> (GREEN."%-8.8s%-8.8s%-8.8s%-8.8s\n".
>  "%-8.8s%-8.8s%-8.8s%-8.8s\n".
>  "%-8.8s%-8.8s%-8.8s%-8.8s",
>  "a", "b","c", "d",
>  "e", "f", "g", "h",
>  "i", "j", "k", "l")
> 
> the client will print out:
> %-8.8s%-%-8.8s%- 
> 
> %-8.8s%-8.8s%-8.8s%-8.8s
> %-8.8s%-8.8s%-8.8s%-8.8s
> %-8.8s%-8.8s%-8.8s%-8.8sabcdefghijkl
> 
> What I am probably looking for is a way to receive the server's reponse not by 
> lines but by array-elements but I have no idea how to achieve that.  

There are many ways to do that, but in any case you will have to
establish some sort of mini-protocol that sender and receiver use
to tell array elements from another.  A socket transfers an ASCII
stream, not Perl data.

If there is a character (or combination of characters) that *can't*
occur in the data you can insert that on the sending side between two
array elements.  The receiver can then split on this string to recover
the array structure.

Another more general method is to use one of the data-persistence
modules on CPAN (Data::Dumper, FreezeThaw or Storable).  All of
these transform a Perl data structure into an ASCII string that
can be sent over a socket.  The receiver uses the inverse function
to get the data structure back.  This way you can send the whole
array @ret in one go.

Anno


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

Date: Thu, 12 Apr 2001 04:45:03 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: inheritance within one file?
Message-Id: <x7ofu2ohf3.fsf@home.sysarch.com>

>>>>> "A" == Abigail  <abigail@foad.org> writes:

  A> Uri Guttman (uri@sysarch.com) wrote on MMDCCLXXX September MCMXCIII in
  A> <URL:news:x7wv8rnyhk.fsf@home.sysarch.com>:
  A> $$ 
  A> $$ that was similar to what i thought you meant. the problem i see is with
  A> $$ constructor name collision. that is why naming constructors 'new' and
  A> $$ using the direct method call with the class name never has a name space
  A> $$ problem or any ambiguity:
  A> $$ 
  A> $$ 	$obj = FOO->new() ;
  A> $$ 
  A> $$ can mean only one thing.
  A> $$ 
  A> $$ 	$obj = constructor( blah ... ) ;
  A> $$ 
  A> $$ is not clear what it is constructing. so the name needs to reflect the
  A> $$ class anyway and needs to be unique enough to not collide with other
  A> $$ similar names.

  A> FUD. Pure FUD. Of course can subs give name clashes, but then, so
  A> can classes. It's easier to deal with a name clash for an exported
  A> function though: don't run import. It's not so easy to deal with
  A> class name collision though.

tell that to CGI.pm which wanted to use the exported function tr() to
map to html <tr>. and lincoln ran into perl's tr/// causing him to
capitalize some of his funcs to Tr(), etc.

with class name collisions, you can tell more easily that it will
happen. one of the major CPAN rules is managing the class name space for
all cpan modules. if you mix your own modules and cpan's you may have an
rare collision. but if you use two cpan modules which both import the
same name, you can't always find that out quickly. you may have to
examine all the import stuff from all the modules you use in a file.
not importing stuff isn't a great win as you may only collide in one
function name and have to change all the rest of the code to use fully
qualified names. 

both are real issues but i think that that function name collisions
would be more common and more annoying to fix.

  A> Then the right way to tackle this perceived problem is to stay away
  A> from any module that exports anything. Because anything exported
  A> can lead to name clashes, that's not something that only happens
  A> when OO modules export something.

i agree with not importing, especially if you are using a OO design. but
you pointed out a way to import a constructor which breaks that very
rule. i am just trying to reinforce that rule somewhat.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info:     http://www.sysarch.com/perl/OOP_class.html


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

Date: Thu, 12 Apr 2001 09:01:54 +0100
From: "Markus Elfring" <ELF@Messer.de>
Subject: Is a function/class library for processing of SMTP-mails available?
Message-Id: <9b3jrp$47h$1@news.messer.de>

I've found the following:
> man forward
" ...
     If the first character of the address is a vertical bar (|),
     sendmail(1M)  pipes the message to the standard input of the
     command the bar precedes.
 ... "

I want to read this piped message to import it in one of our systems after
the sender and the subject had been checked.
Do you know a function or class library for a programming language (e. g.
PHP, TCL or Perl) that helps me to process this mail?




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

Date: Thu, 12 Apr 2001 03:12:23 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: Is a function/class library for processing of SMTP-mails available?
Message-Id: <comdog-8F5D3B.03122312042001@news.panix.com>

In article <9b3jrp$47h$1@news.messer.de>, "Markus Elfring" 
<ELF@Messer.de> wrote:

> I want to read this piped message to import it in one of our systems after
> the sender and the subject had been checked.
> Do you know a function or class library for a programming language (e. g.
> PHP, TCL or Perl) that helps me to process this mail?

see CPAN

    http://search.cpan.org

-- 
brian d foy <comdog@panix.com>



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

Date: 12 Apr 2001 02:31:34 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Is a function/class library for processing of SMTP-mails available?
Message-Id: <9b3lkm$2br$1@charity.cs.utexas.edu>

In article <9b3jrp$47h$1@news.messer.de>, Markus Elfring <ELF@Messer.de> wrote:
>I've found the following:
>> man forward
>" ...
>     If the first character of the address is a vertical bar (|),
>     sendmail(1M)  pipes the message to the standard input of the
>     command the bar precedes.
>... "
>
>I want to read this piped message to import it in one of our systems after
>the sender and the subject had been checked.
>Do you know a function or class library for a programming language (e. g.
>PHP, TCL or Perl) that helps me to process this mail?

This doesn't have anything to do with SMTP.  The SMTP part of the
process is separate from the local delivery part of the process.

Anyway, to do this in Perl, you don't need to do anything special to
read the mail message in; you just read the standard input.  Once
you've got the mail message, the Mail::Internet can parse it into
header and body for you, and you can use Mail::Header to examine the
header.  See http://search.cpan.org/search?dist=MailTools .

If you want to worry about MIME attachments, it's best to use a
completely different set of tools instead: the modules that come
as part of the MIME-tools distribution.  See
http://search.cpan.org/search?dist=MIME-tools for info on those.

  - Logan
-- 
my  your   his  her   our   their   _its_
I'm you're he's she's we're they're _it's_


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

Date: Thu, 12 Apr 2001 06:37:43 GMT
From: fxn@retemail.es (F. Xavier Noria)
Subject: mailing list for general Perl discussion?
Message-Id: <3ad54ba0.920265@news.iddeo.es>

Some mailing lists are mentioned in the FAQ but none of them
seems to be suitable for questions about Perl of the kind one
reads here in comp.lang.perl.misc... do you know of any?

-- fxn


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

Date: Thu, 12 Apr 2001 02:53:33 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: mailing list for general Perl discussion?
Message-Id: <comdog-3E57DA.02533312042001@news.panix.com>

In article <3ad54ba0.920265@news.iddeo.es>, fxn@isoco.com wrote:

> Some mailing lists are mentioned in the FAQ but none of them
> seems to be suitable for questions about Perl of the kind one
> reads here in comp.lang.perl.misc... do you know of any?

most Perl mailing lists are, um, listed, at 

    http://lists.perl.org

-- 
brian d foy <comdog@panix.com>



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

Date: Thu, 12 Apr 2001 06:35:11 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: online editing of a text form
Message-Id: <slrn9daj4f.puu.bernard.el-hagin@gdndev32.lido-tech>

On Thu, 12 Apr 2001 00:41:01 +0100, Simon Whittaker
<simonNOSPAM@swbh.net> wrote:
>I would like to be able to edit a file that is stored on my server through a
>www interface. I can only run cgi files from my cgi-bin and therefore cannot
>use backpage.cgi because I want to access a directory higher up than the
>cgi-bin. Is there another way around this?

You must have left out the part of your question that has to do with
Perl.

Cheers,
Bernard
--
perl -e'$\=qq;,\n;;s,,*Just.*another.*Perl.*hacker,e;%JaPh
=(q,*,,q, ,);s,((?:[\w]+?::)|\*),$JaPh{${((sin(32)**2)+
(cos(32)**2))}},gex;print;'


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

Date: Thu, 12 Apr 2001 09:17:35 +0200
From: Marta Monteiro <mmonteiro@skysoft.pt>
Subject: Perl script using sFTP
Message-Id: <3AD5568F.A28FEED@skysoft.pt>

Hello everyone,

I'm trying to develop a perl script that periodically transfers some
files from one machine to another using sFTP.

Since I'm a novice in Perl, I don't have a clue how it can be done.

Could you please help me?

Thank you in advance,

Marta.





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

Date: 12 Apr 2001 02:35:47 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Perl script using sFTP
Message-Id: <9b3lsj$2fb$1@charity.cs.utexas.edu>

In article <3AD5568F.A28FEED@skysoft.pt>,
Marta Monteiro  <monteiro@eumetsat.de> wrote:
>I'm trying to develop a perl script that periodically transfers some
>files from one machine to another using sFTP.

You didn't say what sFTP is, but based on a quick web search, it seems
that it's a curses-based ftp program for Linux.

Using Perl to drive this would be possible, but it would be pretty
difficult.  It would be much easier just to go to http://search.cpan.org/
and find a module that already knows how to do FTP itself, like say
Net::FTP (see http://search.cpan.org/search?module=Net::FTP ).

Hope that helps.

  - Logan
-- 
my  your   his  her   our   their   _its_
I'm you're he's she's we're they're _it's_


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

Date: Thu, 12 Apr 2001 05:11:17 GMT
From: cryofan@mylinuxisp.com (cRYOFAN)
Subject: post to my yahoo/hotmail accounts via automatic scipt?
Message-Id: <3ad537f7.98832905@news3.mylinuxisp.com>

I have a program that I need to demo as part of my senior project, and
it need to periodically send out an email. Problem is that at the
school where I need to demo this script, my email is via SMTP.
But the school has disabled SMTP relay, so I guess my only other
choice is to somehow send mail through my hotmail or yahoo accounts
via posting and logging onto my accounts via the webform.. Even this
even possible?



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

Date: Thu, 12 Apr 2001 01:51:29 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: post to my yahoo/hotmail accounts via automatic scipt?
Message-Id: <comdog-443CF7.01512912042001@news.panix.com>

In article <3ad537f7.98832905@news3.mylinuxisp.com>, 
cryofan@mylinuxisp.com (cRYOFAN) wrote:

> I have a program that I need to demo as part of my senior project, and
> it need to periodically send out an email. Problem is that at the
> school where I need to demo this script, my email is via SMTP.
> But the school has disabled SMTP relay, 

and how does that stop you from sending mail?

-- 
brian d foy <comdog@panix.com>



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

Date: Thu, 12 Apr 2001 10:00:21 +0100
From: "Patrick Carmichael" <p.carmichael@btinternet.com>
Subject: Re: Regex: Finding multiple targets
Message-Id: <9b3r0h$hhj$1@plutonium.btinternet.com>

Yes - I'm after the text found rather than the patterns.

The set of strings to be searched for come from a user-defined library - the
text itself is set - so what I'm after is something which will flag the
approximate or exact match in the text block when it is printed out and then
print out the 'found' strings rather like footnotes, in found order.

Thanks






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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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 V10 Issue 682
**************************************


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