[9415] in Perl-Users-Digest
Perl-Users Digest, Issue: 3013 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 30 13:57:29 1998
Date: Tue, 30 Jun 98 10:46:24 -0700
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, 30 Jun 1998 Volume: 8 Number: 3013
Today's topics:
How to pass a code reference <indy@NOSPAMdemobuilder.com>
Re: How to pass a code reference (Matt Knecht)
Re: How to pass a code reference <tchrist@mox.perl.com>
Re: How to pass a code reference <david.x.corcoran@boeing.com>
Re: How to pass a code reference (Greg Bacon)
Re: How to pass a code reference <indy@NOSPAMdemobuilder.com>
Re: How to pass a code reference <indy@NOSPAMdemobuilder.com>
Re: How to pass a code reference (Mark-Jason Dominus)
How to read a PICT in Perl <pr1@club-internet.fr>
Re: How to read a PICT in Perl <rootbeer@teleport.com>
Re: How to test perl on my windows95 home computer...? (nobody)
Re: How to test perl on my windows95 home computer...? (Bob Trieger)
Re: How to test perl on my windows95 home computer...? (http://www.mjm.co.uk/software/)
Re: how to write CGI scripts to connect form in HTML to (Jeff Iverson)
HOW TO: freestanding modules? <NOSPAMkEynOn@panix.comNOSPAM>
Re: HOW TO: freestanding modules? <NOSPAMkEynOn@panix.comNOSPAM>
Re: HTML pages with Perl <ryan@steelplan.com.au>
HTML POST to a Perl CGI <ozslot@alphalink.com.au>
Re: HTML POST to a Perl CGI (Jeremy D. Zawodny)
Re: HTML POST to a Perl CGI (Bob Trieger)
Re: HTML POST to a Perl CGI (Abigail)
html2ps and ghostscript failing aaron.d.newsome@wdc.com
Re: html2ps and ghostscript failing aaron.d.newsome@wdc.com
I/O Flushing Problem with multiple Perl processes <Darrell@Nash.org>
Re: I/O Flushing Problem with multiple Perl processes <rootbeer@teleport.com>
ICE - Search engine <jbrackman@hotmail.com>
Re: ICE - Search engine <NOSPAM@NOSPAM.NET>
Re: Information wanted (Josh Kortbein)
Install error Msqlperl <bobbin@habibti.stuttgart.netsurf.de>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 29 Jun 1998 11:41:43 -0400
From: "Teflon" <indy@NOSPAMdemobuilder.com>
Subject: How to pass a code reference
Message-Id: <6n8bvn$bi2$1@nntp2.uunet.ca>
How can I pass a code reference to a subroutine and call the passed function
from the subroutine?
Specifically: instead of
$someobject->somefunction();
I would like to do something like:
Sub MySub
{
my ($fn) = @_; #??
# call function that was passed to me
$fn(); #??
}
# pass code ref to MySub
MySub(\$someobject->somefunction); #??
I have already tried looking in the FAQ page and in the Programming
Perlbook. Thanks in advance for any help.
------------------------------
Date: Mon, 29 Jun 1998 16:18:54 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: How to pass a code reference
Message-Id: <O7Pl1.3$Ci.1680887@news3.voicenet.com>
Teflon <indy@NOSPAMdemobuilder.com> wrote:
>How can I pass a code reference to a subroutine and call the passed function
>from the subroutine?
I'm sure I've read about this _somewhere_, but can't for the life of me
remember where.
Anyway, this works for me:
#!/usr/local/bin/perl
call_it(\*func);
sub func { print $_[0] }
sub call_it {
*function = shift;
function("Print some stuff\n");
}
__END__
Just pass a ref to typeglob, and call it however you normally would.
--
Matt Knecht - <hex@voicenet.com>
"496620796F752063616E207265616420746869732C20796F7520686176652066
617220746F6F206D7563682074696D65206F6E20796F75722068616E6473210F"
------------------------------
Date: 29 Jun 1998 16:24:20 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to pass a code reference
Message-Id: <6n8f3k$24p$2@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
hex@voicenet.com (Matt Knecht) writes:
:call_it(\*func);
:sub func { print $_[0] }
:sub call_it {
: *function = shift;
: function("Print some stuff\n");
:}
I would have written that:
call_it(\&func);
sub func { print $_[0] }
sub call_it {
local *function = shift;
function("Print some stuff\n");
}
Because that way you don't
1) cover up the other things named "function", just the
coderef part.
2) you undo your aliasing when the block exits.
Or as
call_it(\&func);
sub func { print $_[0] }
sub call_it {
my $coderef = shift;
$coderef->("Print some stuff\n");
}
That way you don't have any aliasing effects at all.
Or as
call_it(\&func);
sub func { print $_[0] }
sub call_it {
my $coderef = shift;
&$coderef("Print some stuff\n");
}
That way it works on earlier perls.
--tom
--
Real programmers can write assembly code in any language. :-)
--Larry Wall in <8571@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: Mon, 29 Jun 1998 16:42:35 GMT
From: David Corcoran <david.x.corcoran@boeing.com>
To: Teflon <indy@NOSPAMdemobuilder.com>
Subject: Re: How to pass a code reference
Message-Id: <3597C3FB.193A@boeing.com>
Teflon wrote:
>
> How can I pass a code reference to a subroutine and call the passed function
> from the subroutine?
>
> Specifically: instead of
> $someobject->somefunction();
>
> I would like to do something like:
> Sub MySub
> {
> my ($fn) = @_; #??
> # call function that was passed to me
> $fn(); #??
> }
>
> # pass code ref to MySub
> MySub(\$someobject->somefunction); #??
>
> I have already tried looking in the FAQ page and in the Programming
> Perlbook. Thanks in advance for any help.
$x = new foo();
bar(\&foo::print);
sub bar
{
my ($y) = @_;
&$y('there');
}
package foo;
sub new
{
bless {};
}
sub print
{
print "foo @_\n";
}
Also see:
http://www.aisd.com/technology/perl/man/perlref.shtml#perlref_description_0
------------------------------
Date: 29 Jun 1998 19:45:08 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: How to pass a code reference
Message-Id: <6n8qs4$6ut$4@info.uah.edu>
In article <6n8f3k$24p$2@csnews.cs.colorado.edu>,
Tom Christiansen <tchrist@mox.perl.com> writes:
: call_it(\&func);
: sub func { print $_[0] }
: sub call_it {
: my $coderef = shift;
: &$coderef("Print some stuff\n");
: }
:
: That way it works on earlier perls.
I'm not convinced that this is virtuous. :-)
Greg
--
open(G,"|gzip -dc");$_=<<EOF;s/[0-9a-f]+/print G pack("h*",$&)/eg
f1b88000b620f22320303fa2d2e21584ccbcf29c84d2258084
d2ac158c84c4ece4d22d1000118a8d5491000000
EOF
------------------------------
Date: Mon, 29 Jun 1998 17:48:01 -0400
From: "Teflon" <indy@NOSPAMdemobuilder.com>
Subject: Re: How to pass a code reference
Message-Id: <6n91ek$id1$1@nntp2.uunet.ca>
Hi, Thanks for your reply,
Using your example, if you use:
$x = new foo(some params);
$y = new foo(some other params);
bar(\&foo::print);
sub bar
{
my ($y) = @_;
&$y('there');
}
There are two now instances of foo. How can you make the call inside the
bar function be associated with a particular instance of foo? Should one
just pass in $x or $y an extra parameter, and use it in some way.
Thanks in advance for any help.
------------------------------
Date: Mon, 29 Jun 1998 17:48:01 -0400
From: "Teflon" <indy@NOSPAMdemobuilder.com>
Subject: Re: How to pass a code reference
Message-Id: <6n91kf$ig1$1@nntp2.uunet.ca>
Hi, Thanks for your reply,
Using your example, if you use:
$x = new foo(some params);
$y = new foo(some other params);
bar(\&foo::print);
sub bar
{
my ($y) = @_;
&$y('there');
}
There are two now instances of foo. How can you make the call inside the
bar function be associated with a particular instance of foo? Should one
just pass in $x or $y an extra parameter, and use it in some way.
Thanks in advance for any help.
------------------------------
Date: 30 Jun 1998 09:44:04 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: How to pass a code reference
Message-Id: <6naq34$l2m$1@monet.op.net>
In article <6n91ek$id1$1@nntp2.uunet.ca>,
Teflon <indy@NOSPAMdemobuilder.com> wrote:
>There are two now instances of foo. How can you make the call inside the
>bar function be associated with a particular instance of foo? Should one
>just pass in $x or $y an extra parameter, and use it in some way.
That's exactly what you should do.
sub bar {
my $func = shift;
&$func(@_);
}
bar(\&foo::print, $x);
------------------------------
Date: Tue, 30 Jun 1998 09:32:29 +0200
From: Philippe de Rochambeau <pr1@club-internet.fr>
Subject: How to read a PICT in Perl
Message-Id: <3598948D.B42729F0@club-internet.fr>
How can you read a PICT in Perl? I have tried unpack but can't figure out the
right format (s, S, I, etc.). I would like to open a PICT file, read its
contents, and transform them into a bitmap array (e.g., if pixel 1,1 is black,
then put 1 into the array, otherwise put 0, etc.)
Any help would be much appreciated.
Philippe de Rochambeau
------------------------------
Date: Tue, 30 Jun 1998 08:10:53 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: How to read a PICT in Perl
Message-Id: <Pine.GSO.3.96.980630010928.17225U-100000@user2.teleport.com>
On Tue, 30 Jun 1998, Philippe de Rochambeau wrote:
> How can you read a PICT in Perl? I have tried unpack but can't figure
> out the right format (s, S, I, etc.).
First, you'll need to find out the file format. Then you can see about
using Perl to read that format. The specification document for the format
should be what you need next. Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 28 Jun 1998 23:10:00 GMT
From: ac1@fspc.netsys.itg.telecom.com.au (nobody)
Subject: Re: How to test perl on my windows95 home computer...?
Message-Id: <6n6ig8$5af@newsserver.trl.OZ.AU>
Dan Boorstein (danboo@negia.net) wrote:
: F.Quednau wrote:
: >
: > Marcel Ouwendijk wrote:
: > >
: > > I want to test my perl programs on my homecomputer with windows95 befor i
: > > upload theme to my provider.
: > >
: >
: [snip]
: > installed. Don't worry if you don't have a network card, just install a Network
: > Card anyway :) Don't forget to include that particular Protocol. Then you get a
: [snip]
: hmm, do you have stock in 3com or some other network card vendor? :-)
: all you need is the TCP/IP drivers which are installed with dial-up
: networking. i've been running a webserver at home in win32 and linux for
: about 3+ years now with no network card in sight.
: cheers,
: --
: Dan Boorstein home: danboo@negia.net work: danboo@y-dna.com
: "THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
: - Cosmic AC
I run Perl (MKS soon to upgrade to th 'real' one) and the freeware Xitami
web server on my '95 box at home - no need for any network hardware, just
the dial-up stuff.
By the way, I liked the .sig; I think I read that story some 25 years ago.
AC (no, just plain AC=AllanC).
------------------------------
Date: Mon, 29 Jun 1998 11:16:02 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: How to test perl on my windows95 home computer...?
Message-Id: <6n7t5c$9u9$1@ligarius.ultra.net>
[ posted and mailed ]
"Bill Cheers" <bill.cheers@sk.sympatico.ca> wrote:
-> Hi
->
-> I too am interested in this question. I've written a Perl program or two
-> that I would like to test at home(Pentium,Windows95,etc.). I can only test
-> from the command line or through a browser with no access to the resulting
-> server error messages. So it would be real handy to try everything out
-> thoroughly here first. I downloaded Perl for Win32, Build 316 from
-> Activestate home page. I also tried to download the CGI module there but I
-> couldn't extract the files with WinZip 6.3 so I downloaded a more recent
-> version 2.42, as opposed to 2.39 on that site. When I tried to run the
-> module it aborted telling me I needed 5.004 as opposed to 5.003.whatever
-> that I currently have. I commented out the "require" in the CGI.pm and it
-> sorta works. Who knows maybe it'll work.
-> Anyways I am still stuck. How do I get my Perl script to run from the
-> browser page (.html file) here at home? Is it possible? By the way I have a
-> network card, TCP/IP drivers etc. whatever that was all about.
Get rid of that ActiveCrap! Go to http://www.perl.com/ and download the
standard port for win32. It is a bit larger but it is 5.004_02 and comes with
many of the modules already installed.
HTH
Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-800-286-0591
and let the jerk that answers know that his
toll free number was sent as spam. "
------------------------------
Date: Mon, 29 Jun 1998 16:24:32 GMT
From: mikem@netcomuk.co.uk (http://www.mjm.co.uk/software/)
Subject: Re: How to test perl on my windows95 home computer...?
Message-Id: <3597bee6.9540132@nntp.netcom.net.uk>
There is a program by Maxwell Nairn Andrews called WIN PERL
It is a complete editor and runs PERfectLy. I have found it a very
useful and easy to use tool..
Try a search for the author, and you should be able to find the
program. If you have problems, then let me know and I will send you
the zip..
Mike
mikem@mjm.co.uk
http://www.mjm.co.uk/mjm/
On Mon, 29 Jun 1998 11:16:02 GMT, sowmaster@juicepigs.com (Bob
Trieger) wrote:
>[ posted and mailed ]
>"Bill Cheers" <bill.cheers@sk.sympatico.ca> wrote:
>-> Hi
>->
>-> I too am interested in this question. I've written a Perl program or two
>-> that I would like to test at home(Pentium,Windows95,etc.). I can only test
>-> from the command line or through a browser with no access to the resulting
>-> server error messages. So it would be real handy to try everything out
>-> thoroughly here first. I downloaded Perl for Win32, Build 316 from
>-> Activestate home page. I also tried to download the CGI module there but I
>-> couldn't extract the files with WinZip 6.3 so I downloaded a more recent
>-> version 2.42, as opposed to 2.39 on that site. When I tried to run the
>-> module it aborted telling me I needed 5.004 as opposed to 5.003.whatever
>-> that I currently have. I commented out the "require" in the CGI.pm and it
>-> sorta works. Who knows maybe it'll work.
>-> Anyways I am still stuck. How do I get my Perl script to run from the
>-> browser page (.html file) here at home? Is it possible? By the way I have a
>-> network card, TCP/IP drivers etc. whatever that was all about.
>
>
>Get rid of that ActiveCrap! Go to http://www.perl.com/ and download the
>standard port for win32. It is a bit larger but it is 5.004_02 and comes with
>many of the modules already installed.
>
>
>HTH
>
>Bob Trieger
>sowmaster@juicepigs.com
>" Cost a spammer some cash: Call 1-800-286-0591
> and let the jerk that answers know that his
> toll free number was sent as spam. "
------------------------------
Date: Tue, 30 Jun 1998 06:08:04 GMT
From: j5rson@mctcnet.net (Jeff Iverson)
Subject: Re: how to write CGI scripts to connect form in HTML to MS Access
Message-Id: <359b80bb.88626784@news.mctcnet.net>
Gee, I do that stuff every day, it wouldn't really be a challenge. Do
you have any tougher homework you'd like me to do? After all, I
wouldn't want you to learn anything difficult... <grin>
On Tue, 23 Jun 1998 03:03:07 -0500, Buranee Putprasert
<buranee@gte.net> wrote:
>Hi All
>Right now I have to develop the web application for my class.
>Unfortunately I don't know how to do that. Now I have forms in HTML
>format and tables in MS Access. I don't know how to write CGI script
>using perl to add, delete, update, and query. If anyone knows how to,
>please feel free to give me the answer.
>My email is buranee@gte.net.
>Thank you in advance
>
>P.S. I want to run this application on Windows 95/NT with MS Web
>Server(IIS4)
Kind regards,
Jeff Iverson
--
The Directory of Computer Consultants & Developers
http://www.iversonsoftware.com/cgi-bin/randombanner.cgi
21 Devonshire Pl., Mankato MN 56001-4984
507-386-6208 - j5rson@iversonsoftware.com
------------------------------
Date: 30 Jun 1998 16:28:23 GMT
From: k y n n <NOSPAMkEynOn@panix.comNOSPAM>
Subject: HOW TO: freestanding modules?
Message-Id: <6nb3n7$aoo@news1.panix.com>
Keywords: Python
Hi. I'm trying to learn how to use packages and modules in Perl, but
after mucking around for a while, I haven't managed to figure out a
way to write a module so that it can also be called by itself as a
freestanding script. For example, suppose I have a module, call it
frotz.pm, containing one single function, call it frotz, for export.
Is it possible to arrange matters so that I can call frotz.pm from the
Unix shell command line, while at the same time being able to use
something like:
use frotz;
...
$x = &frotz::frotz();
in another module/script?
A related question is, is it possible to find out dynamically whether
the current scope is the same as main:: ?
And a last question is, does Perl have a provision (like, e.g., Python
has) for resolving circular module dependencies? The index of the
Camel book was not much help with this.
Thanks for your help,
K.
--
To those who prefer to reply by e-mail, please remove the upper-case
letters from the return address in the header. Thank you. K.
------------------------------
Date: 30 Jun 1998 17:26:19 GMT
From: k y n n <NOSPAMkEynOn@panix.comNOSPAM>
Subject: Re: HOW TO: freestanding modules?
Message-Id: <6nb73r$bmo@news1.panix.com>
Keywords: Python
In <6nb3n7$aoo@news1.panix.com> k y n n <NOSPAMkEynOn@panix.comNOSPAM> writes:
>Hi. I'm trying to learn how to use packages and modules in Perl, but
>after mucking around for a while, I haven't managed to figure out a
>way to write a module so that it can also be called by itself as a
>freestanding script. For example, suppose I have a module, call it
>frotz.pm, containing one single function, call it frotz, for export.
>Is it possible to arrange matters so that I can call frotz.pm from the
>Unix shell command line, while at the same time being able to use
>something like:
> use frotz;
> ...
> $x = &frotz::frotz();
>in another module/script?
OK, I found a way (before, not including "1;" at the end was tripping
me up). In twoX.pm:
----------------------------------------------------------------------
#!/usr/bin/perl -I/usr/people/kj2/Scripts/
package twoX;
sub twoX { 2*shift }
if ($0 =~ m|(.*/)?twoX\.pm$|) {
print &twoX(shift);
print "\n";
}
1; # Indispensable!
======================================================================
...and in sixX.pm:
----------------------------------------------------------------------
#!/usr/bin/perl -I/usr/people/kj2/Scripts
package sixX;
use twoX;
sub sixX { 3*&twoX::twoX(shift); }
if ($0 =~ m|(.*/)?sixX\.pm$|) {
print &sixX(shift);
print "\n";
}
1;
======================================================================
And:
shellPrompt % twoX 2
4
shellPrompt % sixX 2
12
Are there better ways to do this?
I'm still curious about these, though:
>A related question is, is it possible to find out dynamically whether
>the current scope is the same as main:: ?
>And a last question is, does Perl have a provision (like, e.g., Python
>has) for resolving circular module dependencies? The index of the
>Camel book was not much help with this.
>Thanks for your help,
>K.
--
To those who prefer to reply by e-mail, please remove the upper-case
letters from the return address in the header. Thank you. K.
------------------------------
Date: Mon, 29 Jun 1998 10:30:51 +0800
From: Ryan Snowden <ryan@steelplan.com.au>
Subject: Re: HTML pages with Perl
Message-Id: <3596FC5B.9FB00DCF@steelplan.com.au>
...
...
print "Content-type: text/html\n\n";
print<<HTML;
<html>
.. etc
</html>
HTML
..
.. continue on with perl program.
Basically, you can write HTML stuff on the fly, or dump it from your fav
HTML editor RIGHT into the CGI script. This is extremely handy for
implementing information stored in databases and embedding that
infomation in HTML forms.
Ry!
Jaap Prins wrote:
> Hello,
> Is it possible to produce an HTML page with a CGI-Perl programme
> using Perl 5.003(!)? If so, How?
> Thanks in advance
> Jaap Prins
------------------------------
Date: Sun, 28 Jun 1998 13:29:57 +1000
From: David Hamilton <ozslot@alphalink.com.au>
Subject: HTML POST to a Perl CGI
Message-Id: <3595B8B5.52988DBC@alphalink.com.au>
I have a HTML page that uses the post method to send data to a PERL CGI
with the standard decoding and converting to variables process, however
the script seems not to be recieving any data.
Does anyone know if a server's directory must be configured to allow
info exchange from a web page form to a CGI? Help from anyone who has
encounted a similar problem would be much appreciated.
Thanks.
------------------------------
Date: 28 Jun 1998 00:27:25 -0400
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: HTML POST to a Perl CGI
Message-Id: <m3ogvetaky.fsf@peach.z.org>
David Hamilton <ozslot@alphalink.com.au> writes:
> Does anyone know if a server's directory must be configured to allow
> info exchange from a web page form to a CGI? Help from anyone who has
> encounted a similar problem would be much appreciated.
Yes, it usually does. Your web server documentation should explain
this in details, as it varies from server to server.
Jeremy
--
Jeremy D. Zawodny Web Geek, Perl Hacker, etc.
http://www.wcnet.org/~jzawodn/ jzawodn@wcnet.org
LOAD "LINUX",8,1
------------------------------
Date: Sun, 28 Jun 1998 04:34:15 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: HTML POST to a Perl CGI
Message-Id: <6n4h80$tml$1@ligarius.ultra.net>
[ posted and mailed ]
David Hamilton <ozslot@alphalink.com.au> wrote:
-> I have a HTML page that uses the post method to send data to a PERL CGI
-> with the standard decoding and converting to variables process, however
-> the script seems not to be recieving any data.
Does the script work from the command line? If so, you don't have a perl
problem. And unfortunately we can't help you here.
-> Does anyone know if a server's directory must be configured to allow
-> info exchange from a web page form to a CGI? Help from anyone who has
-> encounted a similar problem would be much appreciated.
You'd be more likely to receive help asking in a newsgroup dedicated to cgi or
your http server.
news:compinfosystems.www.authoring.cgi
is the cgi newsgroup. Can't help you with the server one because you never
said what server or operating system you are using.
Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-800-286-0591
and let the jerk that answers know that his
toll free number was sent as spam. "
------------------------------
Date: 28 Jun 1998 10:00:21 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: HTML POST to a Perl CGI
Message-Id: <6n547l$838$11@client3.news.psi.net>
David Hamilton (ozslot@alphalink.com.au) wrote on MDCCLXII September
MCMXCIII in <URL: news:3595B8B5.52988DBC@alphalink.com.au>:
++ I have a HTML page that uses the post method to send data to a PERL CGI
++ with the standard decoding and converting to variables process, however
++ the script seems not to be recieving any data.
++
++ Does anyone know if a server's directory must be configured to allow
++ info exchange from a web page form to a CGI? Help from anyone who has
++ encounted a similar problem would be much appreciated.
Your question has nothing to do with Perl. It has nothing to do
CGI either. And not even the people in the server group could answer
your question, as you didn't provide any information about the server.
Heck, your question is lacking so much information, even directing you
to the appropriate group is impossible.
The best option you have is to buy a case of beer, and pay a visit
to your friendly sys/net/web-admin. (Who ever is in charge of the
software that does HTTP)
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
------------------------------
Date: Mon, 29 Jun 1998 06:13:28 GMT
From: aaron.d.newsome@wdc.com
Subject: html2ps and ghostscript failing
Message-Id: <6n7ba8$vcl$1@nnrp1.dejanews.com>
I have been a happy user of both ghostscript and html2ps for some time.
I recently began using html2ps to generate some database reports from a
mysql database (using perl scripts to pull the data from database and make
html, then using html2ps to build a printfile).
These database reports create very long tables (many pages), but I'm not
sure if that is the problem since I have successfully used html2ps on html
that had tables spanning as many as 20 pages!
Anyway, I am using Aladdin Ghostcript 5.10, and the command line looks
like this:
html2ps -D myfile.html > myfile.ps
pretty simple.
The error I get when I run this is:
Error: /rangecheck in --put-- Operand stack:
--nostringval-- 12.0 --nostringval-- 31 2 Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval--
2 %stopped_push --nostringval-- 2 3 %oparray_pop --nostringval--
--nostringval-- false 1 %stopped_push 1 3 %oparray_pop .runexec2
--nostringval-- --nostringval-- --nostringval-- 2 %stopped_push
--nostringval-- 8 1 16 --nostringval-- %for_pos_int_continue
--nostringval-- 1 1 1 --nostringval-- %for_pos_int_continue 1 1 100
--nostringval-- %for_pos_int_continue 1 1 1 --nostringval--
%for_pos_int_continue --nostringval-- --nostringval-- --nostringval--
--nostringval-- --nostringval-- 5 4 %oparray_pop Dictionary stack:
--dict:770/809-- --dict:0/20-- --dict:43/200-- --dict:504/2000--
Current allocation mode is local Current file position is 243969
GS<1>
Does anyone have any idea of what any of this means or how I would go
about fixing it.
I would really appreciate any help.
Thanks, Aaron Newsome
aaron.d.newsome@wdc.com
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 29 Jun 1998 22:53:10 GMT
From: aaron.d.newsome@wdc.com
Subject: Re: html2ps and ghostscript failing
Message-Id: <6n95sm$bgn$1@nnrp1.dejanews.com>
In article <6n7ba8$vcl$1@nnrp1.dejanews.com>,
aaron.d.newsome@wdc.com wrote:
>
> I have been a happy user of both ghostscript and html2ps for some time.
>
> I recently began using html2ps to generate some database reports from a
> mysql database (using perl scripts to pull the data from database and make
> html, then using html2ps to build a printfile).
>
> These database reports create very long tables (many pages), but I'm not
> sure if that is the problem since I have successfully used html2ps on html
> that had tables spanning as many as 20 pages!
>
> Anyway, I am using Aladdin Ghostcript 5.10, and the command line looks
> like this:
>
> html2ps -D myfile.html > myfile.ps
>
> pretty simple.
>
> The error I get when I run this is:
>
> Error: /rangecheck in --put-- Operand stack:
> --nostringval-- 12.0 --nostringval-- 31 2 Execution stack:
> %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval--
> 2 %stopped_push --nostringval-- 2 3 %oparray_pop --nostringval--
> --nostringval-- false 1 %stopped_push 1 3 %oparray_pop .runexec2
> --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push
> --nostringval-- 8 1 16 --nostringval-- %for_pos_int_continue
> --nostringval-- 1 1 1 --nostringval-- %for_pos_int_continue 1 1 100
> --nostringval-- %for_pos_int_continue 1 1 1 --nostringval--
> %for_pos_int_continue --nostringval-- --nostringval-- --nostringval--
> --nostringval-- --nostringval-- 5 4 %oparray_pop Dictionary stack:
> --dict:770/809-- --dict:0/20-- --dict:43/200-- --dict:504/2000--
> Current allocation mode is local Current file position is 243969
> GS<1>
>
> Does anyone have any idea of what any of this means or how I would go
> about fixing it.
>
> I would really appreciate any help.
>
> Thanks, Aaron Newsome
> aaron.d.newsome@wdc.com
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
>
Well, I answered my own question here. It turned out that there was a missing
</font> tag in the html.
My bad - bigtime.
Sorry for the troubles, html2ps is the coolest thing since perl itself.
Thanks, Aaron Newsome
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 29 Jun 1998 20:06:20 -0600
From: "Darrell Nash" <Darrell@Nash.org>
Subject: I/O Flushing Problem with multiple Perl processes
Message-Id: <3598481a.0@news.cadvision.com>
Hello Folks,
I am suffering a strange problem I haven't encountered in other languages -
I have a Perl program that forks into several processes, each of which needs
to write to the same log file.
I simply open the file (open LOG ">>$LOGFILE") in the main parent process
before forking the children, and then "print LOG ..." where I need it.
However, the data does not get written to the file until AFTER the process
itself shuts down - even if I try to force the flushes to occur (via
autoflush() and $|=1), or close the file during the process. Since some of
the processes can possibly write out megabytes of log info, they tend to
lock up after a while (I'm assuming a buffer fills up and blocks).
I've also tried just using STDOUT and redirecting to a file, as well as
opening separate log files for each process (not an adequate solution for
me, anyway), but the problem persists!
Forgive me if this has come up before, or has a blatently obvious solution -
I didn't spot it in the FAQ. Thank you in advance for any hints you can
throw my way (or documents you can point me to).
Darrell Nash
nash@freerealtime.com
------------------------------
Date: Tue, 30 Jun 1998 03:30:10 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: I/O Flushing Problem with multiple Perl processes
Message-Id: <Pine.GSO.3.96.980629202745.17225G-100000@user2.teleport.com>
On Mon, 29 Jun 1998, Darrell Nash wrote:
> I simply open the file (open LOG ">>$LOGFILE") in the main parent
> process before forking the children, and then "print LOG ..." where I
> need it.
You want to have an exclusive lock on any file which may be written to by
more than one concurrent process, including in this case. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 30 Jun 1998 04:39:23 GMT
From: "Jason" <jbrackman@hotmail.com>
Subject: ICE - Search engine
Message-Id: <%ZZl1.2238$606.11427844@news.rdc1.ab.wave.home.com>
Looking for some help with a search engine called ICE for the win32 system.
(http://www.informatik.tu-darmstadt.de/~neuss/ice/ice.html ). I am
currently running this on a Xitami Web Server w/ perl 5.0 and have
configured this script to work with my machine .. but when the search is
complete it produces results that do not follow a correct path.
IE: 1) completes a search for a page that is located in
www.wherever.com/database/link.htm
2)Produces the result www.wherever.com/link.htm
What the heck happened to my directory structure?? Very annoying .. I'm
sure that this is only a simple variable that I'm messed up the settings but
any help would be appreciated.
Please reply in the group or directly to me... thanks.
Jason Brackman
------------------------------
Date: Tue, 30 Jun 1998 09:46:35 +0200
From: "Christopher Paul" <NOSPAM@NOSPAM.NET>
Subject: Re: ICE - Search engine
Message-Id: <6na53i$3rt$1@newton.a2000.nl>
hi jason,
you need to set the 'aliases' hash properly..
something like:
%aliases = {
"/usr/web/folder/database" , "/database"
}
or maybe the alias goes first, then the server path.. you
can work it out from the example %aliases hash that
christian provides in the script.
Jason wrote in message
>IE: 1) completes a search for a page that is located in
>www.wherever.com/database/link.htm
>
> 2)Produces the result www.wherever.com/link.htm
>
------------------------------
Date: 29 Jun 1998 16:55:56 GMT
From: kortbein@iastate.edu (Josh Kortbein)
Subject: Re: Information wanted
Message-Id: <6n8gus$8i5$2@news.iastate.edu>
Michael J Gebis (gebis@albrecht.ecn.purdue.edu) wrote:
: luong@my-dejanews.com writes:
: }Could anybody tell me where on the Internet that I can find the documentation
: }of Perl for Win 32 and where I can download the perl modules.
: }Thanks.
: In the version of netscape you're using, you can probably go the the
: "Go to:" box and type "perl". Those behind firewalls might have to
: type "perl.com" but it could hardly be much easier. Really pedantic
: folks might have to type "http://www.perl.com/".
: Unfortunately, I now answered your question, and you have a debt
: until _you_ help out someone in need. Seems like a pretty lame
: question to go into debt over, but that was your decision, not mine.
: Homer: So you're selling what?
: Apu: Karmic realignment.
: Homer: You can't sell that. Karma can only be apportioned by the universe.
Now, if only all snippy RTFM replies to stupid questions would include
snippets of Simpsons humor, I wouldn't mind them [the replies] at all!
Josh
--
_________________________________________________________
I do not trust your bitch.
- Frederich Nietzche, in _Also Sprach Zarathustra_
------------------------------
Date: Mon, 29 Jun 1998 20:07:00 +0200
From: Ian Portman <bobbin@habibti.stuttgart.netsurf.de>
Subject: Install error Msqlperl
Message-Id: <3597D7C4.756EA1B0@habibti.stuttgart.netsurf.de>
My system admin tells me mSQL is working fine on her machine.
But when I make Msqlperl and then run the test, I get:
make test
PERL_DL_NONLAZY=1 /usr/local/bin/perl -I./blib/arch -I./blib/lib
-I/usr/lib/perl
5/i586-linux/5.00401 -I/usr/lib/perl5 -e 'use Test::Harness qw(&runtests
$verbos
e); $verbose=0; runtests @ARGV;' t/*.t
t/msql..............Use of uninitialized value at t/msql.t line 42.
not ok 1:
It looks as if your server is not up and running.
This test requires a running server.
Please make sure your server is running and retry.
FAILED tests 1-68
Failed 68/68 tests, 0.00% okay
t/msql2.............skipping test on this platform
Failed Test Status Wstat Total Fail Failed List of failed
------------------------------------------------------------------------------
t/msql.t 68 68 100.00% 1-68
Failed 1/2 test scripts, 50.00% okay. 68/68 subtests failed, 0.00% okay.
make: *** [test_dynamic] Error 29
Anyone know what's wrong?
Thanks for your time
Ian
ian@kupola.com
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 3013
**************************************