[26425] in Perl-Users-Digest
Perl-Users Digest, Issue: 8595 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 1 21:05:28 2005
Date: Tue, 1 Nov 2005 18:05:04 -0800 (PST)
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, 1 Nov 2005 Volume: 10 Number: 8595
Today's topics:
Re: Bug in &= (bitwise or) <nospam-abuse@ilyaz.org>
FAQ 7.8 How do I declare/create a structure? <comdog@pair.com>
Re: passing data xhoster@gmail.com
Re: passing data <news@cutmeukjay.com>
Re: passing data <news@cutmeukjay.com>
Re: passing data <matthew.garrish@sympatico.ca>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 1 Nov 2005 22:13:14 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: Bug in &= (bitwise or)
Message-Id: <dk8p9q$pig$1@agate.berkeley.edu>
[A complimentary Cc of this posting was sent to
Tassilo v. Parseval
<tassilo.von.parseval@rwth-aachen.de>], who wrote in article <3snf0uFotcprU1@news.dfncis.de>:
> For testing what the raw string looks like after the bitwise-and, you
> can use:
Is not it much easier to parse the output of Devel::Peek, and read the
PV by unpack()?
> my $a = 'aa';
> $a &= 'a';
> test($a);
For those who are too lazy to run this, the result it
97,97,0
> Then I am not sure myself what the result of
>
> $s = 'aa' & 'a'
>
> should be.
I think the current result is both correct and intuitive enough
(modulo two bugs which comprise this problem). It is compatible with
both
a) junk-in-junk-out ("what is after end of 'a' is junk")
b) strings behave as if followed by infinitely many \0s.
By (b), the output string should also be considered as having
infinitely many \0s; the question is where to stop this flow. And (a)
looks as a reasonable argument to choose this cut-off point.
[My opinion may be a little bit skewed, since I do not remember
whether it was me who decided on this behaviour. ;-]
Hope this helps,
Ilya
------------------------------
Date: Tue, 1 Nov 2005 23:03:01 +0000 (UTC)
From: PerlFAQ Server <comdog@pair.com>
Subject: FAQ 7.8 How do I declare/create a structure?
Message-Id: <dk8s75$t7d$1@reader2.panix.com>
This message is one of several periodic postings to comp.lang.perl.misc
intended to make it easier for perl programmers to find answers to
common questions. The core of this message represents an excerpt
from the documentation provided with Perl.
--------------------------------------------------------------------
7.8: How do I declare/create a structure?
In general, you don't "declare" a structure. Just use a (probably
anonymous) hash reference. See perlref and perldsc for details. Here's
an example:
$person = {}; # new anonymous hash
$person->{AGE} = 24; # set field AGE to 24
$person->{NAME} = "Nat"; # set field NAME to "Nat"
If you're looking for something a bit more rigorous, try perltoot.
--------------------------------------------------------------------
Documents such as this have been called "Answers to Frequently
Asked Questions" or FAQ for short. They represent an important
part of the Usenet tradition. They serve to reduce the volume of
redundant traffic on a news group by providing quality answers to
questions that keep coming up.
If you are some how irritated by seeing these postings you are free
to ignore them or add the sender to your killfile. If you find
errors or other problems with these postings please send corrections
or comments to the posting email address or to the maintainers as
directed in the perlfaq manual page.
Note that the FAQ text posted by this server may have been modified
from that distributed in the stable Perl release. It may have been
edited to reflect the additions, changes and corrections provided
by respondents, reviewers, and critics to previous postings of
these FAQ. Complete text of these FAQ are available on request.
The perlfaq manual page contains the following copyright notice.
AUTHOR AND COPYRIGHT
Copyright (c) 1997-2002 Tom Christiansen and Nathan
Torkington, and other contributors as noted. All rights
reserved.
This posting is provided in the hope that it will be useful but
does not represent a commitment or contract of any kind on the part
of the contributers, authors or their agents.
------------------------------
Date: 01 Nov 2005 21:34:20 GMT
From: xhoster@gmail.com
Subject: Re: passing data
Message-Id: <20051101163420.428$oZ@newsreader.com>
"PhEaSaNt PLuCKeR" <news@cutmeukjay.com> wrote:
> Hello
>
> How do I get two running perl scripts to pass data to each other?
There are many ways, depending on the amounts of data, the frequency of the
data passing, the familial relationship of the scripts, the need for
blocking or non-blocking, locking, presence of security concerns, etc.
see perldoc perlipc.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Tue, 1 Nov 2005 21:53:06 -0000
From: "PhEaSaNt PLuCKeR" <news@cutmeukjay.com>
Subject: Re: passing data
Message-Id: <dk8o40$9ei$1@newsg3.svr.pol.co.uk>
<xhoster@gmail.com> wrote in message
news:20051101163420.428$oZ@newsreader.com...
> "PhEaSaNt PLuCKeR" <news@cutmeukjay.com> wrote:
>> Hello
>>
>> How do I get two running perl scripts to pass data to each other?
>
> There are many ways, depending on the amounts of data, the frequency of
> the
> data passing, the familial relationship of the scripts, the need for
> blocking or non-blocking, locking, presence of security concerns, etc.
>
> see perldoc perlipc.
>
> Xho
>
> --
> -------------------- http://NewsReader.Com/ --------------------
> Usenet Newsgroup Service $9.95/Month 30GB
Ok Thanks Xho, The data is continuous via a socket.
(use IO::Socket;)
So my first script is the data engine, I need to pass various commands to
this engine
Then have it obtain the data so that i can present it continuously in some
other form
using another script.
Was never very good at explaining in fact "The hardest part is how to ask a
question" in my case ;-)
Thanks agn
James
------------------------------
Date: Tue, 1 Nov 2005 22:10:14 -0000
From: "PhEaSaNt PLuCKeR" <news@cutmeukjay.com>
Subject: Re: passing data
Message-Id: <dk8p45$lng$1@newsg2.svr.pol.co.uk>
"PhEaSaNt PLuCKeR" <news@cutmeukjay.com> wrote in message
news:dk8c08$5j2$1@newsg4.svr.pol.co.uk...
> Hello
>
> How do I get two running perl scripts to pass data to each other?
> Another quickie, Is it possible to open a web page from a perl script, but
> be able to run the
> script viewable in a dos shell and also see data passed from that script
> to a web page?
>
> Has anyone done this?
> If so any hints or tips Please.
>
>
> --
>
> James (Ukjay)
>
>
Just found perlipc (Perl interprocess Communication)
Makes interesting reading!
--
James (Ukjay)
------------------------------
Date: Tue, 1 Nov 2005 20:14:52 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: passing data
Message-Id: <cqU9f.4877$LF3.475112@news20.bellglobal.com>
"PhEaSaNt PLuCKeR" <news@cutmeukjay.com> wrote in message
news:dk8o40$9ei$1@newsg3.svr.pol.co.uk...
> So my first script is the data engine, I need to pass various commands to
> this engine
> Then have it obtain the data so that i can present it continuously in some
> other form
> using another script.
> Was never very good at explaining in fact "The hardest part is how to ask
> a question" in my case ;-)
>
If you can't present your situation clearly, then you shouldn't be pushing
ahead with the programming. You should sit down and work out all the
vagaries in your statement above before you wind up wasting hours/days
coding a socket solution that never required a continuously running script
in the first place.
Matt
------------------------------
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 8595
***************************************