[16372] in Perl-Users-Digest
Perl-Users Digest, Issue: 3784 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 24 09:05:26 2000
Date: Mon, 24 Jul 2000 06:05:14 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <964443913-v9-i3784@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 24 Jul 2000 Volume: 9 Number: 3784
Today's topics:
[Perl] How to find the Perl FAQ <rootbeer&pfaq*finding*@redcat.com>
Accessing DLLs from Perl? (Toni Mueller)
ANNOUNCE: Bit::Vector 5.8 <sb@muccpu1.muc.sdm.de>
ANNOUNCE: Bit::Vector 5.8 <sb@sdm.de>
DBI.PM <danielxx@bart.nl>
Re: DBI.PM <jouke@nedstat.nl>
Re: DBI.PM <Peter.Dintelmann@dresdner-bank.com>
Re: DBI.PM (Colin Keith)
Re: file extension (Colin Keith)
Re: file extension <skx@tardis.ed.ac.uk>
Re: file extension <skx@tardis.ed.ac.uk>
Re: golf apocalypse post-mortem? (Leon Brocard)
Re: HELP: longSyntax ok, but: rHsh->{myKey} UNDEFINED?? (Colin Keith)
Re: HELP: longSyntax ok, but: rHsh->{myKey} UNDEFINED?? (Keith Calvert Ivey)
Hostname in Net::SMTP <mike@cyborg-group.com>
Re: Hostname in Net::SMTP Brian Greer
Installing Dialog On AIX <dominic01@hotmail.com>
Re: LWP UserAgent (Eric Bohlman)
Re: matching contents of array (Keith Calvert Ivey)
Re: Need questions for Perl quiz aqutiv@my-deja.com
Re: Need questions for Perl quiz <daniel@blackomega.com>
Re: Newbie "Learning Perl" help (Eric Bohlman)
Re: OK, how do I put a variable in a regexp? <pauli@physik.uni-erlangen.de>
pickle 0.5 - Perl to C++ and back without <perl.h> <jtobey@john-edwin-tobey.org>
Re: Read a file into a hash ? (Colin Keith)
Re: redirection fails <daniel.gorospe@intel.com>
Re: redirection fails <care227@attglobal.net>
Re: Setting $/ from variable - accepting meta character aqutiv@my-deja.com
Threads bug in Perl 5.6?? <narendra@spiff.hr.att.com>
Re: To CGI.pm or not? <chris.morris@supanet.net.uk>
Re: tutorials socket <carvdawg@patriot.net>
Re: uninitialized variable value? <bernie@fantasyfarm.com>
Re: When will use the flock? (Colin Keith)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 24 Jul 2000 10:22:34 GMT
From: Tom Phoenix <rootbeer&pfaq*finding*@redcat.com>
Subject: [Perl] How to find the Perl FAQ
Message-Id: <pfaqmessage964434241.20951@news.teleport.com>
Archive-name: perl-faq/finding-perl-faq
Posting-Frequency: weekly
Last-modified: 29 Apr 2000
[ That "Last-modified:" date above refers to this document, not to the
Perl FAQ itself! The last _major_ update of the Perl FAQ was in Summer
of 1998; of course, ongoing updates are made as needed. ]
For most people, this URL should be all you need in order to find Perl's
Frequently Asked Questions (and answers).
http://www.cpan.org/doc/FAQs/
Please look over (but never overlook!) the FAQ and related docs before
posting anything to the comp.lang.perl.* family of newsgroups.
For an alternative way to get answers, check out the Perlfaq website.
http://www.perlfaq.com/
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Beginning with Perl version 5.004, the Perl distribution itself includes
the Perl FAQ. If everything is pro-Perl-y installed on your system, the
FAQ will be stored alongside the rest of Perl's documentation, and one
of these commands (or your local equivalents) should let you read the FAQ.
perldoc perlfaq
man perlfaq
If a recent version of Perl is not properly installed on your system,
you should ask your system administrator or local expert to help. If you
find that a recent Perl distribution is lacking the FAQ or other important
documentation, be sure to complain to that distribution's author.
If you have a web connection, the first and foremost source for all things
Perl, including the FAQ, is the Comprehensive Perl Archive Network (CPAN).
CPAN also includes the Perl source code, pre-compiled binaries for many
platforms, and a large collection of freely usable modules, among its
560_986_526 bytes (give or take a little) of super-cool (give or take
a little) Perl resources.
http://www.cpan.org/
http://www.perl.com/CPAN/
http://www.cpan.org/doc/FAQs/FAQ/html/
http://www.perl.com/CPAN/doc/FAQs/FAQ/html/
You may wish or need to access CPAN via anonymous FTP. (Within CPAN,
you will find the FAQ in the /doc/FAQs/FAQ directory. If none of these
selected FTP sites is especially good for you, a full list of CPAN sites
is in the SITES file within CPAN.)
California ftp://ftp.cdrom.com/pub/perl/CPAN/
Texas ftp://ftp.metronet.com/pub/perl/
South Africa ftp://ftp.is.co.za/programming/perl/CPAN/
Japan ftp://ftp.dti.ad.jp/pub/lang/CPAN/
Australia ftp://cpan.topend.com.au/pub/CPAN/
Netherlands ftp://ftp.cs.ruu.nl/pub/PERL/CPAN/
Switzerland ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
Chile ftp://ftp.ing.puc.cl/pub/unix/perl/CPAN/
If you have no connection to the Internet at all (so sad!) you may wish
to purchase one of the commercial Perl distributions on CD-Rom or other
media. Your local bookstore should be able to help you to find one.
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Comments and suggestions on the contents of this document
are always welcome. Please send them to the author at
<pfaq&finding*comments*@redcat.com>. Of course, comments on
the docs and FAQs mentioned here should go to their respective
maintainers.
Have fun with Perl!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 24 Jul 2000 13:29:19 +0200
From: toni@oeko.net (Toni Mueller)
Subject: Accessing DLLs from Perl?
Message-Id: <8lh9af$c4g$1@oak.oeko.net>
Hello,
I would like to use home grown DLLs, eg written in VC++ or VB,
together with ActiveState Perl on NT4. It would be nice if anyone
could make a comment if this is possible, or what has to be done
to make it happen. If someone could probably also explain what
the difference between OLE and DLL is, I'm very interested in
hearing this.
Thank you!
Best Regards,
Toni Mueller.
-------- NIC: TM2155
Oeko.neT Mueller & Brandt GbR sales: info@oeko.net
v: +49 2261 979364 f: +49 2261 979366 http://www.oeko.net
Unix, networking, administration, consulting, programming, Internet services
------------------------------
Date: 24 Jul 2000 12:49:15 GMT
From: Steffen Beyer <sb@muccpu1.muc.sdm.de>
Subject: ANNOUNCE: Bit::Vector 5.8
Message-Id: <8lhe0b$lhc$1@solti3.sdm.de>
=====================================
Package "Bit::Vector" Version 5.8
=====================================
- FINAL RELEASE -
This package is available for download from my web site at
http://www.engelschall.com/u/sb/download/
or from any CPAN (= "Comprehensive Perl Archive Network") mirror server:
http://www.perl.com/CPAN/authors/id/S/ST/STBEY/
Since nobody sent in any error reports, I am releasing the release candidate
announced earlier here (about a week ago) as the final release version 5.8.
Prerequisites:
--------------
Perl version 5.000 or higher, and an ANSI C compiler. (!)
^^^^^^
What's new in version 5.8:
--------------------------
+ Changed "na" to "PL_na" in Vector.xs in order to make the module
ready for Perl 5.6.0.
+ Removed the error messages which appeared at global destruction
time with Perl 5.6.0.
+ Changed the corresponding test script (t/02____destroy.t) accordingly.
+ Optimized the "strEQ" away from the typemap section in Vector.xs.
+ Fixed the misspelled word "whether" in the documentation.
+ Added method "Power()".
+ Added overloaded operator "**" (for exponentiation).
+ Changed method "Copy()"; the two vectors do not need to have the same
size anymore. The method will copy as much as will fit or fill up
with 0's or 1's (depending on the sign of the source) if necessary.
+ Changed the corresponding test script (t/09_parameters.t) accordingly.
Abstract:
---------
Bit::Vector is an efficient C library which allows you to handle
bit vectors, sets (of integers), "big integer arithmetic" and
boolean matrices, all of arbitrary sizes.
The library is efficient (in terms of algorithmical complexity)
and therefore fast (in terms of execution speed) for instance
through the widespread use of divide-and-conquer algorithms.
The package also includes an object-oriented Perl module for
accessing the C library from Perl, and features overloaded
operators for maximum ease of use.
The C library can nevertheless be used stand-alone, without Perl.
Legal issues:
-------------
This package with all its parts is
Copyright (c) 1995 - 2000 by Steffen Beyer.
All rights reserved.
This package is free software; you can use, modify and redistribute
it under the same terms as Perl itself, i.e., under the terms of
the "Artistic License" or the "GNU General Public License".
The C library at the core of this Perl module can additionally
be used, modified and redistributed under the terms of the
"GNU Library General Public License".
Please refer to the files "Artistic.txt", "GNU_GPL.txt" and
"GNU_LGPL.txt" in this distribution, respectively, for details!
Author's note:
--------------
If you have any questions, suggestions or need any assistance, please
let me know!
Please do send feedback, this is essential for improving this module
according to your needs!
I hope you will find this module beneficial.
Yours sincerely,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/ (Who am I)
http://www.engelschall.com/u/sb/gallery/ (Fotos Brasil, USA, ...)
http://www.engelschall.com/u/sb/download/ (Free Perl and C Software)
------------------------------
Date: Mon, 24 Jul 2000 14:44:45 +0200 (MET DST)
From: Steffen Beyer <sb@sdm.de>
Subject: ANNOUNCE: Bit::Vector 5.8
Message-Id: <snof592ijjt76@corp.supernews.com>
=====================================
Package "Bit::Vector" Version 5.8
=====================================
- FINAL RELEASE -
This package is available for download from my web site at
http://www.engelschall.com/u/sb/download/
or from any CPAN (= "Comprehensive Perl Archive Network") mirror server:
http://www.perl.com/CPAN/authors/id/S/ST/STBEY/
Since nobody sent in any error reports, I am releasing the release candidate
announced earlier here (about a week ago) as the final release version 5.8.
Prerequisites:
--------------
Perl version 5.000 or higher, and an ANSI C compiler. (!)
^^^^^^
What's new in version 5.8:
--------------------------
+ Changed "na" to "PL_na" in Vector.xs in order to make the module
ready for Perl 5.6.0.
+ Removed the error messages which appeared at global destruction
time with Perl 5.6.0.
+ Changed the corresponding test script (t/02____destroy.t) accordingly.
+ Optimized the "strEQ" away from the typemap section in Vector.xs.
+ Fixed the misspelled word "whether" in the documentation.
+ Added method "Power()".
+ Added overloaded operator "**" (for exponentiation).
+ Changed method "Copy()"; the two vectors do not need to have the same
size anymore. The method will copy as much as will fit or fill up
with 0's or 1's (depending on the sign of the source) if necessary.
+ Changed the corresponding test script (t/09_parameters.t) accordingly.
Abstract:
---------
Bit::Vector is an efficient C library which allows you to handle
bit vectors, sets (of integers), "big integer arithmetic" and
boolean matrices, all of arbitrary sizes.
The library is efficient (in terms of algorithmical complexity)
and therefore fast (in terms of execution speed) for instance
through the widespread use of divide-and-conquer algorithms.
The package also includes an object-oriented Perl module for
accessing the C library from Perl, and features overloaded
operators for maximum ease of use.
The C library can nevertheless be used stand-alone, without Perl.
Legal issues:
-------------
This package with all its parts is
Copyright (c) 1995 - 2000 by Steffen Beyer.
All rights reserved.
This package is free software; you can use, modify and redistribute
it under the same terms as Perl itself, i.e., under the terms of
the "Artistic License" or the "GNU General Public License".
The C library at the core of this Perl module can additionally
be used, modified and redistributed under the terms of the
"GNU Library General Public License".
Please refer to the files "Artistic.txt", "GNU_GPL.txt" and
"GNU_LGPL.txt" in this distribution, respectively, for details!
Author's note:
--------------
If you have any questions, suggestions or need any assistance, please
let me know!
Please do send feedback, this is essential for improving this module
according to your needs!
I hope you will find this module beneficial.
Yours sincerely,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/ (Who am I)
http://www.engelschall.com/u/sb/gallery/ (Fotos Brasil, USA, ...)
http://www.engelschall.com/u/sb/download/ (Free Perl and C Software)
------------------------------
Date: Mon, 24 Jul 2000 10:27:06 GMT
From: "Daniel van den Oord" <danielxx@bart.nl>
Subject: DBI.PM
Message-Id: <_RUe5.1861$Gd1.22906@Typhoon.bART.nl>
I just installed MySQL on a NT server with perl 5 installed.. and I tried
one of those example scripts but they all need DBI.pm. And I can't seem to
find it anywhere.. Where can I find it to download it.. for an NT machine or
is there another module I should use on NT... ????
------------------------------
Date: Mon, 24 Jul 2000 13:54:04 +0200
From: "Jouke Visser" <jouke@nedstat.nl>
Subject: Re: DBI.PM
Message-Id: <8lhalt$erq$1@news1.xs4all.nl>
> I just installed MySQL on a NT server with perl 5 installed.. and I tried
> one of those example scripts but they all need DBI.pm. And I can't seem to
> find it anywhere.. Where can I find it to download it.. for an NT machine
or
> is there another module I should use on NT... ????
If you're using Activestate Perl, try using PPM and install dbi and
dbd-mysql. Otherwise try CPAN.
Good luck,
Jouke Visser
------------------------------
Date: Mon, 24 Jul 2000 13:55:17 +0200
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: DBI.PM
Message-Id: <8lhasa$5g71@intranews.dresdnerbank.de>
Hi,
Daniel van den Oord schrieb in Nachricht
<_RUe5.1861$Gd1.22906@Typhoon.bART.nl>...
>I just installed MySQL on a NT server with perl 5 installed.. and I tried
>one of those example scripts but they all need DBI.pm. And I can't seem to
>find it anywhere.. Where can I find it to download it.. for an NT machine
or
>is there another module I should use on NT... ????
use the DBI module from ActiveState
http://www.acitvestate.com/PPMPackages/5.005/zips/DBI.zip
and the driver for MySQL
http://www.activestate.com/PPMPackages/5.005/zips/DBD-Mysql.zip
Install them using the PPM and _RTFM_.
Best regards,
Peter Dintelmann
------------------------------
Date: Mon, 24 Jul 2000 12:56:25 GMT
From: ckeith@clara.net (Colin Keith)
Subject: Re: DBI.PM
Message-Id: <Z1Xe5.17$DT4.1333017@nnrp2.clara.net>
In article <_RUe5.1861$Gd1.22906@Typhoon.bART.nl>, "Daniel van den Oord" <danielxx@bart.nl> wrote:
>I just installed MySQL on a NT server with perl 5 installed.. and I tried
>one of those example scripts but they all need DBI.pm. And I can't seem to
>find it anywhere.. Where can I find it to download it.. for an NT machine or
>is there another module I should use on NT... ????
You can find most modules on <http://www.cpan.org/>, but this does use xs,
so it'll need compiling and I have no idea how that works under win32.
Doesn't the active state port come with a manager to install new modules?
(PPM or something?) The README file for this module has URLs to the mailing
list for the DBI module.
Col.
---
Colin Keith
Systems Administrator
Network Operations Team
ClaraNET (UK) Ltd. NOC
------------------------------
Date: Mon, 24 Jul 2000 10:59:57 GMT
From: ckeith@clara.net (Colin Keith)
Subject: Re: file extension
Message-Id: <NkVe5.13$DT4.1327853@nnrp2.clara.net>
In article <ODTe5.1858$Gd1.22529@Typhoon.bART.nl>, "Daniel van den Oord" <danielxx@bart.nl> wrote:
>' . ' but the error then is that some files are haveing a ' . ' in their
>title !!!.. Is there a way to do this ??
Yes, anchor your search to the end of the filename. I.e.
/\.([^.]+)$/ and check $1 eq mp3
Or better still /\.mp3$/i if you want to check its ends in MP3.
Of course, the extension has no bearing on the actual format of the file. I
believe that MP3's have the magic cookie "ID3" as the first 3 characters of
the file... but I might be wrong. (And even that wouldn't determine if the
file were corrupt ... ohh life is full of twists and turns)
Col.
---
Colin Keith
Systems Administrator
Network Operations Team
ClaraNET (UK) Ltd. NOC
------------------------------
Date: Mon, 24 Jul 2000 13:27:27 +0100
From: Steve Kemp <skx@tardis.ed.ac.uk>
Subject: Re: file extension
Message-Id: <Pine.GSO.4.10.10007241326550.19774-100000@tardis.tardis.ed.ac.uk>
On Mon, 24 Jul 2000, Daniel van den Oord wrote:
> I made a simpel script to view a directory list with an index and security
> so it can't get out of that directory !!
> http://195.38.226.149/cgi-bin/filer.pl
http://195.38.226.149/cgi-bin/filer.pl?direct=.\..\.\..\
!!
Steve
---
------------------------------
Date: Mon, 24 Jul 2000 13:36:51 +0100
From: Steve Kemp <skx@tardis.ed.ac.uk>
Subject: Re: file extension
Message-Id: <Pine.GSO.4.10.10007241335440.24206-100000@tardis.tardis.ed.ac.uk>
On Mon, 24 Jul 2000, Daniel van den Oord wrote:
> though I want to know how I can read the extension or chop the rest of and
> put it seperately !! I'm now using a way that if it isn't a directory it's a
> mp3 (But this is not always the case I tried to chop of everything before a
> ' . ' but the error then is that some files are haveing a ' . ' in their
> title !!!.. Is there a way to do this ??
This should give you an idea:
my $filename="test.ttest.mp3";
if ( $filename =~ /(.*)\.([mM][pP]3)$/ )
{
print "Filename : $1\n" ;
# extension is [mM][pP]3, held in $2
}
else
{
print "File $filename is not an mp3\n";
}
Steve
---
http://GNUSoftware.com/ -- GNU Software, who wouldn't want it?
------------------------------
Date: Mon, 24 Jul 2000 10:20:05 GMT
From: acme@ns0.astray.com (Leon Brocard)
Subject: Re: golf apocalypse post-mortem?
Message-Id: <slrn8no69m.ouv.acme@ns0.astray.com>
John Callender typed out randomly:
> I'm curious if someone like Uri or Larry R. would be willing to
> provide some details on just what it was that went wrong, such that
> the event had to be scrubbed.
As a participant, I'd say it was a great disappointment too :-( "NFS
attribute caching" was the culprit, apparently. Hopefully the
questions (and hopefully not the answers) will be available soon.
Improvements that could have been made: a practice run of a couple of
holes the evening before. We were a teensy bit stressed at the time
and almost couldn't write a one-liner to find the maximum value of a
list (without using sort) in 5 minutes. It would have helped greatly
to have gone through the rules and get used to the computers
beforehand.
I'd also suggest that the judges not show and discuss the answers that
*they* came up with. Yes, you're all very clever, but you guys had
months to think it up and I'm not sure the audience appreciated that
either.
OTOH Damian's Quantum::Superposition talk was wonderful (if a bit
faster than at yapc) and I did get a fluffy dust puppy as swag...
Leon
--
Leon Brocard.............................http://www.astray.com/
yapc::Europe - September 22-24 London - http://yapc.org/Europe/
... Error 404: .signature generator ran out of tuits
------------------------------
Date: Mon, 24 Jul 2000 11:17:42 GMT
From: ckeith@clara.net (Colin Keith)
Subject: Re: HELP: longSyntax ok, but: rHsh->{myKey} UNDEFINED??
Message-Id: <qBVe5.14$DT4.1328911@nnrp2.clara.net>
In article <8lg72l$p3h$1@slb0.atl.mindspring.net>, dkcombs@netcom.com (David Combs) wrote:
[working]
> dQuoteIt(%{$recordHashRef}->{"curLine"}), "\n");
[notworking]
> dQuoteIt($recordHashRef->{curline}), "\n");
Well I guess it could be a copying error, but this uses curline (lowercase
L) wereas everything else uses uppercase letters, which would generate this:
glitch% perl -w -Mstrict ;
my($rec) = { curLine=>'bobsed'};
print "\$rec = $rec, ref = ", ref($rec), "\n",
"\%{\$rec}->{'curLine'} = ", %{$rec}->{"curLine"}, "\n",
"\$rec->{curLine} = ", $rec->{curLine}, "\n"; # curLine
print "Next fails?\n",
"\$rec->{curLine} = ", $rec->{curline}, "\n"; # curline
$rec = HASH(0x804e054), ref = HASH
%{$rec}->{'curLine'} = bobsed
$rec->{curLine} = bobsed
Use of uninitialized value at - line 5.
Next fails?
$rec->{curLine} =
(The error is slightly different because I'm using commas to pass an array
to print rather than concatenating it into a scalar and printing that.)
---
Colin Keith
Systems Administrator
Network Operations Team
ClaraNET (UK) Ltd. NOC
------------------------------
Date: Mon, 24 Jul 2000 11:41:05 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: HELP: longSyntax ok, but: rHsh->{myKey} UNDEFINED??
Message-Id: <397d2952.39668781@news.newsguy.com>
dkcombs@netcom.com (David Combs) wrote:
> # NEXT LINE WORKS OK!!
Perhaps, but only accidentally.
> print(STDERR $indentStr, "[$i]: WORKS OK!!!: NOW, TRY FOR x=>{curLine}: ",
> dQuoteIt(%{$recordHashRef}->{"curLine"}), "\n");
Unless you've given your variable an intentionally misleading
name, I think you want dQuoteit($recordHashRef->{curLine}). In
any case, you definitely don't want that %.
> # BUT NOT THIS ONE!!!!!: "Use of uninitialized value in print at test4-19jul00.pl line 261.":
> print(STDERR $indentStr, "[$i]: FAILS!!!: ", dQuoteIt($recordHashRef->{curline}), "\n");
'curline' ne 'curLine' -- why are you using that silly
capitalization style anyway?
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
------------------------------
Date: Mon, 24 Jul 2000 11:47:35 +0000
From: Mike <mike@cyborg-group.com>
Subject: Hostname in Net::SMTP
Message-Id: <964435662.11145.0.nnrp-07.9e986064@news.demon.co.uk>
Hi - me again
I hace a script set up to do several emails from a list using Net::SMTP
and MIME::Entities which is working fine.
However I have one problem
When I set up up the from field without a full email address ie name
instead of name@mailhost the mail gets sent fine but when I try to do a
reply it looks for an email address on my own machine instead of the host
ie: it sends to mike@mikespc.mailshot.
Is there any way to set the host in the script so that it will not try to
do this. It would be useful as the purpose is for a client and I would not
really like my host name to appear in the actual message.
I hope this is clear enough
------------------------------
Date: 24 Jul 2000 12:53:41 GMT
From: Brian Greer
Subject: Re: Hostname in Net::SMTP
Message-Id: <8lhe8l$ahq$2@slb1.atl.mindspring.net>
Mike <mike@cyborg-group.com> wrote :
>Is there any way to set the host in the script so that it will not try to
>do this. It would be useful as the purpose is for a client and I would not
>really like my host name to appear in the actual message.
I wonder if this is possible. The behavior that you're experiencing is part
of the way that SMTP works. Any un-finished address is finished with the end
of the default address on that host...
At least that is my understanding...
Brian.
------------------------------
Date: Mon, 24 Jul 2000 11:55:16 GMT
From: Dominic Prakash <dominic01@hotmail.com>
Subject: Installing Dialog On AIX
Message-Id: <8lhar3$gb9$1@nnrp1.deja.com>
Hellko Group,
I try to install Dialog.0.02 on AIX. I dont have dialog.h on my system.
I am getting the following error.
"Dialog.xs", line 15.10: 1506-296 (S) #include file <dialog.h> not
found.
Does this <dialog.h> come with the standard C Library, so that I can
ask my sysadmin to reinstall it on the system.
Is there any perl module similar to Dialog that can display few
different dialog boxes and collect user inputs.
Thanks
Dominic
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 24 Jul 2000 10:42:38 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: LWP UserAgent
Message-Id: <8lh6iu$agm$8@slb3.atl.mindspring.net>
yaacovs@my-deja.com wrote:
: In article <8lf38v$4cjhm$1@ID-10059.news.cis.dfn.de>,
: decklin+usenet@red-bean.com (Decklin Foster) wrote:
: > yaacovs@my-deja.com <yaacovs@my-deja.com> writes:
: >
: > > All I get is the main frame, without the wanted page.
: >
: > So request the page you want, instead of the page containing the
: > frameset.
: The problem is that I am using a tool which runs through a list of
: URL's from our DB and it has to follow the redirections and search for
: a certain text on the page. When using a browser which supports
: frames, I have no problems =(
What a browser does is get the frameset page, parse it for the URLs to
each frame, and then get the pages corresponding to those URLs. Thus,
your program has to do the same thing.
------------------------------
Date: Mon, 24 Jul 2000 11:30:49 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: matching contents of array
Message-Id: <397c2857.39418569@news.newsguy.com>
tadmc@metronet.com (Tad McClellan) wrote:
>steve cramton <scrampton71NOscSPAM@hotmail.com.invalid> wrote:
>>>> #the regex im using is
>>>> if ($host =~ /\$providers\b/i)
>
>That is too strange to even try and correct.
>
>You don't need a reference.
What reference? Since \$providers is in a regex, the fact that
it would be a reference outside a quoted context is irrelevant.
It's just the character '$' followed by the characters
'providers'. It's still bizarre, of course.
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
------------------------------
Date: Mon, 24 Jul 2000 11:01:48 GMT
From: aqutiv@my-deja.com
Subject: Re: Need questions for Perl quiz
Message-Id: <8lh7mr$eaf$1@nnrp1.deja.com>
In article <8lh3si$fa2$1@news6.svr.pol.co.uk>,
"Daniel Foster" <daniel@blackomega.com> wrote:
> I'm compiling a quiz on Perl to test people's knowledge. The
> questions need to be multiple choice, with 4 or 5 answers, like this
> one...
>
> If an anonymous subroutine is created with "$coderef = sub {print
> "Hello world\n";};" then how should it be called?
> 1. &coderef;
> 2. $coderef->call;
> 3. &{$coderef};
> 4. anoncall($coderef);
>
> The other answers are clearly made up, with only one correct answer
> (even though there are clearly multiple ways of doing anything).
>
> If you could take a moment to write just one or two questions I'd be
> most grateful.
>
> ---
> <car>::=b<rev>m
> <rev>::=r|r<rev>
>
> Daniel Foster - daniel@blackomega.com
>
>
That easy? I don't think that a perl quiz should have an answers, but
rethar open questions that the person needs to think and achieve
something... for example:
assuming:
$str = "<word>Hello </word>This will not be seen<word>world!</word>";
how would you print the string "Hello World!" in one statement using
$str?
correct answer: print ($str =~ m{<word>(.+?)</word>}gi);
but if you really need one in your style... here's one:
How would you recover a string that has been issued:
tr/a-zA-Z0-9/b-zaB-ZA5-90-4/ ?
1. Same tr///... ie: tr/a-zA-Z0-9/b-zaB-ZA5-90-4/
2. tr/b-zaB-ZA5-90-4/a-zA-Z0-9/;
3. tr/0-9a-zA-Z/5-90-4b-zaB-ZA/
4. It's not possible...
The answer should be obvious so I'm not going to answer it. :p
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 24 Jul 2000 13:08:37 +0100
From: "Daniel Foster" <daniel@blackomega.com>
Subject: Re: Need questions for Perl quiz
Message-Id: <8lhbk1$ila$1@news6.svr.pol.co.uk>
> That easy? I don't think that a perl quiz should have an answers,
> but rethar open questions that the person needs to think and achieve
> something... for example:
They needn't be that easy, it was simply an example of the format of
the questions.
> but if you really need one in your style... here's one:
They are needed in that format, and thanks for your contribution. I'm
looking to get quite a large amount of questions together... Anyone
else fancy concocting some?
---
Someone needs to invent a thought laxative.
- Sean Hopkins
Daniel Foster - daniel@blackomega.com
------------------------------
Date: 24 Jul 2000 10:54:04 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Newbie "Learning Perl" help
Message-Id: <8lh78c$agm$9@slb3.atl.mindspring.net>
The Unknown (unknown-one@home.com) wrote:
: Am using ActivePerl 5.22 and Windows 98 SE.
:
: I must be missing something because I don't understand why this:
:
: print "Type strings here:\n";
: @a = <STDIN>; # here I just typed "one two three"
: print @a; # I also remembered to use
: # CTRL-Z to indicate the eof
:
: gives this:
:
: two
: three
:
: instead of this:
:
: one
: two
: three
There's a bug in the Win95 and Win98 console output routines (part of the
OS, not part of perl) that causes the first line output after you enter a
Ctrl+Z to disappear under some circumstances. It looks like you're being
bitten by it. Simply printing a blank line after doing anything that
reads STDIN to the end will usually fix it.
------------------------------
Date: Mon, 24 Jul 2000 14:46:37 +0200
From: Johannes Pauli <pauli@physik.uni-erlangen.de>
Subject: Re: OK, how do I put a variable in a regexp?
Message-Id: <397C3AAD.2570E5C8@physik.uni-erlangen.de>
Hi Eric, I guess the last print should have been
print "$1<br>"
But nevertheless I guess the real problem in your posting is how to
expand a variable in a regex.
Well as it is not a string it does not expand on its own. So have to
copnostract a string containing your search request and eval this.
This would read like:
eval('$a =~ /^'.$i.':(.*)\t(.*)/');
Best wishes and FF
Johannes
Eric Selin wrote:
> This works:
> $a =~ /14:(.*)\t(.*)/;
> print "$1<br>";
>
> But not this:
> $i = 14;
> $a =~ /^$i:(.*)\t(.*)/;
> print "$i<br>";
> }
--
\\|//
(. .)
------------------------------oOOo-(_)-oOOo---------------------
Johannes Pauli
Physikalisches Institut IV
Erwin-Rommel-Str. 1
91058 Erlangen
Germany
Tel. : ++49-(0)9131-852-7066
Web : http://www.johannes-pauli.de
email : pauli@physik.uni-erlangen.de
------------------------------
Date: Mon, 24 Jul 2000 02:44:12 GMT
From: John Tobey <jtobey@john-edwin-tobey.org>
Subject: pickle 0.5 - Perl to C++ and back without <perl.h>
Message-Id: <snof68hjjjt118@corp.supernews.com>
Pickle v0.5 is available at http://search.cpan.org/search?dist=pickle .
=========
This is Pickle, a C++ library for conveniently calling Perl functions
and examining Perl data. It provides a higher-level interface than
Perl's native C support, shielding the programmer from complex details
and sacrificing some power and speed for ease of use and maintenance.
It is well suited for large applications prototyped in Perl and
transitioned piece by piece to C++, since it allows one to move the
boundary between implementation languages quickly and easily.
The name `Pickle' is a simplification of `perlcall', as in `perldoc
perlcall'.
The library is documented in the file pickle.pod and should be
browsable via `perldoc pickle' after installation. Newer versions
will be at http://search.cpan.org/search?dist=pickle . Pickle is
known to work with Perl v5.6.0 on Linux and Solaris (GNU CC) using
both default and ithreads (-Dusethreads) configurations.
This library will *NOT* work with Perl 5.005x and earlier.
Features include:
* automatic memory management using Perl's reference counts
* two-way exception handling, Perl->C++ and C++->Perl
* C++ functions callable from Perl and vice versa
* read/write access to symbol table, array, and hash elements
* scalar conversion operators for C++ builtin types
* application binary compatibility across Perl implementations
and configurations
This is ALPHA software. It is incomplete and very likely to contain
bugs.
--
John Tobey, late nite hacker <jtobey@john-edwin-tobey.org>
\\\ ///
]]] With enough bugs, all eyes are shallow. [[[
/// \\\
------------------------------
Date: Mon, 24 Jul 2000 11:47:09 GMT
From: ckeith@clara.net (Colin Keith)
Subject: Re: Read a file into a hash ?
Message-Id: <11We5.15$DT4.1330402@nnrp2.clara.net>
In article <slrn8nn3v0.vcg.abigail@alexandra.foad.org>, abigail@foad.org
wrote:
>What I/O error can occur when closing a file handle opened for reading?
EBADF/EINTR. I assume the first is what throws the warning about closing a
closed filehandle. The second ... I presume this means that the close
failed which could be a problem if it happens often because you could run
out of file descriptors. Though I would suggest it is easier to catch
this when your open()'s fail.
It does seem overkill to check for close() on a file handle opened for
reading.
If close() fails is the file handle still valid, or does it depend on why it
failed?
> That should include print() then.
Strictly speaking. :(
>Abigail
---
Colin Keith
Systems Administrator
Network Operations Team
ClaraNET (UK) Ltd. NOC
------------------------------
Date: Mon, 24 Jul 2000 18:59:20 +0800
From: "poseidon" <daniel.gorospe@intel.com>
Subject: Re: redirection fails
Message-Id: <8lh7me$cll@news.or.intel.com>
You can also try this:
open (DIRCONTENTS, "ls -l|");
@dirlist=<DIRCONTENTS>;
close (DIRCONTENTS);
This is the standard way of redirection in Perl.
Abigail <abigail@foad.org> wrote in message
news:slrn8ni15n.sif.abigail@alexandra.foad.org...
> haggi@work (haggi@tappe.net) wrote on MMDXVI September MCMXCIII in
> <URL:news:39788CDD.2078865C@tappe.net>:
> }}
> }} Hi,
> }}
> }} I'm trying to redirect a output in perl.
> }}
> }} system("ls -l > outputfile");
> }}
> }} I'm working with perl5.005 for cygwin. Windows NT.
> }}
> }} redirection in the shell works.
>
>
> Well, what happens here is that perl starts up a shell, and have the
> shell doing the redirection. The ">" character as used above is *NOT*
> dealt with by Perl. As soon as Perl found the first space in "ls -l >
> outputfile", it knew it had to give the command to the shell, and have
> the shell deal with it.
>
> I am not sure why you use the above system() command. Do you really want
> to have the output of "ls -l" be in that file? Because if you are doing
> this just to later read in the file, you are acting in an extremely
> unPerlish way. You could just use 'open my $ls, "ls -l |" or die $!',
> or my $list = `ls -l`, or just do a readdir() and stat().
>
>
>
> Abigail
> --
> New email address: abigail@foad.org
------------------------------
Date: Mon, 24 Jul 2000 07:36:14 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: redirection fails
Message-Id: <397C2A2E.4CFFBAEE@attglobal.net>
poseidon wrote:
>
> You can also try this:
>
> open (DIRCONTENTS, "ls -l|");
> @dirlist=<DIRCONTENTS>;
> close (DIRCONTENTS);
>
> This is the standard way of redirection in Perl.
But that doesn't redirect. It just stores the output into an array.
------------------------------
Date: Mon, 24 Jul 2000 10:43:58 GMT
From: aqutiv@my-deja.com
Subject: Re: Setting $/ from variable - accepting meta characters
Message-Id: <8lh6le$dil$1@nnrp1.deja.com>
In article <8lgt8t$7il$1@nnrp1.deja.com>,
kjeldahl@hotmail.com wrote:
> In article <j2omns4l6mblceuh4d700ro21hmhptog9q@4ax.com>,
> Bart Lateur <bart.lateur@skynet.be> wrote:
> > kjeldahl@hotmail.com wrote:
> >
> > >I have an input field, where I want to accept meta characters such
as
> \n
> > >and \t, but also normal characters. If I type the "\n" string in my
> > >input field, how can I assign the interpolated value of that string
> to
> > >$/?
> >
> > %replace =( 'n' => "\n", 't' => "\t", # ...
> > );
> > s/\\(.)/$replace{$1} || $1/ge;
>
> Now see if you are able to come up with a hash that include all the
> metacharacter that perl accepts (including \000, \x00 etc..)? ;-)
>
> Anyway, thanks for the answers. It seems the eval stuff suggested gets
> the job done without compromising security.
>
> Marius
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
I think that could do the job:
my $sep = '\n13';
$sep =~ s/\\(c|x.|0.)?./qq("$&")/eeg;
$/ = $sep;
print "[$/]\n";
\cn, \xnn, and \0nn are escape
sequence that conclude more the one following chars.
And it's probably secure as well.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 21 Jul 2000 18:04:33 -0400
From: Narendra Ravi <narendra@spiff.hr.att.com>
Subject: Threads bug in Perl 5.6??
Message-Id: <3978C8F1.D88C513E@spiff.hr.att.com>
Folks,
I am seeing strange results when creating/closing
several threads. I am running Perl 5.6 with threads on
a HP-UX 11.00 machine.
The first program essentially creates and closes several
threads. After a varied number (~50-500) of creations and
closes this program dumps core OR halts with errors.
The second program is no better. I don't think I can reduce
the sample program any further.
Has anyone come across such behavior? Do I have to change
some OS kernel level parameter.
--------------------
Sample Errors:
--------------------
mee 49
Attempt to free unreferenced scalar at ./tbug.pl line 13 thread 50.
Attempt to free unreferenced scalar at ./tbug.pl line 13 thread 50.
Attempt to free unreferenced scalar at ./tbug.pl line 13 thread 50.
Attempt to free unreferenced scalar at ./tbug.pl line 13 thread 50.
Attempt to free unreferenced scalar at ./tbug.pl line 13 thread 50.
Attempt to free unreferenced scalar at ./tbug.pl line 13 thread 50.
Attempt to free unreferenced scalar at ./tbug.pl line 13 thread 50.
Attempt to free unreferenced scalar at ./tbug.pl line 13 thread 50.
Attempt to free unreferenced scalar at ./tbug.pl line 13 thread 50.
Attempt to free unreferenced scalar at ./tbug.pl line 13 thread 50.
Attempt to free unreferenced scalar at ./tbug.pl line 13 thread 50.
Attempt to free unreferenced scalar at ./tbug.pl line 13 thread 50.
Attempt to free unreferenced scalar at ./tbug.pl line 13 thread 50.
main Fri Jul 21 14:51:02 2000 49
mee 50
main Fri Jul 21 14:51:08 2000 50
--------------------
Program 1: tbug.pl
--------------------
#!/opt/perl5/bin/perl -w
use strict;
#use diagnostics;
use FileHandle;
use Thread;
my $i=0;
my $thr;
autoflush STDOUT 1;
while(1){
foreach (1..10){
if($thr=Thread->new(\&handleConn, $i)){
$thr->detach;
}else{
print "NO THREAD\n";
die;
}
print "main ",scalar localtime, " $i", "\n";
$i++;
}
sleep 6;
}
sub handleConn
{
my $tid=shift;
print "mee $tid\n";
}
--------------------
END Program 1: tbug.pl
------------------------------------------------------------
Program 2 is no better.
--------------------
Program 2: tbug.pl
--------------------
#!/opt/perl5/bin/perl -w
use strict;
#use diagnostics;
use FileHandle;
use Thread;
my $i=0;
my $thr;
autoflush STDOUT 1;
while(1){
foreach (1..10){
if($thr=Thread->new(\&handleConn, \$i)){
$thr->detach;
}else{
print "NO THREAD\n";
die;
}
print "main ",scalar localtime, " $i", "\n";
$i++;
}
sleep 3;
}
sub handleConn
{
my $tidx=shift;
my $tid=$$tidx;
print "mee $tid\n";
}
--------------------
END Program 1: tbug.pl
------------------------------------------------------------
--
-- Narendra Ravi Email : narendra@spiff.hr.att.com
MT A4-4B27 Phone : 732-420-7792
------------------------------
Date: Mon, 24 Jul 2000 12:25:58 +0100
From: Chris Morris <chris.morris@supanet.net.uk>
Subject: Re: To CGI.pm or not?
Message-Id: <397C27C6.AD5BE126@supanet.net.uk>
CGI.pm is helpful for gettting the parameters from GET or POST. Without it this is complex
code.
For HTTP operations, you might as well use HHTP.pm directly.
Its HTML formatting functions are helpful if your perl is better than your HTML. But if
so, you are probably in a minority.
------------------------------
Date: Mon, 24 Jul 2000 06:19:13 -0400
From: H C <carvdawg@patriot.net>
Subject: Re: tutorials socket
Message-Id: <397C1821.534C1D44@patriot.net>
http://patriot.net/~carvdawg/perl.html
"haggi@work" wrote:
> Hi,
>
> does anyone know a source for example scripts for a connection via sockets?
> tutorials, books?
>
> haggi
>
> --
>
> ---------------------------------------------------------
>
> haggi
> www.haggi.de
> haggi@haggi.de
>
> haggi`s visual effects & animation
>
> ---------------------------------------------------------
------------------------------
Date: Mon, 24 Jul 2000 07:50:46 -0400
From: Bernie Cosell <bernie@fantasyfarm.com>
Subject: Re: uninitialized variable value?
Message-Id: <u8bons4h9brngknk32g480ovdn0rfpht4h@news.supernews.net>
abigail@foad.org (Abigail) wrote:
} Jim Quinn (jq@usa.net) wrote on MMDXV September MCMXCIII in
} <URL:news:8F77AFEE8jqusanet@64.252.33.231>:
} || How can i check in my program if a certain variable is unitialized?
}
} You can't. Variables are initialized. *Values* however, can be unitialized.
It could be that he's asking about the "never defined" versus "undef"
question [that's gone around before] -- in some languages, but *not*perl*,
a never-assigned-to variable holds a *special*value*, distinct from all
other values [and in particular, distinct from 'undef'] --- it is like
asking about the difference between 'defined' and 'exists' for a hash ref..
/Bernie\
--
Bernie Cosell Fantasy Farm Fibers
bernie@fantasyfarm.com Pearisburg, VA
--> Too many people, too few sheep <--
------------------------------
Date: Mon, 24 Jul 2000 12:03:09 GMT
From: ckeith@clara.net (Colin Keith)
Subject: Re: When will use the flock?
Message-Id: <1gWe5.16$DT4.1331122@nnrp2.clara.net>
In article <397BEEB0.3F379B4E@hotmail.com>, Tom <chaptera@hotmail.com> wrote:
>I find that most of the people will not using the flock when some
>Is it possible?
To use flock() ? Yes
perldoc -q lock
>The application like a guestbook, forum. They didn't take care
>with the file sharing? Is it safe?
No. Well, yes if you don't care if your guestbook gets erased every so often
(but that's usually not a bad thing:)
>I tried to write 2 small programs for writing data into the same file.
>Then run it at the same time nearly.
>The later submitted program will automatically waiting the other one.
As someone pointed out in a followup to a posting I made the other day
(sorry, I couldn't see the thread again to thank you, but I did RTFM :) file
locking is "merely advisory". In otherwords if every program that accesses
that file uses flock() then every program will queue (depending on the locks
you apply of course). It doesn't stop you deleting it via FTP or some such.
>The platform is UNIX!
Of which there are many varieties and some may not act as you want in terms
of locking which is why you should read the perlfunc docs for flock() and
read the notes in there.
---
Colin Keith
Systems Administrator
Network Operations Team
ClaraNET (UK) Ltd. NOC
------------------------------
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 V9 Issue 3784
**************************************