[22967] in Perl-Users-Digest
Perl-Users Digest, Issue: 5187 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 7 09:06:06 2003
Date: Mon, 7 Jul 2003 06:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 7 Jul 2003 Volume: 10 Number: 5187
Today's topics:
Re: Alternative to use vars <bik.mido@tiscalinet.it>
Re: Alternative to use vars <mgjv@tradingpost.com.au>
Re: Completely confused - system and $? == -1 <persicom@acedsl.com>
Re: Completely confused - system and $? == -1 (Villy Kruse)
Re: How can I analyse jpg file with perl? <Georgekinley@hotmail.com>
How to secure Perl scripts from spammers? (rbaker3@cox.net)
Re: HTML::HeadParser to print the title <gisle@ashn89ty262h.bc.hsia.telus.net>
Re: javascript cookies? and data mining project. <wgu_@_wurquhart.co.uk>
Re: javascript cookies? and data mining project. <REMOVEsdnCAPS@comcast.net>
Re: k operator in REGEX?? <member31962@dbforums.com>
Re: lookaround <abigail@abigail.nl>
Re: naming hash using a variable name. (arasu@nospam.org)
Re: naming hash using a variable name. <uri@stemsystems.com>
Re: naming hash using a variable name. <uri@stemsystems.com>
Re: Net::POP3 <tassilo.parseval@rwth-aachen.de>
Perl 5.8.0 compilation fails in chrooted environment vrihad@myway.com
Re: Perl 5.8.0 compilation fails in chrooted environmen <nospam-abuse@ilyaz.org>
Re: Pre-forking SOAP servers (James Lavery)
read sensor data (Alythh)
Re: Reading JPEG file <zvone.zagar@siol.net>
Regex help... (Math55)
Re: Regex help... <bernard.el-hagin@DODGE_THISlido-tech.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 07 Jul 2003 11:49:02 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Alternative to use vars
Message-Id: <fmfigvkl29q1uloitcd5ac1u2o48pifmsl@4ax.com>
On Sun, 6 Jul 2003 08:55:30 +1000, Martien Verbruggen
<mgjv@tradingpost.com.au> wrote:
>> Hmmm... this seems to be the main issue here. Maybe for a future Perl5
>> release a (backwards compatible) mechanism might be devised, by means
>> e.g. of a C<package> modifier, that gives a package an implicit
>> lexical scope.
>
>You can't do that. Not without major change.
Well, while I agree on *everything* you said hereafter, I have a doubt
I didn't express myself clearly. Of course my idea is in any case
highly speculative and may well be a very bad one indeed...
What I was thinking of is a "modifier"[1] that applied to a package
creates an "implicit pair of curly brackets, {}" around "all the stuff
in that package. Suppose to call it "private"[2]; then the following
portions of code would be equivalent:
# portion 1
private package mypackage;
...
# portion 2
{
package my package;
...
}
At this point you may argue that writing a pair of curly brackets is
easier than writing a keyword of a bunch of charachters. But as you
know far better than me, a package can be a very long and complex
beast and the use of "my" modifier might have some sense in such
cases.
[1] I hope it is the correct technical term.
[2] I'm aware it's awful: hopefully a better name could be devised.
Just my 2 Eurocents,
Michele
--
$\=q.,.,$_=q.print' ,\g,,( w,a'c'e'h,,map{$_-=qif/g/;chr
}107..q[..117,q)[map+hex,split//,join' ,2B,, w$ECDF078D3'
F9'5F3014$,$,];];$\.=$/,s,q,32,g,s,g,112,g,y,' , q,,eval;
------------------------------
Date: Mon, 7 Jul 2003 20:44:31 +1000
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: Alternative to use vars
Message-Id: <slrnbgijof.rlm.mgjv@martien.heliotrope.home>
On Mon, 07 Jul 2003 11:49:02 +0200,
Michele Dondi <bik.mido@tiscalinet.it> wrote:
> On Sun, 6 Jul 2003 08:55:30 +1000, Martien Verbruggen
><mgjv@tradingpost.com.au> wrote:
>
>>> Hmmm... this seems to be the main issue here. Maybe for a future Perl5
>>> release a (backwards compatible) mechanism might be devised, by means
>>> e.g. of a C<package> modifier, that gives a package an implicit
>>> lexical scope.
>>
>>You can't do that. Not without major change.
>
> Well, while I agree on *everything* you said hereafter, I have a doubt
> I didn't express myself clearly. Of course my idea is in any case
> highly speculative and may well be a very bad one indeed...
>
> What I was thinking of is a "modifier"[1] that applied to a package
> creates an "implicit pair of curly brackets, {}" around "all the stuff
> in that package. Suppose to call it "private"[2]; then the following
> portions of code would be equivalent:
>
> # portion 1
> private package mypackage;
> ...
>
> # portion 2
> {
> package my package;
> ...
> }
>
> At this point you may argue that writing a pair of curly brackets is
> easier than writing a keyword of a bunch of charachters. But as you
> know far better than me, a package can be a very long and complex
> beast and the use of "my" modifier might have some sense in such
> cases.
[It may be that I'm still misunderstanding what you're trying to say. If
so, my apologies in advance...]
I would indeed argue that if you want that scope (and that's of course a
lexical scope) that it would be better to use implicit curlies. What I
wanted to emphasise though, is that such a scope, with the curlies, is
different from package scope. A package can exist in more than one
lexical scope, and in fact often exist in more than one file. Package
scope covers all of those lexical scopes. On the other hand, a lexical
scope can also be larger than a package scope. If a variable is declared
with my or our at the top of a file, and that file contains more than
one package, the scope of that variable extends across the packages.
The long and short of it is that package scope and lexical scope are
orthogonal things. They do often overlap in real code, but behind the
scenes there is no real overlap.
From what you write, I wonder whether you mean that you'd like to have a
"lexical" scope that would automatically spring to life when one is in a
certain package. If so, then you're really talking about package scope,
and you're looking for what C<use vars> does, I think. Allowing a real
lexical scope[1] to extend like that would be, IMO, contrary to what a
lexical scope is.
In my view, the current state is quite the way it should be: If you need
a package wide variable, use one. Name it by its fully qualified name,
or use C<our> to lexically scope its short name[2]. If you need a
lexical variable, create one with C<my>. If you need what C<use vars>
does currently, explicitly mention the variable in each lexical scope
you need it with C<our>.
Alternatively, simply type C<no strict> and free yourself from the
shackles :). In my opinion, all of the above, including the deprecation
of C<use vars> lead to better coding practices, and easier to maintain,
less bug-prone code. For me, that's a good reason to support it.
Martien
[1] One that would work with C<our> and C<my> scoped variables...
[2] I would only do that to limit its scope, not to extend it beyond the
package. When a variable is only needed once or twice, I use its full
name.
--
|
Martien Verbruggen | I took an IQ test and the results were
| negative.
|
------------------------------
Date: Mon, 07 Jul 2003 01:27:15 -0400
From: "Matthew O. Persico" <persicom@acedsl.com>
Subject: Re: Completely confused - system and $? == -1
Message-Id: <3F0904B3.10700@acedsl.com>
Matthew O. Persico wrote:
> Steve Grazzini wrote:
>
>> Matthew O. Persico <persicom@acedsl.com> writes:
>>
>>> Sometimes, I get -1 back from system or $? is -1 with the backticks.
>>> I am using perl 5.6.1 on Solaris 2.7. Does this imply that somehow, a
>>> shell is being called on my behalf even though the backticks have no
>>> shell characters and the system command uses the list form?
>>
>> Nope.
>>
>> It means that, during the failed call, either fork(), exec()
>> or waitpid() failed and you need to check $! instead.
>>
Ok, folks, time to scratch my head once again. Upon taking the above
advice, I stepped into my program using the debugger to check $!. Have a
look:
DB<2> n
AMG::System::system(/am/common/lib/site_perl/5.6.1/AMG/System.pm:119):
119: waitpid($pid,0);
DB<2> n
AMG::System::system(/am/common/lib/site_perl/5.6.1/AMG/System.pm:120):
120: my $status = $?;
DB<2> print $! + 0 . "->$!"
10->No child processes
No child processes? What the ...? The process was out there; the
waitpid() call waited until the job was finished and the work that the
job was supposed to do was done. I'm on a Solaris 2.7 system. Note that
I do lots of calls and waitpids, but only certain programs fail. What
should I look for in those programs - I know that they exit with
explicit exit() calls when done.
Thanks again
--
Matt
------------------------------
Date: 07 Jul 2003 07:41:02 GMT
From: vek@station02.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: Completely confused - system and $? == -1
Message-Id: <slrnbgi901.317.vek@station02.ohout.pharmapartners.nl>
On Mon, 07 Jul 2003 01:27:15 -0400,
Matthew O. Persico <persicom@acedsl.com> wrote:
>Matthew O. Persico wrote:
>> Steve Grazzini wrote:
>>
>>> Matthew O. Persico <persicom@acedsl.com> writes:
>>>
>>>> Sometimes, I get -1 back from system or $? is -1 with the backticks.
>>>> I am using perl 5.6.1 on Solaris 2.7. Does this imply that somehow, a
>>>> shell is being called on my behalf even though the backticks have no
>>>> shell characters and the system command uses the list form?
>>>
>>> Nope.
>>>
>>> It means that, during the failed call, either fork(), exec()
>>> or waitpid() failed and you need to check $! instead.
>>>
>Ok, folks, time to scratch my head once again. Upon taking the above
>advice, I stepped into my program using the debugger to check $!. Have a
>look:
>
> DB<2> n
>AMG::System::system(/am/common/lib/site_perl/5.6.1/AMG/System.pm:119):
>119: waitpid($pid,0);
> DB<2> n
>AMG::System::system(/am/common/lib/site_perl/5.6.1/AMG/System.pm:120):
>120: my $status = $?;
> DB<2> print $! + 0 . "->$!"
>10->No child processes
>
>No child processes? What the ...? The process was out there; the
>waitpid() call waited until the job was finished and the work that the
>job was supposed to do was done. I'm on a Solaris 2.7 system. Note that
>I do lots of calls and waitpids, but only certain programs fail. What
>should I look for in those programs - I know that they exit with
>explicit exit() calls when done.
>
Since you are on Solaris, do trace the program with truss and check if there
are any calls to wait/waitpid which aren't accounted for in the code.
There are some perl functions which have a hidden call to wait/waitpid,
such as system() or open() specifying a pipe.
Villy
------------------------------
Date: Mon, 07 Jul 2003 10:43:02 GMT
From: "George Kinley" <Georgekinley@hotmail.com>
Subject: Re: How can I analyse jpg file with perl?
Message-Id: <W8cOa.39536$ws6.793329@news2.nokia.com>
Hello,
Picture Images are made of color pixels ( picture elements) , so what
happens is if there is picture say 100 x 50 , it is actually a two dim array
and each cell of that array is an pixel of color, which eventually make a
complete picture , the Jpeg files are of similar kind but they are
compressed to make it smaller, to understand this property try and save jpeg
file in bmp format you will see that the size of image in large as compared
to jpeg, So the text you have written inside the jpeg file is actually a
pixel , you just cannot get any text out of it, because there is NO TEXT
there,
if you look at the array of 0 and 1 below and try to read it through a white
pixel on screen at where is 1 and black pixel where there is 0 with a
background of black , you will see text appear as "A" I hope you got the
picture
0000000000100000000000000000
0000000001001000000000000000
0000000010000100000000000000
0000000100110010000000000000
0000001000000001000000000000
0000010000000000100000000000
0000100000000000010000000000
0001000000000000001000000000
0000000000000000000000000000
0000000000000000000000000000
"bytewolf" <gamelifes@yahoo.com.cn> wrote in message
news:be5n1m$1jse$1@mail.cn99.com...
> Hi~Perlhackers,
> I have a problem,so I need your help.
> How can I analyse jpg file with perl?
> For example:I have a jpg file called text.jpg,when u open it with IE,it
will
> show u an img with text"I love perl".I want to get the text what in the
> text.jpg with perl,what should I do?
> It's kind for u to help me,thanks!
> Yours sincerely
> Bytewolf
>
>
------------------------------
Date: 6 Jul 2003 22:49:46 -0700
From: rbaker3@cox.net (rbaker3@cox.net)
Subject: How to secure Perl scripts from spammers?
Message-Id: <5382be87.0307062149.37aea2e0@posting.google.com>
Recently I've had some spammers take advantage of some scripts on my
web server that use sendmail. I'm not sure which script or scripts
they are using, but my ISP has received complaints and has shut down
Sendmail until I secure things. What can I do? Some guy tells me he
can add some code to some scripts to secure them for a charge of
$65/hr. I don't really want to have to pay him if I don't have to and
I don't know how long it will take him and if he will actually secure
them. He mentioned something about using securemail.pl(whatever that
is) and untainting. My ISP says if I do some basic things to secure
my scripts, he will turn sendmail back on. I really don't want to
have to rename scripts and move them to different dirs, because I
would have to change the HTML code on a "lot" of pages referencing the
scripts. Some scripts I have installed are Subscribe Me Pro,
ImageFolio, CopThis, Ultimate Bulletin Board, VBulletin.
thanks....
------------------------------
Date: Mon, 07 Jul 2003 06:59:52 GMT
From: Gisle Aas <gisle@ashn89ty262h.bc.hsia.telus.net>
Subject: Re: HTML::HeadParser to print the title
Message-Id: <m3of06yg5d.fsf@ashn89ty262h.bc.hsia.telus.net>
Dan Jacobson <jidanni@jidanni.org> writes:
> P.S. wouldn't the example be better if it used the more efficient
> tool for that job, HTML::HeadParser?
The 'htitle' example script is actually more efficient than
HTML::HeadParser if there is a <title> tag in the document. It has
much less fat than HTML::HeadParser, but HTML::HeadParser is able to
abort the parsing much earlier on title-less documents.
--
Gisle Aas
------------------------------
Date: Mon, 07 Jul 2003 09:02:31 +0100
From: The Sender <wgu_@_wurquhart.co.uk>
Subject: Re: javascript cookies? and data mining project.
Message-Id: <cT9Oa.43$2E2.12@news-binary.blueyonder.co.uk>
At some time in the past Douglas Johnosn wrote :
> Does anyone have any idea how to catch javascript cookies with perl?
> This has been driving me crazy for a week or so and I just though that
> maybe someone with a little more experience had tackeled this problem
> before.
>
> I am also looking for a data mining project to follow/contribute to.
> All I could find on source forge was ht://check which was written in
> c/php neitherr of these languages are attractive to me. Any Comments
> would be much appreciated.
>
> -Douglas Marshall Johnson
Hi,
Can you elaborate on what you mean by JavaScript Cookies? If the cookie is
intended for your site then these are sent down with every http request so
getting hold of them is the same for cookies you create yourself in Perl.
--
Regards,
William
------------------------------
Date: Mon, 07 Jul 2003 05:22:50 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: javascript cookies? and data mining project.
Message-Id: <Xns93B140D857ED9sdn.comcast@206.127.4.25>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
douglasmj1@comcast.net (Douglas Johnosn) wrote in
news:70b5eca2.0307061751.1b14cfd1@posting.google.com:
> Does anyone have any idea how to catch javascript cookies with perl?
> This has been driving me crazy for a week or so and I just though that
> maybe someone with a little more experience had tackeled this problem
> before.
Perhaps you could be more clear about what you need. There's no such thing
as "javascript cookies".
- --
Eric
$_ = reverse sort qw p ekca lre Js reh ts
p, $/.r, map $_.$", qw e p h tona e; print
-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBPwlJ4mPeouIeTNHoEQJDeQCbBFAwW9BvZzpiP4dZIMtDfDlk4mAAoPOv
SjBHxHjQSLWytfkUzb6bLb+t
=C8UL
-----END PGP SIGNATURE-----
------------------------------
Date: Mon, 07 Jul 2003 09:18:02 +0000
From: darkname <member31962@dbforums.com>
Subject: Re: k operator in REGEX??
Message-Id: <3080921.1057569482@dbforums.com>
The comments in PL/SQL are very simple!
There are two types of comments:
-- This is a comment
/*This is a comment*/
/* This
is
a
comment*/
As you can see the -- represents an one line comment, and the /* */ can
be either a multiline comment or just one line comment!
Thank for your help and sorry for my late reply!
Nuno
Originally posted by Abigail
> darkname (member31962@dbforums.com) wrote on MMMDXCIII September
> MCMXCIII
> in :
> ==
> == [Yes i took it frim there in order to try to get and enhance the
> == Regex
> == to catch multiline comments in order to catch comments in PL/SQL!!
>
> If you give me a pointer to a specification of PL/SQL, or at least of
> its comment syntax, I'll add a regexp for it in Regexp::Common.
>
> ==
> == Do you have any suggestion?
> ==
> == Thank you.. and sorry for trying to use your code!!!
> ==
> == Can i use it?
>
>
> Yes.
>
>
> Abigail
> --
> map{${+chr}=chr}map{$_=>$_^ord$"}$=+$]..3*$=/2;
print "$J$u$s$t $a$n$o$t$h$e$r $P$e$r$l $H$a$c$k$e$r\n";
--
Posted via http://dbforums.com
------------------------------
Date: 07 Jul 2003 07:17:34 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: lookaround
Message-Id: <slrnbgi7ke.epj.abigail@alexandra.abigail.nl>
Leo 'TheHobbit' (thehobbit@remove.this.altern.org) wrote on MMMDXCVI
September MCMXCIII in <URL:news:pan.2003.07.06.13.42.39.54908@remove.this.altern.org>:
.. On Sun, 06 Jul 2003 04:45:04 +0000, debraj wrote:
..
.. > Hi All,
.. >
.. > I am new to perl
.. > and am wondering why the following is not running :
.. >
.. > $_ = "The brown fox jumps over the lazy dog";
.. > /the (\S+)(?{ $color = $^N }) (\S+)(?{ $animal = $^N })/i;
.. > print "color = $color, animal = $animal\n";
.. >
..
.. Hi,
.. this works perfectly here, with perl 5.8.0. Obviously, if you perl
.. version is older than that it could not work (IIRC code blocks in regex
.. weren't there even in 5.6.1).
While (?{ }) and (??{ }) are present in 5.6.x, the special meaning
of $^N isn't.
Abigail
--
perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'
------------------------------
Date: 6 Jul 2003 23:14:13 -0700
From: sent_arasu@hotmail.com (arasu@nospam.org)
Subject: Re: naming hash using a variable name.
Message-Id: <1cc3c8a2.0307062214.4e7fd53f@posting.google.com>
Hi,
I read all the three pages, the problem is solved by namespacing
which is what we are trying to do with a hash.
how about this -
package A;
{
...
}
my $var = "/";
my $symref = "A::".$var;
$$symref = "fafaf";
regards,
arasu
>
> http://www.plover.com/~mjd/perl/varvarname.html
> http://www.plover.com/~mjd/perl/varvarname2.html
> http://www.plover.com/~mjd/perl/varvarname3.html
------------------------------
Date: Mon, 07 Jul 2003 07:35:01 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: naming hash using a variable name.
Message-Id: <x7u19ybxi2.fsf@mail.sysarch.com>
>>>>> "Ph" == Perusion hostmaster <nanae@perusion.com> writes:
Ph> I have used it where appropriate. In general with the type of
Ph> simple data that my rather pedestrian application uses, it is not
Ph> needed. AFAIK, explicit instantiation is not a performance
Ph> penalty, and it helps the code better document itself.
but it gets noisy. and i can (but won't) show you cases where it gets
very annoying. and with multiple levels being accessed in one expression
it becomes massively annoying. having done that very thing in perl4
where i had to write all the create and access code for a massive and
deep structure, i appreciate autoviv a great deal. now it can bite you
in subtle ways but they are much less a problem than not having it at
all. note that perl6 will still have it but exists will not do it which
is a good thing.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Mon, 07 Jul 2003 07:37:59 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: naming hash using a variable name.
Message-Id: <x7r852bxd4.fsf@mail.sysarch.com>
>>>>> "ao" == arasu@nospam org <sent_arasu@hotmail.com> writes:
ao> Hi, I read all the three pages, the problem is solved by
ao> namespacing which is what we are trying to do with a hash.
don't top post.
you obviously didn't get what those pages said if you are still trying
to solve things with symrefs. here is a tip for you:
the symbol table is JUST a fancy HASH TREE. so why use it for hash trees
when regular hash trees will do the job and not have any of the nasty
side effects that using the symbol table has?
use symrefs ONLY when you are munging the symbol table. it is NOT for
general purpose data structures.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: 7 Jul 2003 04:36:18 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: Net::POP3
Message-Id: <beatc2$37b$1@nets3.rz.RWTH-Aachen.DE>
Also sprach Lev Altshuler:
> Now I am aware that I need a different module, the one that reads messages
> from Outlook Inbox. If you know which one, please share with me.
If you are in fact talking about Outlook Express then you can use
Mail::Transport::Dbx (don't let yourself confuse by the odd choice of
namespace: that was chosen to make it fit better into Mail::Box which
uses this module).
Go to the CPAN and see the README for M::T::Dbx. It contains
instructions how to install a PPM distribution in case you use
ActivePerl and have no C compiler. Right now you will find PPMs only for
release 0.02. I still have to find the time (and mood) to make them for
the current 0.04.
Tassilo
--
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
------------------------------
Date: 7 Jul 2003 03:40:05 -0700
From: vrihad@myway.com
Subject: Perl 5.8.0 compilation fails in chrooted environment
Message-Id: <2a024f54.0307070240.fcdbfbe@posting.google.com>
I am trying to compile perl 5.8.0 with gcc 3.2.3 on a Linux 2.4.18
system having glibc 2.3.2. I am doing it in a chrooted environment. My
configure command is: sh Configure -Dprefix=/usr/local/static -Uusedl
When I do make, after a while I start getting warning about not
finding the locale related info and the default locale("C") is used.
Then compilation fails on file lib/ExtUtils/MakeMaker.pm line 229.
This line is concerned with calling function cwd(). The line where
make fails is given below:
my $pwd = cwd() || die "Can't figure out your cwd!"
Apparently the module Cwd can't figure out the current working
directory in my chrooted envioronment. Also I am not sure how module
Cwd is built and works with perl interpreter which I am still
compiling.
What can I do to get the compilation going? Any type of hack is
acceptatble. In fact I tried to replace the function call with actual
path string. But something was wrong in this approach and it did not
work.
Thanks in advance
vrihad
------------------------------
Date: Mon, 7 Jul 2003 11:38:38 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: Perl 5.8.0 compilation fails in chrooted environment
Message-Id: <bebm3u$2mqa$1@agate.berkeley.edu>
[A complimentary Cc of this posting was sent to
<vrihad@myway.com>], who wrote in article <2a024f54.0307070240.fcdbfbe@posting.google.com>:
> my $pwd = cwd() || die "Can't figure out your cwd!"
>
> Apparently the module Cwd can't figure out the current working
> directory in my chrooted envioronment. Also I am not sure how module
> Cwd is built and works with perl interpreter which I am still
> compiling.
> What can I do to get the compilation going? Any type of hack is
> acceptatble.
If `pwd' works, try replacing Cwd.pm with
package Cwd;
sub cwd { my $p = `pwd`; chop $p; $p }
1;
> In fact I tried to replace the function call with actual
> path string.
This call is made from tens of different directories.
Hope this helps,
Ilya
------------------------------
Date: 7 Jul 2003 00:04:52 -0700
From: james@microsec.co.uk (James Lavery)
Subject: Re: Pre-forking SOAP servers
Message-Id: <b966b3b3.0307062304.2abb5879@posting.google.com>
Julian,
Thanks for the pointer - will look into it.
My problem is that I don't really want to have to dive deep into SOAP
etc., I'm hoping someone's managed to do this with existing Perl SOAP
packages (e.g. SOAP::Lite). The main issue is control over creation of
socket listeners etc.
Yes, this may be lazy, but according to some Perl gurus, laziness is a
virtue!
James
"Julian Scarfe" <julian@avbrief.com> wrote in message news:<KEkNa.2528$ju6.37727@newsfep4-glfd.server.ntli.net>...
> "James Lavery" <james@microsec.co.uk> wrote in message
> news:b966b3b3.0307040842.6046d68@posting.google.com...
>
> > What I need to do is implement a pre-forking server - i.e. one which
> > forks of, say, 4 processes all listening on the same port.
> >
> > I've already got this working for our own (in-house) tcp/ip non-SOAP
> > server processes (i.e. several listening on a port, and the first
> > picks up a request and processes it while the others continue to
> > listen), but we need to extend this so that they can handle SOAP
> > requests also/instead.
> >
> > Any pointers would be greatly appreciated!
>
> Have you read Lincoln Stein's "Network Programming with Perl"? Although his
> examples of pre-forking servers (Chapter 15) are HTTP not SOAP, the
> principles may well be easily adaptable.
>
> Julian Scarfe
------------------------------
Date: 7 Jul 2003 04:58:37 -0700
From: alythh@netscape.net (Alythh)
Subject: read sensor data
Message-Id: <6a25ba72.0307070358.599a1e73@posting.google.com>
Can I have some advices on the correct (Perl) way to read/write to an
A/D card that I want to install on my PC to monitor sensors?
Thanks for any info!
Alessandro
------------------------------
Date: Mon, 07 Jul 2003 08:13:03 +0200
From: Zvone Zagar <zvone.zagar@siol.net>
Subject: Re: Reading JPEG file
Message-Id: <1a8Oa.55$2B6.10574@news.siol.net>
A. Sinan Unur wrote:
> Zvone Zagar <zvone.zagar@siol.net> wrote in
> news:7HGNa.22$2B6.2874@news.siol.net:
>
>> A. Sinan Unur wrote:
>>
>>> Zvone Zagar <zvone.zagar@siol.net> wrote in news:iafNa.2024$78.139057
>>> @news.siol.net:
>>>
>>>> A. Sinan Unur wrote:
>>>>
>>>>> Zvone Zagar <zvone.zagar@siol.net> wrote in
>>>>> news:GdKLa.1908$78.104444@news.siol.net:
>>>>>
>>>>>> I would like to read a jpg image, get data (decode) out of it and
>>>>>> make a postscript file from scratch. I can get width, height,
>>>>>> color depth but I don't know how to make a hex string needed for
>>>>>> postscript. Postscript line should look like: width height depth
>>>>>> matrix {<hex data>} false 3 colorimage.
>>> ...
>>>>> ImageMagick can save image data in raw RGB format. Although I have
>>>>> never used it, and do not have it installed, I thought pointing
>>>>> that out might help.
>>>>>
>>>>> Sinan.
>>>> I appologize for my late answer.
>>>> The raw RGB format is unfortunately not the proper one.
>>>> At first my lips smiled, but code generated is not PS digested.
>>>> I will dig deeper.
>>>
>>> If I understand correctly, you need to get to the raw RGB data
>>> somehow (I have no idea how one embeds jpegs in postscript), and then
>>> insert those data in the document as ascii hexadecimal numbers. Is
>>> that the case? If so, once you get the raw RGB data, you can easily
>>> get what you want. So, raw RGB would not be the solution to your
>>> problem, but the first step in a solution.
>
> <snip>
>
>> I really appreciate your effort. I set up temporary site at
>> http:/freeweb.siol.net/an511zvo where some examples will clarify my
>> intentions (I hope).
>
> It does. And thank you for posting a link rather than the actual files.
>
>> The Tk script creates a ps file. That is what I
>> want to make, but not using Tk. I would like to make text (console)
>> application which creates postscript file. File (I stripped off
>> unnecessary ps code) raptor2.ps is what I want to get at. The hex code
>> between curly braces and <> is the hex string which makes me perplexed.
>> I think that raw RGB data is the first step, too.
>
> OK, so you are trying to do what I thought you were trying to do. Go ahead
> and:
>
> 1. Decode the JPEG image into raw RGB format using ImageMagick
>
> 2. Print the value of each octet in the raw RGB data in hex, 66 characters
> per line
>
> 3. For the second part, printf and/or sprintf are your friends.
>
> This should not take a lot of code. If you run into problems, post your
> code here.
>
>> p.s. My appreciation was not empty words
>
> Never thought it was. You are welcome.
>
> Sinan.
Thanks
Zvone
------------------------------
Date: 7 Jul 2003 03:12:18 -0700
From: magelord@t-online.de (Math55)
Subject: Regex help...
Message-Id: <a2b8188a.0307070212.61b95436@posting.google.com>
hi, why does "log" find lines like that:
20030707062514.ksyms
anyone any idea????
THANK YOU:)
------------------------------
Date: Mon, 7 Jul 2003 11:16:50 +0000 (UTC)
From: "Bernard El-Hagin" <bernard.el-hagin@DODGE_THISlido-tech.net>
Subject: Re: Regex help...
Message-Id: <Xns93B186A7E4B87elhber1lidotechnet@62.89.127.66>
Math55 wrote:
> hi, why does "log" find lines like that:
>
>
> 20030707062514.ksyms
>
> anyone any idea????
What are you talking about?
> THANK YOU:)
You're welcome.
--
Cheers,
Bernard
--
echo 42|perl -pe '$#="Just another Perl hacker,"'
------------------------------
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 5187
***************************************