[19840] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2035 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 30 09:05:38 2001

Date: Tue, 30 Oct 2001 06:05:13 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <1004450713-v10-i2035@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 30 Oct 2001     Volume: 10 Number: 2035

Today's topics:
        $^S value "sticks" in 5.6.1 - known bug ? (Miquel van Smoorenburg)
    Re: Can perl fill-in a web form without submitting it? <goldbb2@earthlink.net>
    Re: Can perl fill-in a web form without submitting it? <bart.lateur@skynet.be>
    Re: CGI param/regex difficulties <simon.oliver@umist.ac.uk>
    Re: challenge, how short can you make this? <invalid@mctech.org>
    Re: challenge, how short can you make this? <invalid@mctech.org>
    Re: challenge, how short can you make this? <invalid@mctech.org>
    Re: challenge, how short can you make this? <invalid@mctech.org>
    Re: challenge, how short can you make this? <invalid@mctech.org>
    Re: challenge, how short can you make this? <bart.lateur@skynet.be>
    Re: challenge, how short can you make this? <invalid@mctech.org>
        Configuring the Serial Ports (Misty)
    Re: Control M's still there? - how to make sure? <tintin@snowy.calculus>
        Design questions about fork(), pipe() and sockets <edgue@web.de>
    Re: digital signature -----> Here it is ........ <tintin@snowy.calculus>
    Re: digital signature -----> Here it is ........ <bart.lateur@skynet.be>
    Re: digital signature (TD)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 30 Oct 2001 11:43:09 +0000 (UTC)
From: miquels@cistron-office.nl (Miquel van Smoorenburg)
Subject: $^S value "sticks" in 5.6.1 - known bug ?
Message-Id: <9rm3od$kua$1@ncc1701.cistron.net>

The $^S variable gets set to '1' if the $SIG{__DIE__} handler is
in an eval. But with perl 5.6.1 it seems that it sticks - once
$^S gets set, it stays set.

Program:

#! /usr/bin/perl

sub argh {
        print STDERR "ARGH: \$^S is now [$^S]: @_";
        exit 1 unless ($^S);
}
$SIG{__DIE__} = \&argh;

eval { die "Died in eval"; };
die "Now died for real";

With 5.6.1:
$ perl dietest2.pl
ARGH: $^S is now [1]: Died in eval at dietest2.pl line 9.
ARGH: $^S is now [1]: Now died for real at dietest2.pl line 10.
Now died for real at dietest2.pl line 10.

With 5.005:
% perl dietest2.pl
ARGH: $^S is now [1]: Died in eval at dietest2.pl line 9.
ARGH: $^S is now [0]: Now died for real at dietest2.pl line 10.

Is this a known problem? Is there a work-around ? Putting
"local $^S;" inside the eval doesn't work.

Mike.
-- 
"Only two things are infinite, the universe and human stupidity,
 and I'm not sure about the former" -- Albert Einstein.


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

Date: Tue, 30 Oct 2001 06:42:16 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Can perl fill-in a web form without submitting it?
Message-Id: <3BDE9218.166F6798@earthlink.net>

Qunfeng Dong wrote:
> 
> Hi Guys,
> 
> Thanks so much for answering my web form question. I guess I didn't
> make my question clear. I will try it just one more time.
> 
> I want to write a CGI script to create a web form (I know how to do
> this), collect some text info input from users. Then use the collected
> info to partially fill out another static web form at another website
> (How do I do that?). This lets users look at the partially filled-out
> (by my script) form and fill out the rest of the static web form.

I would suggest you think of it as two or three seperate pieces.
1) I've got a CGI form, X, which gets info, Y from the users.
2) There's this other form, Z, on another site.
3) I want the user to see Z, with some of the fields filled with Y.
4) I want 'submit' on this partly filled-in-Z to act like 'submit' on
   the original Z.

solution:
  if( no cgi parameters given ) {
     print out form X.
  } else {
     Y = data from parameters
     print out our version of Z, with data from Y filled in.
     (Make sure the ACTION part of the FORM tag points to whevever Z's
     ACTION pointed to.  This might have to be the url of Z)
  }

With regards to printing out your own version of Z, there's two ways to
do it -- the first, and simplest, is to download Z with your browser
before your start writing your own cgi, chop it up, and put parts of
it's text directly into your program.  The second is to have your cgi
download Z every time someone visits, and have it pull it apart, insert
Y, and put it back together.

The problem with the first is that if Z's author changes it, your script
will continue to produce something like the old version of Z.  The
problem with the second is you need to refetch Z every time someone
visits your cgi, which will be slow.  I suppose you could use a third
way, which would be to have a program which once a day downloads Z,
parses it, and remakes the cgi program, which gives you a middle of the
road, but that would likely be overly complex.  Stick with method one.

-- 
Klein bottle for rent - inquire within.


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

Date: Tue, 30 Oct 2001 12:37:52 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Can perl fill-in a web form without submitting it?
Message-Id: <mm6ttto5n0sn2ldq6d8ahodt92aeh5aesv@4ax.com>

Benjamin Goldberg wrote:

>     Y = data from parameters
>     print out our version of Z, with data from Y filled in.
>     (Make sure the ACTION part of the FORM tag points to whevever Z's
>     ACTION pointed to.  This might have to be the url of Z)

(Can you say "BASE"? It's not just the form action, it's also all images
that are placed on the form and whose URL's may be relative to the
form's URL.)

>With regards to printing out your own version of Z, there's two ways to
>do it -- the first, and simplest, is to download Z with your browser
>before your start writing your own cgi, chop it up, and put parts of
>it's text directly into your program.  The second is to have your cgi
>download Z every time someone visits, and have it pull it apart, insert
>Y, and put it back together.
>
>The problem with the first is that if Z's author changes it, your script
>will continue to produce something like the old version of Z.  The
>problem with the second is you need to refetch Z every time someone
>visits your cgi, which will be slow.  I suppose you could use a third
>way, which would be to have a program which once a day downloads Z,
>parses it, and remakes the cgi program, which gives you a middle of the
>road, but that would likely be overly complex.  Stick with method one.

No, I like three.

Instead of downloading it once a day, the cleanest approach, if you do
lots of this kind of stuff, is to build a proper (disk oriented) cache
which takes notion of the caching (expires etc) directives in the HTTP
response. But that's far to complex if you just want to make it work.

I like the idea of fetching a web page, turning this into a template for
a templating system, or into a double quotish here-doc (very fast, that
one).

But there's a chicken-and-egg problem there. If you process your HTML
first, and fill in the variables there, you can later, when turning this
is into a here doc, no longer distinguish between the special characters
like '$', which were in the HTML file, and which need escaping; and the
ones you put in there for the interpolation.

But if you escape these characters before processing the HTML, you could
end up with invalid HTML (unlikely, but not impossible).

So you'd best do both at once: while parsing the HTML, both escape the
special character sequences, and insert the template variables, all at
once.

BTW does anybody know of a module or simple method to properly parse
HTML, while being able to retain the original text? HTML::TokeParser
passes you the original text from opening and closing tags, but it
merely extracts parts from comments and processing instructions (IIRC).
You'd have to reconstruct the original comments, by wrapping "<!-- " and
" -->" around them. But this can make some Javascripts unusable by
generating invalid syntax. No, the original site's owner wouldn't think
it's funny if you make his rollover effects fail.  ;-)  Or worse.

-- 
	Bart.


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

Date: Tue, 30 Oct 2001 10:00:00 +0000
From: Simon Oliver <simon.oliver@umist.ac.uk>
Subject: Re: CGI param/regex difficulties
Message-Id: <3BDE7A20.A7086CFE@umist.ac.uk>

> > Under Perl qq{\n} inserts whatever the platform determines is the end of
> > line character
> 
> If you're aiming to process data from other platforms over a network
> connection, then that doesn't help.  In fact, it only confuses.  Check
> perldoc perlport for more-consructive advice on handling "socket"
> data.
Which was the point I was trying to make.

> The purpose is not for outputting to some protocol or other, but so that
> it could be easily split into paragraphs.
Like I said this was a side remark, not particulary relevent to the
orignal question.

--
  Simon Oliver


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

Date: Tue, 30 Oct 2001 06:21:58 -0500
From: mc <invalid@mctech.org>
Subject: Re: challenge, how short can you make this?
Message-Id: <3BDE8D56.7F90AD04@mctech.org>

Uri Guttman wrote:
> 
> >>>>> "m" == mc  <invalid@mctech.org> writes:
> 
>   m> Here's a challenge for those who like to boil scripts down to their
>   m> lowest common denominator so to speak ....
> 
> it is called perl golf.
> 
>   m> input:  $_ = "34 - 39 , 41 , 44";
> 
>   m> output: (34, 35, 36, 37, 38, 39, 41, 44) # as array
> 
>   m> input may contain any number of , separated elements, any of which may
>   m> be either a single number (41), or a range (34 - 39). elements may or
>   m> may not appear in numerical order. Output should be either in order of
>   m> occurance, or in sorted numerical order. comas and - may or may not have
>   m> spaces around them.
> 
> that spec is ambiguous. what do you mean by 'either in order of
> occurance, or in sorted numerical order'? pick one or the other.

meaning that, for example, "24-27,14,36,12" could be converted to an
array as
(24,25,26,27,14,36,12) or sorted as (12,14,24,25,26,27,36) depending on
which way the programmer thought was easier or shorter.

> also this has been done to death. expanding ranges is basically
> trivial. your code is very bloated.

Yes my original code is very bloated. No question of it. The original
was written while helping a friend who was new to perl.

> 
> here is a quicky:
> 
> perl -lne 'push @f, $1 .. ($3 || $1) while /(\d+)(\s*-\s*(\d+))?/g; print "@f"'
> 
> i am sure it can be shortened.
> 
> uri

-- 
  __ _  ____
 /  ' \/ __/                                    http://mctech.org/
/_/_/_/\__/                                     http://pchelpers.org/
---------------------------------------------------------------------
My email address(s) are my private property.  They are NOT to be used
or recorded for ANY reason without my explicit permission.  Disregard
of this statement is in violation of federal privacy & copyright law.
---------------------------------------------------------------------
"He who would trade an ounce of freedom for a pound of security loses
both and deserves neither."                     ..Benjamin Franklin..
---------------------------------------------------------------------
The World Trade Center II will rise from the flames and ashes of the
original. Just like the PHOENIX of legend, The WTC2 will rise again.


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

Date: Tue, 30 Oct 2001 06:33:17 -0500
From: mc <invalid@mctech.org>
Subject: Re: challenge, how short can you make this?
Message-Id: <3BDE8FFD.F1C97E98@mctech.org>

Uri Guttman wrote:

> it is called perl golf.

Thanks, I knew there was a name for it.

> here is a quicky:
> 
> perl -lne 'push @f, $1 .. ($3 || $1) while /(\d+)(\s*-\s*(\d+))?/g; print "@f"'

I like your method. =)

> i am sure it can be shortened.

Most things can be. ;) But you knew that ;)

-- 
  __ _  ____
 /  ' \/ __/                                    http://mctech.org/
/_/_/_/\__/                                     http://pchelpers.org/
---------------------------------------------------------------------
My email address(s) are my private property.  They are NOT to be used
or recorded for ANY reason without my explicit permission.  Disregard
of this statement is in violation of federal privacy & copyright law.
---------------------------------------------------------------------
"He who would trade an ounce of freedom for a pound of security loses
both and deserves neither."                     ..Benjamin Franklin..
---------------------------------------------------------------------
The World Trade Center II will rise from the flames and ashes of the
original. Just like the PHOENIX of legend, The WTC2 will rise again.


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

Date: Tue, 30 Oct 2001 06:38:57 -0500
From: mc <invalid@mctech.org>
Subject: Re: challenge, how short can you make this?
Message-Id: <3BDE9151.D228AA7B@mctech.org>

"John J. Trammell" wrote:
> 
> On Mon, 29 Oct 2001 23:13:31 -0500, mc <invalid@mctech.org> wrote:
> > Here's a challenge for those who like to boil scripts down to their
> > lowest common denominator so to speak ....
> >
> > A script [segment] to do the following ...
> >
> > input:  $_ = "34 - 39 , 41 , 44";
> >
> > output: (34, 35, 36, 37, 38, 39, 41, 44) # as array
> >
> > input may contain any number of , separated elements, any of which may
> > be either a single number (41), or a range (34 - 39). elements may or
> > may not appear in numerical order. Output should be either in order of
> > occurance, or in sorted numerical order. comas and - may or may not have
> > spaces around them.
> >
> > below is my original code, which ive since boiled down to an extreme
> > [censored] characters. (sorry, you'll have to wait <G>)
> >
> > -----8<----------8<----------8<----------8<-----
> > $_ = "34 - 39 , 41 , 44";   # not included in character count
> > @s = split(/\s*,\s*/,$_);
> > foreach $e (@s) {
> >       if ( $e=~/-/ ) {
> >               ($s, $e) = split(/\s*-\s*/,$e);
> >               for ($i=$s;$i<=$e;$i++) { push @e, $i };
> >       } else {
> >               push @e, $e;
> >       };
> > };
> > foreach (@e) { print "[$_]\n" };   # print not part of specs
> > -----8<----------8<----------8<----------8<-----
> >
> > formatting whitespace does not count toward length.
> >
> > how small can ya make it?
> 
> tr/ //; print join ",", map { /(\d+)-(\d+)/ ? ($1..$2) : $_ } split(/,/,$_);

very very close to one of the interrim versions I had while boiling this
down.

this is a good example of why I posted this ... I like to see how other
perl'ers solve a problem. Its the best way, i think, to expand one's
perl knowledge.

-- 
  __ _  ____
 /  ' \/ __/                                    http://mctech.org/
/_/_/_/\__/                                     http://pchelpers.org/
---------------------------------------------------------------------
My email address(s) are my private property.  They are NOT to be used
or recorded for ANY reason without my explicit permission.  Disregard
of this statement is in violation of federal privacy & copyright law.
---------------------------------------------------------------------
"He who would trade an ounce of freedom for a pound of security loses
both and deserves neither."                     ..Benjamin Franklin..
---------------------------------------------------------------------
The World Trade Center II will rise from the flames and ashes of the
original. Just like the PHOENIX of legend, The WTC2 will rise again.


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

Date: Tue, 30 Oct 2001 06:39:59 -0500
From: mc <invalid@mctech.org>
Subject: Re: challenge, how short can you make this?
Message-Id: <3BDE918F.BBFFCB65@mctech.org>

Mona Wuerz wrote:
> 
> mc <invalid@mctech.org> writes:
> 
> > input:  $_ = "34 - 39 , 41 , 44";
> >
> > output: (34, 35, 36, 37, 38, 39, 41, 44) # as array
> 
> perl -wle '$_="34 - 39 , 41 , 44"; s/-/../; @x=eval; print "@x"'
> 
> -mona

And lest mona feel left out; She(?) has the same code as Tad, posted 3
hours earlier. I just saw Tad's first. Congradulations to both of you.

-- 
  __ _  ____
 /  ' \/ __/                                    http://mctech.org/
/_/_/_/\__/                                     http://pchelpers.org/
---------------------------------------------------------------------
My email address(s) are my private property.  They are NOT to be used
or recorded for ANY reason without my explicit permission.  Disregard
of this statement is in violation of federal privacy & copyright law.
---------------------------------------------------------------------
"He who would trade an ounce of freedom for a pound of security loses
both and deserves neither."                     ..Benjamin Franklin..
---------------------------------------------------------------------
The World Trade Center II will rise from the flames and ashes of the
original. Just like the PHOENIX of legend, The WTC2 will rise again.


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

Date: Tue, 30 Oct 2001 06:47:42 -0500
From: mc <invalid@mctech.org>
Subject: Re: challenge, how short can you make this?
Message-Id: <3BDE935E.803C00B1@mctech.org>

Tad McClellan wrote:
> 
> mc <invalid@mctech.org> wrote:
> >Here's a challenge for those who like to boil scripts down to their
> >lowest common denominator so to speak ....
> 
> We have a name for that: Perl Golf
> 
>    http://www.sysarch.com/perl/golf/
> 
> But those are usually one-liners.
> 
> >A script [segment] to do the following ...
> >
> >input:  $_ = "34 - 39 , 41 , 44";
> >
> >output: (34, 35, 36, 37, 38, 39, 41, 44) # as array
> 
> [snip]
> 
> >how small can ya make it?
> 
> The "real work" is about a dozen characters.
> 
> --------------------------
> #!/usr/bin/perl
> use warnings;
> use strict;
> 
> $_ = '34 - 39 , 41 , 44';
> s/-/../g;
> my @nums = eval;
> 
> print "$_\n" for @nums;

and we have a winner. this is essentially what I came up with.

The actual code, which takes as specifyied the string in, and an array
out, is ...

s/-/../g;  # crap, i forgot the g in my code =)
eval;

for printing, i came up with this ... (with the g flag added)

$_ = "34 - 39 , 41 , 44 , 50 - 55";
print join(', ',eval"s/-/../g;eval"),"\n";

the actual block of code which needed this is as follows:

given an of strings of the type described in the 'specs' ...

# @aos = an array of strings to expand
# strings are taken from database records
foreach (@aos) {
	s/-/../;
	foreach (eval) {
		# process each number into another database
	}
};

-- 
  __ _  ____
 /  ' \/ __/                                    http://mctech.org/
/_/_/_/\__/                                     http://pchelpers.org/
---------------------------------------------------------------------
My email address(s) are my private property.  They are NOT to be used
or recorded for ANY reason without my explicit permission.  Disregard
of this statement is in violation of federal privacy & copyright law.
---------------------------------------------------------------------
"He who would trade an ounce of freedom for a pound of security loses
both and deserves neither."                     ..Benjamin Franklin..
---------------------------------------------------------------------
The World Trade Center II will rise from the flames and ashes of the
original. Just like the PHOENIX of legend, The WTC2 will rise again.


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

Date: Tue, 30 Oct 2001 12:16:03 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: challenge, how short can you make this?
Message-Id: <u76tttg89ndcnjhglks4dd6i9gr3k4qn0n@4ax.com>

John J. Trammell wrote:

>> A script [segment] to do the following ...
>> 
>> input:  $_ = "34 - 39 , 41 , 44";
>> 
>> output: (34, 35, 36, 37, 38, 39, 41, 44) # as array

>> how small can ya make it?
>
>tr/ //; print join ",", map { /(\d+)-(\d+)/ ? ($1..$2) : $_ } split(/,/,$_);

It's not just a matter of "how small". I kinda like the reversed
approach:

	s/(\d+)\s*-\s*(\d+)/join ", ", $1 .. $2/ge;

This creates a string, not a list.

-- 
	Bart.


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

Date: Tue, 30 Oct 2001 08:11:39 -0500
From: mc <invalid@mctech.org>
Subject: Re: challenge, how short can you make this?
Message-Id: <3BDEA70B.503E6357@mctech.org>

Bart Lateur wrote:
> 
> John J. Trammell wrote:
> 
> >> A script [segment] to do the following ...
> >>
> >> input:  $_ = "34 - 39 , 41 , 44";
> >>
> >> output: (34, 35, 36, 37, 38, 39, 41, 44) # as array
> 
> >> how small can ya make it?
> >
> >tr/ //; print join ",", map { /(\d+)-(\d+)/ ? ($1..$2) : $_ } split(/,/,$_);
> 
> It's not just a matter of "how small". I kinda like the reversed
> approach:
> 
>         s/(\d+)\s*-\s*(\d+)/join ", ", $1 .. $2/ge;
> 
> This creates a string, not a list.

Hmmmmm, very cool. Only thing is I needed an array. But I love seeing
different takes on a problem, especially "reverse logic". ;)

-- 
  __ _  ____
 /  ' \/ __/                                    http://mctech.org/
/_/_/_/\__/                                     http://pchelpers.org/
---------------------------------------------------------------------
My email address(s) are my private property.  They are NOT to be used
or recorded for ANY reason without my explicit permission.  Disregard
of this statement is in violation of federal privacy & copyright law.
---------------------------------------------------------------------
"He who would trade an ounce of freedom for a pound of security loses
both and deserves neither."                     ..Benjamin Franklin..
---------------------------------------------------------------------
The World Trade Center II will rise from the flames and ashes of the
original. Just like the PHOENIX of legend, The WTC2 will rise again.


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

Date: 30 Oct 2001 02:21:50 -0800
From: tee_noone@yahoo.com (Misty)
Subject: Configuring the Serial Ports
Message-Id: <de5432d.0110300221.84ab650@posting.google.com>

Hi,
I need to write to the serial port on a Unix machine but before I do I
need to set some parameters like the bit rate etc.
can anyone tell me how to do this.
I know you write to the serial port you simply open the file and write
to it, but I am required to set these parameters first.
Any ideas.

Regards,
T.


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

Date: Tue, 30 Oct 2001 22:47:24 +1100
From: "Tintin" <tintin@snowy.calculus>
Subject: Re: Control M's still there? - how to make sure?
Message-Id: <IpwD7.24$cv6.500821@news.interact.net.au>


"Dan West" <danno966@hotmail.com> wrote in message
news:9rkuiq$ldl$1@slb6.atl.mindspring.net...
> "Ron Reidy" <rereidy@indra.com> wrote in message
> news:3BDDF481.B1E15341@indra.com...
> > Straatvark wrote:
> > >
> > > I want a perl script created and working on Windows to run on a Unix
> > > box but get the error message as displayed at end of this message.
> > >
> > > For that I did remove the control M's.
> > > I do uplaod in ASCII mode with Cute FTP 4.2.2
> > > I did try the '#!/.../perl --' instead of '#!/.../perl'
> > >
> > > I even downloaded a working script from the server and then upload it
> > > again - just to confirm I had broken it without even open/edit it.
> > >
> > > So, am I missing something really simple or complex? <<sigh>> - any
> > > help would be really welcome at this stage...
> > >
> > > How do I make sure that the control M's was removed?
> > > Must the remove control m's script run on the Unix box?
> > >
> > > thanx
> > > gert
> > >
> > > My error message:
> > > ***********************************
> > > "This message usually indicates there is a problem with the script
> > > itself. Often this indicates either that the #! line of the script is
> > > incorrect, or the script was uploaded in binary mode instead of ascii
> > > mode. Check to make sure that the script does not have control-M's at
> > > the end of every line. That will prevent it from executing. An easy
> > > fix that takes care of this most of the time is to put '#!/.../perl
> > > --' instead of '#!/.../perl' on the first line of the script. "
> > AFIK, the only ^M you will need to worry about is any that are at the
> > end of program names (i.e #!/usr/bin/perl^M).  If this condition exists,
> > you will get errors.
>
> You get those because of the difference between CRLF's on Windows and
UNIX.
> When you FTP a script, ALWAYS use text mode. bin mode causes the problem.
if
> you know vi, you can use /s/<ctl>v<ctl>m// at the command line to remove
the
> offending bits.....

The OP is uploading in ASCII mode (please read the OP's posting).  I've
noticed that Cute FTP seems to have a problem in this regard.





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

Date: Tue, 30 Oct 2001 13:12:05 +0100
From: Edwin =?iso-8859-1?Q?G=FCnthner?= <edgue@web.de>
Subject: Design questions about fork(), pipe() and sockets
Message-Id: <3BDE9915.1C957432@web.de>

Hi there,

I want to implement the following scenario:

I have program that performs some actions and creates
log messages. I would like to allow one or more GUI
applications to display the messages. 

It should work like an instant messenger system: 
a GUI connects to the "server" and sees all log 
messages that are created after the connection 
is established. 

I know about the basic mechanism that I should
use for this purpose (forking, sockets, pipes). But
I have some difficulties to put all the parts together,
therefore some questions:

I think I am going to have 
  - one process that waits for incoming connections and
    that creates a new process to handle each incoming
    request
  - one process ("X") that is responsible for performing
    "the real work" that creates the log messages
  - 0 to n processes ("S1", "S2, "S3", ...) that are 
    responsible to send the created log messages 
    to the remote GUIs

I want to separate the log creation (X) from the 
sending (S1, S2, ...) because it is more important for  
me that X runs without problems, no matter if the connection
to a GUI is lost or the whole network is down.

Now I am wondering:
- is this in general a good idea? Or are there 
  some basic flaws in this design?

[maybe I should add here that I do not intend to
 use Threads - the whole thing needs to run in a
 production system using OS/2 and Perl 5.5]

- how can X handover the log messages to the S1, S2, S3
  processes? I think pipes wont do it, since pipes
  are "one on one", whereas I need something that
  works "one on many".

In addition, it would be also very helpful to study
other projects/modules that do similar
things - so if you know one just point it out.

thx,
eg


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

Date: Tue, 30 Oct 2001 22:49:37 +1100
From: "Tintin" <tintin@snowy.calculus>
Subject: Re: digital signature -----> Here it is ........
Message-Id: <NrwD7.25$lv6.506969@news.interact.net.au>


"TD" <tushar08@yahoo.com> wrote in message
news:584a8362.0110291635.7de22fdd@posting.google.com...
> tushar08@yahoo.com (TD) wrote in message
news:<584a8362.0110290708.7abc27ca@posting.google.com>...
> >
> > Is there any way we can create digital signature using Perl
> > I am fairly new in this....
> >
> > Here is what I need....
> >
> > 1) my current XML="<xml data....>"
> > 2) signature = sign XML with private key using MD5 or SHA1
> > 3) encodedsignature = base64.encode(signature)
> > 4) publiccertificate= base64.encode(public cert)
> > 5) now I can post data as
> >
requestxml=XML&digitalsignature=encodedsignature&certificate=publiccertifica
te
>
> Perl Gurus - there is no one in this forum who can help me to atleast
> guide in the right direction or does it mean PERL DOES NOT SUPPORT
> DIGITAL SIGNATURES......

It means the following things:

1.)  You do not understand Usenet propagation.
2.)  You have ignored an answer from your original thread.






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

Date: Tue, 30 Oct 2001 13:34:52 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: digital signature -----> Here it is ........
Message-Id: <fuatttk9rt06bh1gvgmleh02sch60i85hd@4ax.com>

TD wrote:

>there is no one in this forum who can help me to atleast
>guide in the right direction or does it mean PERL DOES NOT SUPPORT
>DIGITAL SIGNATURES......

There are modules for PGP and other encryption/digest methods, all on
CPAN. <http://search.cpan.org/Catalog/Security/>. I don't use digital
signatures, so I have no idea which one you'd want.

-- 
	Bart.


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

Date: 30 Oct 2001 06:00:24 -0800
From: tushar08@yahoo.com (TD)
Subject: Re: digital signature
Message-Id: <584a8362.0110300600.5742d5f4@posting.google.com>

Thanks. I will try and let you all know.




"Mina Naguib" <spam@thecouch.homeip.net> wrote in message news:<SHkD7.4677$NY2.262670@wagner.videotron.net>...
> "TD" <tushar08@yahoo.com> wrote in message
> news:584a8362.0110290708.7abc27ca@posting.google.com...
> > Hello All,
> >
> > Is there any way we can create digital signature using Perl
> > I am fairly new in this....
> >
> > Here is what I need....
> >
> > 1) my current XML="<xml data....>"
> > 2) signature = sign XML with private key using MD5 or SHA1
> > 3) encodedsignature = base64.encode(signature)
> > 4) publiccertificate= base64.encode(public cert)
> > 5) now I can post data as
> >
> requestxml=XML&digitalsignature=encodedsignature&certificate=publiccertifica
> te
> 
> I read an article a few weeks ago which might answer your question:
> 
> http://www.perl.com/pub/a/2001/09/26/crypto1.html
> 
> >
> >
> > Please help..if there is a better/best way than this....let me know.
> >
> > T.


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

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


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