[17980] in Perl-Users-Digest
Perl-Users Digest, Issue: 140 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 25 11:21:29 2001
Date: Thu, 25 Jan 2001 08:05:15 -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: <980438714-v10-i140@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 25 Jan 2001 Volume: 10 Number: 140
Today's topics:
Re: Allocating ports in perl (Nick Condon)
ANNOUNCE: XML::Parser::EasyTree 0.01 (Eric Bohlman)
Re: Catching warnings from Getopt::Std <james@NOSPAM.demon.co.uk>
Re: Confussed on IPC (Abigail)
Re: Converting text to html (Rafael Garcia-Suarez)
Re: database (Tad McClellan)
Re: database <julien.quint@imag.fr>
Re: database keith.jarman@cwcom.co.uk
Date and time <marekpow@email.hinet.hr>
Re: Date and time (Bernard El-Hagin)
Error Message <dfreeman@rathis.com>
Re: Error Message <brentdax1_@_earthlink.net>
Re: Error Message <dfreeman@rathis.com>
Re: FAQ 1.3: Which version of Perl should I use? (Peter J. Acklam)
Re: FileHandle Question? knb50@my-deja.com
help wanted DBI & oracle <rmillet@enssat.fr>
Re: HELP WANTED: perl ans oracle database <tward10@jaguar.com>
Re: How can i delete an item in the middle of an array (Peter J. Acklam)
Re: How to make Win32 Executables from Perl Scripts? <carvdawg@patriot.net>
Iterating through matches to a regexp ? tmark@my-deja.com
Re: Newbie Perl Problem (Helgi Briem)
Re: Newbie question: unpacking a C structure (Greg Bacon)
Re: partition a large file into a number of small ones peter@icke-reklam.ipsec.nu.invalid
Re: pdf2html philhibbs@my-deja.com
Re: perl editors jdanieli@my-deja.com
Re: perl editors (Bill Feidt)
Re: perl editors knb50@my-deja.com
Re: perl editors mike_solomon@lineone.net
Re: Perl is bad at (very) simple math! philhibbs@my-deja.com
Re: Perl is bad at (very) simple math! philhibbs@my-deja.com
Re: PerlCGI writing to STDIN of another prog <Jerome.Abela@free.fr>
Re: Problem Connecting to Database <robinc@LMGroup.com>
Re: Problem Connecting to Database <robinc@LMGroup.com>
Reading from named pipes <richard.bragg.bsc@ntl.remove.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 25 Jan 2001 15:30:37 GMT
From: nickco3@yahoo.co.uk (Nick Condon)
Subject: Re: Allocating ports in perl
Message-Id: <903493374NickCondon@132.146.16.23>
ayeletma1@my-deja.com wrote in <94opki$ul6$1@nnrp1.deja.com>:
>I need to allocate a port and check port status from a perl script.
>Is there a function or a package I can use?
A serial/parallel port? A TCP socket? Tell us more.
------------------------------
Date: 24 Jan 2001 22:00:32 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: ANNOUNCE: XML::Parser::EasyTree 0.01
Message-Id: <t7048f9u69137e@corp.supernews.com>
XML::Parser::EasyTree, now available from CPAN in
/authors/id/E/EB/EBOHLMAN, adds a new "EasyTree" style to XML::Parser.
This builds tree structures that are, at least IMHO, easier to work with
than the ones built using the built-in "Tree" style. Tree nodes are hash
references with keys for node type (element, text, processing
instruction), contents, attributes, etc. It supports namespaces,
conversion from UTF-8 to Latin-1, and stripping of "cosmetic" whitespaces.
------------------------------
Date: Thu, 25 Jan 2001 13:43:28 +0000
From: James Taylor <james@NOSPAM.demon.co.uk>
Subject: Re: Catching warnings from Getopt::Std
Message-Id: <ant251328868fNdQ@oakseed.demon.co.uk>
In article <wl366j4m4wa.fsf@plume.nl.compuware.com>, Johan Vromans
<URL:mailto:JVromans@Squirrel.nl> wrote:
>
> I'd suggest to use Getopt::Long instead. Despite the name, it handles
> single-character options and bundling just like Getopt::Std.
>
> use Getopt::Long;
> Getopt::Long::Configure(bundling);
Interesting thanks. I might very well use Getopt::Long next time I
have a large program to write. It is so much larger than Getopt::Std
that I wouldn't use it for small/fast stuff.
Is that bundling bareword correct or should it be in quotes?
--
James Taylor <james (at) oakseed demon co uk>
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02
------------------------------
Date: 25 Jan 2001 11:10:16 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Confussed on IPC
Message-Id: <slrn9702co.krh.abigail@tsathoggua.rlyeh.net>
David Colson (davecolson@pro-usa.net) wrote on MMDCCIII September
MCMXCIII in <URL:news:3A6F42B8.33F6A7DF@pro-usa.net>:
[] Hi,
[]
[] Can some tell me how write a code segment that will allow me to start a
[] program
[] and then be able to commuicate with it, both read and write.
man IPC::open2
[] The perl doc on IPC is not very clear to me. I am not a programmer by
[] trade.
Can someone tell me how to set a broken bone? The documentation on
bones is not very clear to me. I am not a doctor by trade.
Abigail
--
sub f{sprintf$_[0],$_[1],$_[2]}print f('%c%s',74,f('%c%s',117,f('%c%s',115,f(
'%c%s',116,f('%c%s',32,f('%c%s',97,f('%c%s',0x6e,f('%c%s',111,f('%c%s',116,f(
'%c%s',104,f('%c%s',0x65,f('%c%s',114,f('%c%s',32,f('%c%s',80,f('%c%s',101,f(
'%c%s',114,f('%c%s',0x6c,f('%c%s',32,f('%c%s',0x48,f('%c%s',97,f('%c%s',99,f(
'%c%s',107,f('%c%s',101,f('%c%s',114,f('%c%s',10,)))))))))))))))))))))))))
------------------------------
Date: Thu, 25 Jan 2001 11:06:54 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Converting text to html
Message-Id: <slrn97027d.g3c.rgarciasuarez@rafael.kazibao.net>
pularis@my-deja.com wrote in comp.lang.perl.misc:
> Hey,
>
> I was trying to convert a text file to html file using my limited
> perl skills. It seems to work fine, with minor issues. I am using the
> <pre> tah and then I use the following to copy the contents of one file
> to another.
I imagine that one of the minor issues is : if your text file contains
characters such as "<" or ">", you need to change them to the equivalent
html entities.
There's a module HTML::Entities, available on CPAN, that handles this
for you.
> If a line begins with certain words ( i.e Server ) I want the line to
> be centred ( by including the line between <center> tags ) how can I do
> this ?.
One way is :
$_ = "<center>$_</center>" if /^Server/;
> Also I would like to make all numbers bold ( by including em in
> <b>,</b> tag.
One way is :
s!\b(\d+)\b!<b>$1</b>!g;
the \b ensures that numbers are not included in words (as in "i18n").
> What regular xpressions should i use to accomplish this task. thx
The perlre part of the standard documentation describe extensively Perl
regular expressions.
--
Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: Thu, 25 Jan 2001 13:27:32 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: database
Message-Id: <slrn9703a0.6hc.tadmc@tadmc26.august.net>
mellouet.ronan <mellouet.ronan@wanadoo.fr> wrote:
>
>I've just finished the program Hello word in the book "Introduction to perl"
>at O'REILLY.
O'Reilly does not publish a book with that title.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 25 Jan 2001 14:34:07 +0100
From: Julien Quint <julien.quint@imag.fr>
Subject: Re: database
Message-Id: <khvpuhbbvsg.fsf@imag.fr>
tadmc@augustmail.com (Tad McClellan) writes:
> >I've just finished the program Hello word in the book "Introduction to perl"
> >at O'REILLY.
>
> O'Reilly does not publish a book with that title.
The French translation of "Learning Perl" (the Lama Book) is called
"Introduction à Perl", which must have caused the confusion, as it is published
under the O'Reilly label.
--
Julien
------------------------------
Date: Thu, 25 Jan 2001 14:30:31 GMT
From: keith.jarman@cwcom.co.uk
Subject: Re: database
Message-Id: <94pda7$djo$1@nnrp1.deja.com>
In article <94olj9$lh3$1@wanadoo.fr>,
"mellouet.ronan" <mellouet.ronan@wanadoo.fr> wrote:
> Hi,
>
> I've just finished the program Hello word in the book "Introduction
to perl"
> at O'REILLY.
>
> But, I don't succeed to run the database of the name and password.
>
> the sub program is :
>
> sub init_words {
> while ( defined($filename=glob("*.secret")) ){
>
> open (WORDLIST, $filename)|| die "couldn't open wordlist: $!";
> if(-M WORDLIST<7.0) {
>
> while ($name=<WORDLIST>){
> chomp ($name);
> $words=<WORDLIST>;
> chomp ($word);
> $words{$name}=$word;
> }
>
> } else {
> rename ($filename,"$filename.old") || die "can't rename
file: $!";
> }
>
> close (WORDLIST)||die "could't close wordlist: $!";
> }
> }
>
> So the problem is for read the database wordlist : I' don't know wich
name I
> should give to it. The program doesn't recognize it. I've tried
> "wordlist.txt" and "wordlist" but it doesn't work. The database is in
the
> same directorie of my program Hello.pl.
>
> Can you help me!!
>
> ronan@long-dian.com
>
>
Hi
Change the line $words=<WORDLIST>; to be $word=<WORDLIST>;
HTH
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 25 Jan 2001 15:39:48 +0100
From: "MaxyM" <marekpow@email.hinet.hr>
Subject: Date and time
Message-Id: <94pdue$eptr$1@as121.tel.hr>
I wonder if it is possible that Perl reads data from the Web Page and then
store data to a file, and
also write date and time when data arrives.
------------------------------
Date: Thu, 25 Jan 2001 14:53:14 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: Date and time
Message-Id: <slrn970fe0.2q0.bernard.el-hagin@gdndev25.lido-tech>
On Thu, 25 Jan 2001 15:39:48 +0100, MaxyM <marekpow@email.hinet.hr>
wrote:
>I wonder if it is possible that Perl reads data from the Web Page and then
>store data to a file, and
>also write date and time when data arrives.
Indubitably.
Cheers,
Bernard
--
#requires 5.6.0
perl -le'* = =[[`JAPH`]=>[q[Just another Perl hacker,]]];print @ { @ = [$ ?] }'
------------------------------
Date: Thu, 25 Jan 2001 10:12:18 -0500
From: "Dustin" <dfreeman@rathis.com>
Subject: Error Message
Message-Id: <t70gja9ehe3vb8@corp.supernews.com>
I'm very new to Perl/cgi programming and I am getting an error with a
recently acuirred script . I'm running Apache web server on my local
machine for testing purposes then transfering them to a WinNt server.
The error i'm getting is "couldn't spawn child process:" I have know idea
what this is telling me.
Could someone please help!
Dustin
Rath Information Systems
------------------------------
Date: Thu, 25 Jan 2001 15:29:01 GMT
From: "Brent Dax" <brentdax1_@_earthlink.net>
Subject: Re: Error Message
Message-Id: <1DXb6.8651$KJ3.535169@newsread2.prod.itd.earthlink.net>
Hash: SHA1
"Dustin" <dfreeman@rathis.com> wrote in message
news:t70gja9ehe3vb8@corp.supernews.com...
> I'm very new to Perl/cgi programming and I am getting an error with
> a recently acuirred script . I'm running Apache web server on my
> local machine for testing purposes then transfering them to a WinNt
> server. The error i'm getting is "couldn't spawn child process:" I
> have know idea what this is telling me.
Is your local machine a Windows one? Last I checked, WinNT didn't
support fork(), which would mean any script with fork() would be
useless. Check the ActiveState release notes on that one though, I'm
not sure.
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBOnBGHLJgQ5JqNEGyEQJBUwCg3H0Su6emC8/YmpTVgRGAS9fNFpAAn3uw
sKO86+25jRdSxMgkfhd1Ukgg
=0DW3
-----END PGP SIGNATURE-----
------------------------------
Date: Thu, 25 Jan 2001 10:42:51 -0500
From: "Dustin" <dfreeman@rathis.com>
Subject: Re: Error Message
Message-Id: <t70icjemiog4d0@corp.supernews.com>
Brent,
I am running NT4 on my local system.
The was no metion of fork() in any documentation that a got with the script.
What is it? This is only the 5th script that i have set up and I have been
doing pretty good until now.
Dustin
"Brent Dax" <brentdax1_@_earthlink.net> wrote in message
news:1DXb6.8651$KJ3.535169@newsread2.prod.itd.earthlink.net...
>
> Hash: SHA1
>
> "Dustin" <dfreeman@rathis.com> wrote in message
> news:t70gja9ehe3vb8@corp.supernews.com...
> > I'm very new to Perl/cgi programming and I am getting an error with
> > a recently acuirred script . I'm running Apache web server on my
> > local machine for testing purposes then transfering them to a WinNt
> > server. The error i'm getting is "couldn't spawn child process:" I
> > have know idea what this is telling me.
>
> Is your local machine a Windows one? Last I checked, WinNT didn't
> support fork(), which would mean any script with fork() would be
> useless. Check the ActiveState release notes on that one though, I'm
> not sure.
>
>
> Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>
>
> iQA/AwUBOnBGHLJgQ5JqNEGyEQJBUwCg3H0Su6emC8/YmpTVgRGAS9fNFpAAn3uw
> sKO86+25jRdSxMgkfhd1Ukgg
> =0DW3
> -----END PGP SIGNATURE-----
>
>
>
------------------------------
Date: 25 Jan 2001 14:00:32 +0100
From: jacklam@math.uio.no (Peter J. Acklam)
Subject: Re: FAQ 1.3: Which version of Perl should I use?
Message-Id: <wkofwvlspe.fsf@math.uio.no>
PerlFAQ Server <faq@denver.pm.org> writes:
> Which version of Perl should I use?
>
> ...
> The most recent production release is 5.005_03 (although
^^^^^^^^
> 5.004_05 is still supported). The most cutting-edge
> development release is 5.005_57.
^^^^^^^^
I guess this needs updating.
Peter
--
$\="\n";$_='The quick brown fox jumps over the lazy dog';print +(split
//)[20,5,24,31,3,36,14,12,31,1,2,11,9,23,33,29,35,15,32,36,7,8,28,29];
(One billion seconds since the epoch at 2001-09-09 03:46:40)
------------------------------
Date: Thu, 25 Jan 2001 13:13:03 GMT
From: knb50@my-deja.com
Subject: Re: FileHandle Question?
Message-Id: <94p8oq$9f2$1@nnrp1.deja.com>
In article <3a6f91b1.524144494f47414741@radiogaga.harz.de>,
martin@radiogaga.harz.de wrote:
> > I have five file which I need to run the same program
> > over. I was just going to open(FILE, "<$file"), in the for loop and
> > change out $file each time with the new filename, but I only get >
> > every other file to open up.
> >
> > ----------------------
> > my @array=("*.f1","*.f2","*.f3","*.f4","*.f5);
> > for($i=0; $i<5; $i++){
> > $file=$array[$i];
> > open (FILE,"<$file")||die...
> > # do the program stuff here...
> > close(FILE);
> > }
> > ----------------------
> >
> > Is this completely illegal?--to use the same FileHandle for
different
> > files? or am I completely insane at this point?
>
> No and no.
>
> Perl can even assist you in that it closes an open filehandle if you
> use it in an open statement. See `perldoc -f close'.
>
> But it won't work with wildcarded file names. Or do you really have
> files named *.f1 on your disk?
>
> And a style thingie: The above form of the for loop is only used if
> you explicitely need access to the loop variable. Otherwise, iterating
> over an array can be done by
>
> for my $file (@array) {
> #...
> }
>
> cu,
> Martin
> --
> One OS to rule them all | Martin Vorlaender | VMS & WNT
programmer
> One OS to find them | work: mv@pdv-systeme.de
> One OS to bring them all | http://www.pdv-
systeme.de/users/martinv/
> And in the Darkness bind them.| home: martin@radiogaga.harz.de
>
Thanks for your help. You're absolutely right, as I suspected and I
appreciate it. Just so as to let you know, though, it was necessary
for the for loop, and I was using wildcards. You're pretty perceptive!
I'm just going to have to do it the hard way without a loop, but it's
only five files. Thanks again!
Kim
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 25 Jan 2001 17:04:15 +0100
From: Millet Regis <rmillet@enssat.fr>
Subject: help wanted DBI & oracle
Message-Id: <3A704E7F.E62DEC6F@enssat.fr>
could anyone help me to find the problem in this connection line??
$dbh = DBI->connect('dbi:Oracle:', usr,pwd);
it gives me the error:
DBI->connect failed: Error while trying to retrieve text for error
ORA-12545 (DBD ERROR: OCIServerAttach)
thanks.
------------------------------
Date: Thu, 25 Jan 2001 12:14:50 -0000
From: "Trevor Ward" <tward10@jaguar.com>
Subject: Re: HELP WANTED: perl ans oracle database
Message-Id: <94p5bq$74d6@eccws12.dearborn.ford.com>
? Have you installed the Oracle part of DBI and DBI into the Perl version
You are using..
If you have then make sure you have defined the perl path on the unix box
correctly.
The later does look ok from the message. Me thinks it hasn't installed the
oracle DBI.
Millet Regis <rmillet@enssat.fr> wrote in message
news:3A700879.BED84139@enssat.fr...
> hello,
>
> could qnyone help me?
>
> i'm trying to control an oracle database with perl under unix, but the
> execution gives me the the error message:
>
> install_driver(Oracle) failed: Can't load
>
'/usr/local/lib/perl5/site_perl/5.005/alpha-dec_osf/auto/DBD/Oracle/Oracle.s
o'
> for module DBD::Oracle: dlopen: cannot load
>
/usr/local/lib/perl5/site_perl/5.005/alpha-dec_osf/auto/DBD/Oracle/Oracle.so
> at /usr/local/lib/perl5/5.00502/alpha-dec_osf/DynaLoader.pm line 168.
>
>
> i don't understqnd a single word, so if anybody knows the answer, could
> he send it to me.
>
> thanks a lot
------------------------------
Date: 25 Jan 2001 14:00:18 +0100
From: jacklam@math.uio.no (Peter J. Acklam)
Subject: Re: How can i delete an item in the middle of an array
Message-Id: <wkvgr3lswk.fsf@math.uio.no>
Tore Aursand <tore@extend.no> writes:
> telecino@cinoche.com says...
>
> > It contains many elements, each time in a different order, and
> > it contains an item called "X" that i don't want there. I want
> > to delete it from the array, but i don't know it's position,
> > so i can't use splice.
>
> my @array = qw( a b c d X e f g h);
> my $not_wanted = 'X';
> my @new_array = grep(!/^$not_wanted/, @array);
That would remove all elements that begin with 'X', not only those
that are identical to 'X'. I would use
@array = grep { $_ ne 'X' } @array.
Peter
--
$\="\n";$_='The quick brown fox jumps over the lazy dog';print +(split
//)[20,5,24,31,3,36,14,12,31,1,2,11,9,23,33,29,35,15,32,36,7,8,28,29];
(One billion seconds since the epoch at 2001-09-09 03:46:40)
------------------------------
Date: Thu, 25 Jan 2001 07:05:44 -0500
From: H C <carvdawg@patriot.net>
Subject: Re: How to make Win32 Executables from Perl Scripts?
Message-Id: <3A701698.D1AA55CF@patriot.net>
http://www.perl2exe.com
Alberto wrote:
> Hi! I'm Newbie and I would like to know how can I make
> Win32 executables from Perl Scripts. I'm trying with "perlcc"
> but I get errors.
> Thank U in advance,
> - Alberto -
--
Q: Why is Batman better than Bill Gates?
A: Batman was able to beat the Penguin.
------------------------------
Date: Thu, 25 Jan 2001 15:13:03 GMT
From: tmark@my-deja.com
Subject: Iterating through matches to a regexp ?
Message-Id: <94pfpl$g0b$1@nnrp1.deja.com>
Hi all,
I have a regexp - say, 'A{1,}B{1,}', and a target string (say,
'AAABBB'). Is there a way to iterate through possible matches to this
regexp, returning, for instance, 'AB', 'AAB', 'AABB', etc. ?
Thanks in advance for any help offered.
terry
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Tue, 23 Jan 2001 13:12:09 GMT
From: helgi@NOSPAMdecode.is (Helgi Briem)
Subject: Re: Newbie Perl Problem
Message-Id: <3a6d8123.103660515@news.itn.is>
On Mon, 22 Jan 2001 11:17:33 GMT, badass101@my-deja.com
wrote:
>Hi,
>
>I have a variable, $text1, which is full of text.
>I want to strip the whitespace and new lines out of the file so that i
>get a list of words, seperated by a space,
>
>e.g.
>word1 word2 word3
>
>How can i do this easily??
First you say you have a variable full of text.
Then you say you have a file.
Which is it?
If you want help, post some code and
don't use an information-free subject line
like "Newbie Perl Problem". It is a good
way to get completely ignored.
While you are thinking deeply on these things
you might have a look at:
"perldoc -f open" to learn how to open files and
"perldoc perlsyn" to learn about the while loop
"perldoc -f split" to learn how to split text into a list
Regards,
Helgi Briem
------------------------------
Date: Thu, 25 Jan 2001 16:03:08 -0000
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: Newbie question: unpacking a C structure
Message-Id: <t70jhsjjgh1kb1@corp.supernews.com>
In article <94ooss$u0e$1@nnrp1.deja.com>,
<prpr1685@my-deja.com> wrote:
: I would like to use unpack to unpack a C structure such as the
: following:
:
: typedef struct {
: char version [5+1];
: char first_id [15+1];
: char quantity [12+1];
: char browser_type [128+1];
: ...
:
: Will unpack ( 's6 s16 s13 s129...') do the trick or do I need to add
: As, and/or xs? When do you use As and xs? Does it depend on the
: compiler and the operating system which you are using?
No, yes, and yes. If I were you, I'd write an extension to do the
packing and unpacking for you like pack_sockaddr_in in Socket.pm.
Greg
--
Cartman: Moooooom! Kitty's being a dildo!
Mom: Well, I know a certain kitty-kitty who's sleeping with Mommy tonight!
------------------------------
Date: 25 Jan 2001 11:44:24 GMT
From: peter@icke-reklam.ipsec.nu.invalid
Subject: Re: partition a large file into a number of small ones
Message-Id: <94p3io$ll3$1@nyheter.crt.se>
In comp.unix.admin Y. Zhang <ydzhang@iastate.edu> wrote:
> Hi,
> I have a text file which is huge one (~270mb) with million lines. I
> want to divide this file into small ones (50 mb or 4000 lines each). I
> am use a unix osf system.
man split
SPLIT(1) FreeBSD General Commands Manual SPLIT(1)
NAME
split - split a file into pieces
SYNOPSIS
split [-b byte_count[k|m]] [-l line_count] [-p pattern] [file [name]]
DESCRIPTION
The split utility reads the given file (or standard input if no file is
specified) and breaks it up into files of 1000 lines each.
< ... >
> Any advice is appreciated.
> Yuandan
--
Peter Håkanson Phone +46707328101 Fax +4631223190
IPSec sverige Email peter@ipsec.nu
"Safe by design" Address Bror Nilssons gata 16 Lundbystrand
S-417 55 Gothenburg Sweden
------------------------------
Date: Thu, 25 Jan 2001 11:37:12 GMT
From: philhibbs@my-deja.com
Subject: Re: pdf2html
Message-Id: <94p358$5br$1@nnrp1.deja.com>
In article <94ovdh$2i5$1@nnrp1.deja.com>,
philhibbs@my-deja.com wrote:
> I'm trying to convert a large (2MB, 700 pages) PDF file (unprotected)
> to HTML
I've tried WinPDFData but can't get it to work.
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 25 Jan 2001 13:56:03 GMT
From: jdanieli@my-deja.com
Subject: Re: perl editors
Message-Id: <94pb9f$bkg$1@nnrp1.deja.com>
In article <94np7f$483$1@nnrp1.deja.com>,
hanja <hanja@my-deja.com> wrote:
> Out of curiousity, what editor do you use to write your scripts?
>
> -hanja
>
> Sent via Deja.com
> http://www.deja.com/
>
ConTEXT
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: 25 Jan 2001 09:56:28 -0500
From: wfeidt@his.com (Bill Feidt)
Subject: Re: perl editors
Message-Id: <903465F43wfeidthiscom@216.200.68.12>
hanja@my-deja.com (hanja) wrote in <94np7f$483$1@nnrp1.deja.com>:
>Out of curiousity, what editor do you use to write your scripts?
vim
Bill
wfeidt@his.com
------------------------------
Date: Thu, 25 Jan 2001 15:40:22 GMT
From: knb50@my-deja.com
Subject: Re: perl editors
Message-Id: <94phd4$hl5$1@nnrp1.deja.com>
In article <94np7f$483$1@nnrp1.deja.com>,
hanja <hanja@my-deja.com> wrote:
> Out of curiousity, what editor do you use to write your scripts?
>
> -hanja
>
> Sent via Deja.com
> http://www.deja.com/
>
pico
Kim
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 25 Jan 2001 15:48:58 GMT
From: mike_solomon@lineone.net
Subject: Re: perl editors
Message-Id: <94pht6$i4o$1@nnrp1.deja.com>
In article <94np7f$483$1@nnrp1.deja.com>,
hanja <hanja@my-deja.com> wrote:
> Out of curiousity, what editor do you use to write your scripts?
>
> -hanja
>
> Sent via Deja.com
> http://www.deja.com/
>
vim
Regards
Mike Solomon
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 25 Jan 2001 11:27:15 GMT
From: philhibbs@my-deja.com
Subject: Re: Perl is bad at (very) simple math!
Message-Id: <94p2if$4ud$1@nnrp1.deja.com>
abigail@foad.org wrote:
> get rid of the idea that doing floating point
> arithmetic using binary computers that consist of
> a finite amount of atoms is actually feasible.
I disagree - there's even an IEEE format for BCD floating point, and
IIRC the x87 FPU supports it. I may be wrong about that. It's an option
that my father and I were considering implementing in a Basic
interpreter that we wrote in the 80s.
> You also should read the FAQ. Then you wouldn't have bothered the
> readers of this group with asking a question that has been asked
> here several thousand of times before.
That, however, *is* a valid point.
Phil.
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 25 Jan 2001 11:48:06 GMT
From: philhibbs@my-deja.com
Subject: Re: Perl is bad at (very) simple math!
Message-Id: <94p3pk$5pl$1@nnrp1.deja.com>
In article <t6ui3ecdn4pn39@corp.supernews.com>,
Chris Stith <mischief@velma.motion.net> wrote:
> I wouldn't call that failing. Figure out for yourself how to
> represent 0.1 in binary.
Well, I'd use one of the x87 BCD floating point formats, if I was doing
it on an Intel CPU.
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 25 Jan 2001 13:01:49 GMT
From: Jerome Abela <Jerome.Abela@free.fr>
Subject: Re: PerlCGI writing to STDIN of another prog
Message-Id: <3A7022C7.5F25D2A2@free.fr>
speedpk@my-deja.com a écrit :
> $pid = open(Writer, "| ./exe/items.exe -t $laenge")||
> &error_ausgabe("$filename: $! [1:neu_check]",10,$lang);
> print Writer $daten;
> close (Writer) || warn "WRITER:(close) $!";
>
> The Problem: items.exe does not get $data, but it does know about the
> parameter "-t $laenge".
Maybe because you write $daten instead of $data into Writer ? Or is it
just a typo in your post ?
Jerome.
------------------------------
Date: Thu, 25 Jan 2001 14:05:56 GMT
From: "Robin Corcoran" <robinc@LMGroup.com>
Subject: Re: Problem Connecting to Database
Message-Id: <8pWb6.1039$UU2.34578106@nnrp1.tor.metronet.ca>
> <robinc@LMGroup.com> wrote:
>
> >my $dbh = DBI->connect('DBI:ODBC:xml')
> > or die "Couldn't connect to database: " . DBI->errstr;
>
> In DBI->connect, "xml" doesn't refer to the base name of your Access
> file. (It doesn't refer to the "xml" part of "xml.mdb".) It refers
> to a data source name (DSN). That's what the error messages are
> complaining about, too.
>
> Define DSNs through the ODBC admin program. You will probably find it
> in Control Panel | Data sources (ODBC), or in Programs | ODBC.
> Specify a system DSN.
>
> You might find this example makes more sense. "IMS" is the DSN for
> "Information Management Systems.mdb" here.
>
> my $dsn = "DBI:ODBC:IMS";
> my $user = "Admin";
> my $password = "";
> my $dbh = DBI->connect($dsn, $user, $password,
> { RaiseError => 1,
> AutoCommit => 1 });
>
OK, I've set it up as you said, and have created the appropriate DNS. No
problems now, except I'm not sure now how to specify which table within
that database I would like to access and modify? Any ideas?
BTW, thanks for the clarification.
Robin
------------------------------
Date: Thu, 25 Jan 2001 14:37:26 GMT
From: "Robin Corcoran" <robinc@LMGroup.com>
Subject: Re: Problem Connecting to Database
Message-Id: <GSWb6.1040$UU2.34593340@nnrp1.tor.metronet.ca>
> OK, I've set it up as you said, and have created the appropriate DNS. No
> problems now, except I'm not sure now how to specify which table within
> that database I would like to access and modify? Any ideas?
>
I've gotten this to work now, thanks for the help.
Robin
------------------------------
Date: Thu, 25 Jan 2001 14:00:01 +0000
From: Richard J Bragg <richard.bragg.bsc@ntl.remove.com>
Subject: Reading from named pipes
Message-Id: <3A703161.1056310B@ntl.remove.com>
I am trying to write a program use Tk that reads from a named pipe
processes the data, writes to a screen widget and sends some lines to
a second pipe.
My query is on reading the pipe. The Tk script waits until the pipe is
readable and calls a subroutine.
Assume that the input pipe has lots of lines pending.
sub processdata {
my $data = <PI>;
process data
print PO $newdata;
}
This will read 1 line from the pipe and return. It will then wait until
another line is pushed on the pipe then will read all bar the last line.
sub processdata {
while(my $data = <PI>) {
process data
print PO $newdata;
}
}
This will read all pending lines then get stuck waiting for another.
Is there a method of checking the pipe for data?
sub processdata {
while( data in pipe ) {
my $data = <PI>;
process data
print PO $newdata;
}
}
A similar question was asked about preventing blocking on pipes in Dec
2000 but that isn't quite what is needed here. I guess if there is a
time out on the read that would help.
TIA
searching perl.com and cpan.org find things that are close but no cigar.
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 140
**************************************