[9866] in Perl-Users-Digest
Perl-Users Digest, Issue: 3459 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 16 16:07:16 1998
Date: Sun, 16 Aug 98 13:00:25 -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 Sun, 16 Aug 1998 Volume: 8 Number: 3459
Today's topics:
[ANNOUNCE] GIFgraph 1.03 (Super-User)
ANNOUNCE: Extensible Report Generator 1.13 (Phoenixl)
ANNOUNCE: CGI::LogCarp-1.11 posted to CPAN mike808@mo.net
ANNOUNCE: Math::Units module used for unit conversion (Ken Fox)
Announcement of a Biological Perl module jong@salt2.med.harvard.edu
Correct MIME-type? <symon@slip.net>
Re: Correct MIME-type? (-)
Does Perl properly cast lists to PerlXS? mhempel@mediacity.com
Re: eq and == difference (Andre L.)
Geanfammer : A biology program for genome analysis and jong@salt2.med.harvard.edu
Re: Kermit Speaks (Is anyone listening?) (Ronald J Kimball)
Re: Kermit Speaks (Bob Trieger)
Re: Kermit Speaks (Nathan V. Patwardhan)
Re: Kermit Speaks (Michael J Gebis)
Looking for hybrid database/shopping cart program <gnielson@charlotte.infi.net>
Re: Looking for hybrid database/shopping cart program <rick.delaney@shaw.wave.ca>
New release of X11::Motif, Lib, Toolkit, Xbae, XRT, Xpm (Ken Fox)
newbie questions <stevenba@ccpl.carr.lib.md.us>
NULLS - printing to a socket??? <mnemonix@globalnet.co.uk>
Re: Perl 5.005_01 Threads and LWP (Gerald Kropitz)
Re: Perl Style bhoylma@uswest.com
Perl's equiv of "cc -DDEBUG" ? (Tomoyuki Tanaka)
Re: Perl's equiv of "cc -DDEBUG" ? (Mark-Jason Dominus)
Re: Q: How to read all the file name in a directory (I R A Aggie)
Re: Q: How to read all the file name in a directory (I R A Aggie)
Re: Q: How to read all the file name in a directory (I R A Aggie)
Re: Q: How to read all the file name in a directory (Michael J Gebis)
Re: Reference Confussion (Ronald J Kimball)
Re: Reference Confussion <rick.delaney@shaw.wave.ca>
Re: X-file (?=...), case postponed. (Abigail)
Re: X-file (?=...), case postponed. <rick.delaney@shaw.wave.ca>
Re: X-file (?=...), case postponed. (Ilya Zakharevich)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 16 Aug 1998 19:51:19 GMT
From: root@comdyn.com.au (Super-User)
Subject: [ANNOUNCE] GIFgraph 1.03
Message-Id: <6r7d7n$fjt$1@news.neta.com>
I just uploaded GIFgraph 1.03 to PAUSE. It should appear at a CPAN
near to you soon.
Extracts from README:
This is GIFgraph, a package to generate GIF charts, using Lincoln Stein's
GD.pm.
MOST IMPORTANT CHANGES SINCE VERSION 1.01
- Vertical printing of X axis labels
- CHANGED DEFAULTS for zero_axis and zero_axis_only
- Fixed problems with negative values, data ranges without 0, and
printing of the x axis labels (I hope)
- No more support for perl 5.003. Since perl 5.005 is out, and I don't
have a 5.003 here to test all the time, I won't support it anymore.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: 16 Aug 1998 19:51:32 GMT
From: phoenixl@aol.com (Phoenixl)
Subject: ANNOUNCE: Extensible Report Generator 1.13
Message-Id: <6r7d84$fk8$1@news.neta.com>
The Extensible Report Generator (ERG) is a set of perl object modules
that lets a user quickly develop object classes which can produce
very configurable reports with a minimal amount of development
effort. The report generator class can easily be extended to produce
summary information besides just formatting data. The ERG can be
used for such things as "quick and dirty" types of reports, prototyping
of reports, producing information tables for HTML files, exploring
"what if" kinds of questions.
The ERG 1.13 is available in CPAN/authors/id/P/PH/PHOENIXL:
extensible_report_generator_1.13.zip
extensible_report_generator_1.13.readme
Here's an example of a very simple report produced by the report
generators, including the field headings and the summary lines.
----------------------------------------------------------------------
Directory Modify time Access
docs 05/27/98 19:03:06 05/27/98
freezer 05/27/98 14:33:34 05/27/98
File Size Modify time Access
dirhelp.vtxt 1,383 05/27/98 09:26:42 06/03/98
demo.pl 2,468 06/03/98 10:50:18 06/03/98
file_reporter.pm 6,366 06/03/98 10:38:58 06/03/98
line_formatter.pm 11,680 06/03/98 10:17:04 06/03/98
old_test.pl 3,258 05/27/98 19:00:06 06/03/98
page_manager.pm 9,719 06/03/98 10:33:20 06/03/98
report_generator.pm 25,540 06/03/98 10:16:42 06/03/98
report_summary.pm 6,821 06/03/98 10:20:04 06/03/98
zzz 513 05/27/98 10:31:02 06/03/98
Total 67,748
Average 7,528
------------------------------
Date: 16 Aug 1998 19:50:10 GMT
From: mike808@mo.net
Subject: ANNOUNCE: CGI::LogCarp-1.11 posted to CPAN
Message-Id: <6r7d5i$fja$1@news.neta.com>
CGI::LogCarp-1.11 has been posted to PAUSE and will be propagating through
CPAN shortly.
This module was designed for heavy use sites with _lots_ of CGI applications
in a production enterprise environment. This module gives your apps the
ability to have any mix of independent or combined logging, debugging, and
error-logging capabilities. It also is a superset of Lincoln Stein's
CGI::Carp module, so you can drop it in and go, using the new functionality
as you need it. (Yes, fatalsToBrowser is supported.)
Also, in homage to Ben Sugar's nsapi_perl, I put it on equal footing with
mod_perl support. I hope other CPAN authors will begin to also do the same and
remove hardwired references to mod_perl (i.e. Apache::Registry) to support
Netscape::Registry too.
In addition, I also wrote it as an excercise in writing a well documented
module for CPAN. Only you can tell me if I have suceeded in this endeavor.
See everyone at PerlCon2 in San Jose next week!
Michael King
Internet Technology Specialist
[ from the README ]
CGI::LogCarp
This is the CGI::LogCarp module for perl, providing additional streams for
logging and debugging.
The reason I wrote the module was so that my scripts could have separate and
independant streams for output for activity-based logging and for debug
logging separate from actual error output. I thought "we have STDOUT, STDIN,
and STDERR, so why not a STDBUG and STDLOG to go along with that".
It's designed so that the messages are tiered, in the sense that anything
going to STDERR gets replicated to STDLOG and STDBUG too. Anything going to
STDLOG goes to STDBUG, and STDBUG goes only to itself.
The default is that STDERR, STDBUG, and STDLOG all derive from your script's
original STDERR.
Now, since you can point these new streams to the same location, and different
people (or instances of your script) can point these streams to the same
location, I've removed duplicate messages and handled file locking for you.
This makes it *very* CGI-friendly and you can do something like poke STDBUG
back out to the STDOUT, yet leave STDERR and STDLOG going to your
_application's_ error and activity logs respectively, instead of only being
able to sling something to the web server's error log. Then you see normal
logging in your files, but debug output goes back out to your browser
(probably debugging the CGI)....
Anyway, I'm sure y'all will find all sorts of neato uses I've not thought
of yet, so have at it.
Michael King
Highlights of the new version:
1.11 Thu Jul 30 19:15:48 CST 1998
- Synchronized to Carp.pm from perl 5.005
- Synchronized to CGI::Carp-1.101 from perl 5.005
- Support for: mod_perl, cluck
- fatalsToBrowser() entity translation order fixed
- extra streams now optional via :STDBUG and :STDLOG tags
- fixed Symbol.pm to allow programmable "global" symbols
- (i.e. always qualify to pkg main)
- tests written. testing croak, die and friends fails.
- custom error messages implemented
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 16 Aug 1998 19:51:45 GMT
From: kfox@ford.com (Ken Fox)
Subject: ANNOUNCE: Math::Units module used for unit conversion
Message-Id: <6r7d8h$fka$1@news.neta.com>
The first release of the Math::Units module has been added
to CPAN. It is available as:
file: $CPAN/authors/id/KENFOX/Math-Units-1.2.tar.gz
size: 12148 bytes
md5: 5089d07f2042c567759d1c761c40dd98
This module is 100% Perl. Perl 5.004 or higher is required. (I
haven't tested it yet with Perl 5.005. Sorry.)
SYNOPSIS
use Math::Units qw(convert);
my $out_value = convert($in_value, 'in unit', 'out unit');
DESCRIPTION
The Math::Units module converts a numeric value in one unit of measurement
to some other unit. The units must be compatible, i.e. length can not be
converted to volume. If a conversion can not be made an exception is thrown.
A combination chaining and reduction algorithm is used to perform the most
direct unit conversion possible. Units may be written in several different
styles. An abbreviation table is used to convert from common long-form unit
names to the (more or less) standard abbreviations that the units module uses
internally. All multiplicative unit conversions are cached so that future
conversions can be performed very quickly.
Too many units, prefixes and abbreviations are supported to list here. See
the source code for a complete listing.
EXAMPLES
print "5 mm == ", convert(5, 'mm', 'in'), " inches\n";
print "72 degrees Farenheit == ", convert(72, 'F', 'C'), " degrees Celsius\n";
print "1 gallon == ", convert(1, 'gallon', 'cm^3'), " cubic centimeters\n";
print "4500 rpm == ", convert(4500, 'rpm', 'Hz'), " Hertz\n";
- Ken
--
Ken Fox (kfox@ford.com) | My opinions or statements do
| not represent those of, nor are
Ford Motor Company, Powertrain | endorsed by, Ford Motor Company.
Analytical Powertrain Methods Department |
Software Development Section | "Is this some sort of trick
| question or what?" -- Calvin
------------------------------
Date: 16 Aug 1998 19:50:41 GMT
From: jong@salt2.med.harvard.edu
Subject: Announcement of a Biological Perl module
Message-Id: <6r7d6h$fjd$1@news.neta.com>
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Title : Biology perl module Announcement #
# Download : ftp://cyrah.med.harvard.edu/pub/Software/Bioperl #
# #
# URL : http://cyrah.med.harvard.edu/~jong/bioperl.html #
# Date : 15th/Aug/1998 #
#________________________________________________________________#
Announcement of a Biological Perl module for Bioinformatics
Bio.pl and Bio.pm are a perl5 module for Biological sequence analsys.
It has many useful relatively independent subroutines which can be
used in your own perl programs.
DO Whatever You Like with It to help Science progress at the maximum
speed under free and unselfish environment.
They also contain useful general purpose subroutines.
Download: ftp://cyrah.med.harvard.edu/pub/Software/Bioperl
URL : http://cyrah.med.harvard.edu/~jong/bioperl.html
This is a DWYLI (Do Whatever You Like with It :-) software.
jong@salt2.med.harvard.edu
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Sun, 16 Aug 1998 10:53:51 -0700
From: Symon Michael <symon@slip.net>
Subject: Correct MIME-type?
Message-Id: <Pine.GSO.3.96.980816104510.2817A-100000@slip-3>
Hi, I'm a newbie writing cgi scripts and I cannot for the life of me
figure out how to get a .gif or .jpg returned from a remote source file.
My script starts with the usual text/html MIME declaration:
#!/usr/bin/perl
&readparse;
print "Content-type: text/html\n\n";
<snip>
------------------
I've tried adding a second line to include these other types but no avail.
Any ideas? (I'm finally asking because all I can find is text-based
forms, and I'd like to have a form that returns some artwork too!)
Thanks,
-->Symon
symon@slip.net
------------------------------
Date: Sun, 16 Aug 1998 18:23:05 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: Correct MIME-type?
Message-Id: <35d72295.114052770@news2.cais.com>
Symon Michael <symon@slip.net> Said this:
>Hi, I'm a newbie writing cgi scripts and I cannot for the life of me
>figure out how to get a .gif or .jpg returned from a remote source file.
>My script starts with the usual text/html MIME declaration:
>
>#!/usr/bin/perl
>
>&readparse;
>
>print "Content-type: text/html\n\n";
><snip>
>------------------
>I've tried adding a second line to include these other types but no avail.
>Any ideas? (I'm finally asking because all I can find is text-based
>forms, and I'd like to have a form that returns some artwork too!)
>
This has nothing to do with perl, and especially not
"comp.lang.perl.misc". This is a basic HTML question.
How do I include an image in my web page?
That's your question, really. If you don't know that, you skipped a
fundamental somewhere along the line. <img src="image.gif"> is your
answer.
I would hope that this far into the message, a little light has
clicked on in your head, but if not....
print "<img src="http://www.somewhere.com/somedir/image.gif">\n";
Perl nor any CGI really has anything to do with the image, all you are
doing is printing an HTML code to alert the browser to go and retrieve
the image, just as you would in any .html file.
------------------------------
Date: Sun, 16 Aug 1998 16:22:34 GMT
From: mhempel@mediacity.com
Subject: Does Perl properly cast lists to PerlXS?
Message-Id: <35d7059b.2798412@news.edify.com>
Will
@array = ("one", "two", "three")
pass char * [],
@array = (1, 2, 3)
pass int []
and
@array = (1.1, 2.2, 3.3)
pass double []?
No? Then what to do?
Thanks
--matt hempel
------------------------------
Date: Sun, 16 Aug 1998 13:33:04 -0500
From: alecler@cam.org (Andre L.)
Subject: Re: eq and == difference
Message-Id: <alecler-1608981333040001@dialup-807.hip.cam.org>
In article <6r5d98$hhu$1@news.rt66.com>, mikep@rt66.com (mikep) wrote:
> In article <35D61CF1.B61DB8A4@richmd.demon.co.uk>
> Peter Richmond <peter@richmd.demon.co.uk> writes:
>
> > Is there a difference between eq and == ?
> >
> > Ive noticed that in some if statements eq works but == does not.
>
> Essentially, == works for scalars such as numbers. eq works for
> strings. You can check out the docs at http://www.perl.org/ for a more
> complete run down of the perl comparison operators.
Strings are also scalars, may I point out.
Andre
------------------------------
Date: 16 Aug 1998 19:50:28 GMT
From: jong@salt2.med.harvard.edu
Subject: Geanfammer : A biology program for genome analysis and protein family maker.
Message-Id: <6r7d64$fjc$1@news.neta.com>
Anncouncement
Geanfammer : A biology program for genome analysis and protein family
maker.
Language: Perl5
http://cyrah.med.harvard.edu/Project/Geanfammer
ftp://unix.hensa.ac.uk/mirrors/perl-CPAN/modules/by-category/23_Miscellaneous_Modules/Bio/
--
jong@salt2.med.harvard.edu
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Sun, 16 Aug 1998 12:26:40 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Kermit Speaks (Is anyone listening?)
Message-Id: <1ddut06.fi9om0x4xlo6N@bay2-82.quincy.ziplink.net>
Kermit the frog <kermit@sesamestreet.com> wrote:
> Here's an interesting experiment: respond with silence to those who
> are not worthy of your knowledge...
I hope you will try this next time.
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sun, 16 Aug 1998 16:05:04 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Kermit Speaks
Message-Id: <6r7055$sl6$1@strato.ultra.net>
Kermit is Hitler. (hoping this still works.)
Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-800-400-1972
Ext: 1949 and let the jerk that answers know
that his toll free number was sent as spam. "
------------------------------
Date: 16 Aug 1998 17:11:44 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Kermit Speaks
Message-Id: <6r73sg$83e@fridge.shore.net>
Kermit the frog (kermit@sesamestreet.com) wrote:
: Yes, I made a few pointed remarks to the UNIX community - my apologies
: to those in the UNIX community who are willing to step outside of
: their little circle to help others. The comments were not directed at
: you.
Are you sure that you're *really* apologizing?
When you use "willing to step outside of their little circle" and "the
comments were not directed at you" in the same paragraph, one has to
wonder.
--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>
------------------------------
Date: 16 Aug 1998 17:39:19 GMT
From: gebis@fee.ecn.purdue.edu (Michael J Gebis)
Subject: Re: Kermit Speaks
Message-Id: <6r75g7$4ik@mozo.cc.purdue.edu>
kermit@sesamestreet.com (Kermit the frog) writes:
}As for my anonymity, Mr. Gebis, I do not have time to sort through a
}thousand emails entitled 'FUCK YOU' that I'm sure I would have
}received on this hot little topic. Do you???
Why am _I_ the one to get the call-out? Just to make it clear, I
don't have an issue with anonymity. I just had my suspicions as to
you you might really be. (Although now I am certain that I was
wrong.)
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: Sun, 16 Aug 1998 13:11:52 -0400
From: Gary Nielson <gnielson@charlotte.infi.net>
Subject: Looking for hybrid database/shopping cart program
Message-Id: <35D712D8.E2935382@charlotte.infi.net>
Hi,
I want to be able to put online information on about 100 products, but
without pricing information. The products fall into 4 groupings, and I
would like the ability for a user to view products and be able to enter
the quantity they are interested in and then after browsing all 4
categories, be able to click on a "Submit" button and have the
information on each item selected listed in an email that they would
send me for pricing information. In essence, this is a shopping cart
program without the need for pricing, shipping and handling, credit card
info, etc. Does anyone know of such a program or something similar that
I could adapt to my needs?
Any help appreciated. Please email reply as well.
Gary
Charlotte NC
------------------------------
Date: Sun, 16 Aug 1998 17:40:20 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: Looking for hybrid database/shopping cart program
Message-Id: <35D71AFB.C7D8D340@shaw.wave.ca>
Gary Nielson wrote:
>
> Hi,
>
> I want to be able to put online information on about 100 products,
"yada, yada, yada" =~ /perl content/ or die;
> Please email reply as well.
LOL
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: 16 Aug 1998 19:52:17 GMT
From: kfox@ford.com (Ken Fox)
Subject: New release of X11::Motif, Lib, Toolkit, Xbae, XRT, Xpm
Message-Id: <6r7d9h$fke$1@news.neta.com>
The third beta release of the X11::Motif module has been added
to CPAN. It is available as:
file: $CPAN/authors/id/KENFOX/X11-Motif-1.1b3.tar.gz
size: 223641 bytes
md5: c882d2c7717577c4c47b41905b532839
The X11::Motif distribution includes X11::Lib, X11::Toolkit,
X11::Xpm, X11::Xbae and X11::XRT. An X11::Athena (including
the 3d, Win95 and NeXTSTEP variants) is in the works. I'll
probably have to split the distribution at that point because
it is just getting too large.
Taken together, these modules provide a nearly complete
interface to the standard X libraries. The modules have both
object oriented and function call style interfaces. The object
interface is similar to the Tk module. The function call
interface is strongly modeled after the standard X library
documentation and will be familiar to someone with X Toolkit or
Motif experience.
The modules work well in both stand-alone scripts and when embedded
in a larger C (or C++) Motif application. Embedded Perl combined
with this module is an ideal way to add scripting capability to an
existing Motif application.
This release is very stable and works well. Production programs
are being built on top of it. (The only reason that this version
is not labeled production is because it is missing complete
documentation.)
I've included two versions of the classic "hello world" example
at the end of this announcement. Even if you don't grab the module,
I'd appreciate feedback on whether the examples are understandable.
To build the modules, you will need:
* Perl version 5.004 or higher (5.005 hasn't been tested yet)
* X11R5 or higher (X11R4 should work but hasn't been tested)
* Motif 1.2.4 or higher (CDE Motif works. Motif 2.0 is reported
to work. LessTif is also reported to work, but with reduced
functionality.)
* An ANSI C compiler
I would appreciate being notified of any changes necessary to
support other environments and/or widget sets.
Any questions or comments? Please send them to <fox@vulpes.com>.
- Ken
# ----------------------------------------------------------------------
# -- Example #1: The object style
use X11::Motif;
my $toplevel = X::Toolkit::initialize("Example");
my $form = give $toplevel -Form;
my $hello = give $form -Label, -text => 'Hello, world!';
my $ok = give $form -Button, -text => 'OK', -command => sub { exit };
arrange $form -fill => 'xy', -bottom => [ $ok, $hello ];
handle $toplevel;
# ----------------------------------------------------------------------
# -- Example #2: The function call style (i.e. "traditional" Motif)
use X11::Motif qw(:Xt :Xm);
my $toplevel = X::Toolkit::initialize("Example");
my $form = XtCreateManagedWidget("form", xmFormWidgetClass, $toplevel);
my $hello = XtCreateManagedWidget("hello", xmLabelWidgetClass, $form,
XmNlabelString, "Hello, world!",
XmNlabelType, XmSTRING);
my $ok = XtCreateManagedWidget("ok", xmPushButtonWidgetClass, $form,
XmNlabelString, "OK",
XmNlabelType, XmSTRING);
XtAddCallback($ok, XmNactivateCallback, sub { exit }, 0);
XtSetValues($hello,
XmNrightAttachment, XmATTACH_FORM,
XmNleftAttachment, XmATTACH_FORM,
XmNtopAttachment, XmATTACH_FORM,
XmNbottomAttachment, XmATTACH_WIDGET,
XmNbottomWidget, $ok);
XtSetValues($ok,
XmNrightAttachment, XmATTACH_FORM,
XmNleftAttachment, XmATTACH_FORM,
XmNtopAttachment, XmATTACH_NONE,
XmNbottomAttachment, XmATTACH_FORM);
XtRealizeWidget($toplevel);
XtAppMainLoop(XtWidgetToApplicationContext($toplevel));
--
Ken Fox (kfox@ford.com) | My opinions or statements do
| not represent those of, nor are
Ford Motor Company, Powertrain | endorsed by, Ford Motor Company.
Analytical Powertrain Methods Department |
Software Development Section | "Is this some sort of trick
| question or what?" -- Calvin
------------------------------
Date: Sun, 16 Aug 1998 15:46:40 -0300
From: Steven Barbash <stevenba@ccpl.carr.lib.md.us>
Subject: newbie questions
Message-Id: <35D72910.93B@ccpl.carr.lib.md.us>
Hello,
What is the (easiest?) way to create a "duplicate" of the "." set or
array of characters?
Documentation in perlre.html defines the 'regular expression
metacharacter' "." as 'Match any character except newline'.
I want to create an identical set excluding the "\t" character.
(More specifically, I want to search like "." but exclude the \t
character.)
Also, what is the procedure for listing/printing/displaying these system
defined sets? ".". "\s"(whitespace character), ...?
Thank you.
Steve Barbash
------------------------------
Date: 16 Aug 1998 17:52:14 GMT
From: "Mnemonix" <mnemonix@globalnet.co.uk>
Subject: NULLS - printing to a socket???
Message-Id: <01bdc93e$bdc806c0$2114140a@jupiter>
Dear All,
I wonder if anyone can help me - extensive searches have still not provided
me with an answer:
I have created a socket to another machine and am trying to print a NULL
and newline character to it:
$null = 0;
select S; # where S is the socket
print S ("$null\n");
Perl is treating this as an ASCII string and consequently is sending `30
0Ah' over the wire as opposed to `00 0Ah'.
I have tried
$null = '0x00';
print S (hex($null));
as well as oct()
but both still send 30h as oppossed to 00h
Does anyone know how I ca do this? All I want to do is send a HEX string
verbatim across the wire.
Thanks in advance for your time - email me or respond to the list.
Mnemonix
------------------------------
Date: 16 Aug 1998 17:51:54 GMT
From: gkropitz@ghome.intern.Austria.EU.net (Gerald Kropitz)
Subject: Re: Perl 5.005_01 Threads and LWP
Message-Id: <slrn6te7er.lt4.gkropitz@ghome.intern.Austria.EU.net>
>aren't? in particular LWP (from libwww 5.35) crashes and burns
>(core dumps Perl) big time if run inside a thread.
>
>Sigh. Anyone know if LWPng 0.23 alpha is thread-safe?
i'm not sure that this strange behaviour is the fault of the
LWP implementation... i tried to use IO::Socket directly to
fetch web pages via threads... no chance... all hell broke
loose...
as long as IO::Socket has problems with threads you won't
be able to use LWP either...
:-/
try LWPng or ParallelUserAgent for fetching pages in
parallel...
-gerald
------------------------------
Date: Sun, 16 Aug 1998 17:09:31 GMT
From: bhoylma@uswest.com
Subject: Re: Perl Style
Message-Id: <6r73ob$omd$1@nnrp1.dejanews.com>
In article <6r5kam$5sm$1@shell1.ncal.verio.com>,
gerg@shell1.ncal.verio.com (Greg Andrews) wrote:
> tchrist@mox.perl.com (Tom Christiansen) writes:
> > [courtesy cc of this posting sent to cited author via email]
> >
> >In comp.lang.perl.misc, Scott.L.Erickson@HealthPartners.com (Scott Erickson)
writes:
> >:I, for one, believe
> >:that using 'or' is much more readable than ||,
> >
Don't forget the above two operators do NOT share the same precedence.
Readability may not be the primary factor for choice in this particular
instance.
Peace.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 16 Aug 1998 17:41:24 GMT
From: ez074520@dilbert.ucdavis.edu (Tomoyuki Tanaka)
Subject: Perl's equiv of "cc -DDEBUG" ?
Message-Id: <6r75k4$fdv$1@mark.ucdavis.edu>
what's Perl's equiv of "cc -DDEBUG" ?
where in the C code you'd have
#ifdef DEBUG
[print stuff]
#endif
------------------------------
Date: 16 Aug 1998 15:13:27 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Perl's equiv of "cc -DDEBUG" ?
Message-Id: <6r7b0n$45j$1@monet.op.net>
In article <6r75k4$fdv$1@mark.ucdavis.edu>,
Tomoyuki Tanaka <ez074520@dilbert.ucdavis.edu> wrote:
> what's Perl's equiv of "cc -DDEBUG" ?
>
> where in the C code you'd have
>
> #ifdef DEBUG
> [print stuff]
> #endif
>
There isn't one.
But the translation of
int DEBUG = 0;
...
if (DEBUG) {
...
}
is straightforward.
------------------------------
Date: Sun, 16 Aug 1998 12:09:10 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Q: How to read all the file name in a directory
Message-Id: <fl_aggie-1608981209110001@aggie.coaps.fsu.edu>
In article <6r5cbc$m69@mozo.cc.purdue.edu>, gebis@fee.ecn.purdue.edu
(Michael J Gebis) wrote:
+ Don't you get it? You're arguing with folks that LOVE the fact that
+ it is "eternally September." It's a sweet deal--a newbie comes in and
+ asks what is admittedly a dumb question. Now anybody can throw
+ netiquette away and flame away, all in the name of that same precious
+ netiquette.
Ah, you mean like the baby grad-level stats course I took? where on
the first day the guy next to me asked "whats a mean?" and I simply
groaned?
Requiring a certain level of knowledge is not impolite. Its not impolite
to expect people to know how to use an index in a book, or how to search
for a particular string in a text file using their tool of choice. It
is impolite, however, to expect other people to do your work for you.
But I'm glad to see people volunteering to be the Perl Help Desk. That
is what you're doing, isn't it?
James
------------------------------
Date: Sun, 16 Aug 1998 12:12:00 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Q: How to read all the file name in a directory
Message-Id: <fl_aggie-1608981212010001@aggie.coaps.fsu.edu>
In article <6r5ald$lmr@mozo.cc.purdue.edu>, gebis@fee.ecn.purdue.edu
(Michael J Gebis) wrote:
+ fl_aggie@thepentagon.com (I R A Aggie) writes:
+ }Patting a kid on the head is nice, but that' don't teach him how to ride
+ }a bike...
+
+ Let me guess. You learned to ride a bike by consulting the
+ documentation.
No, I learned by doing. I learned by falling down. I learned by getting
back up, and back on.
I didn't go up to a bunch of other kids and say "Show me how to ride my
bike. Fast. Without hurting myself. And to be able to do cool things, like
popping wheelies. And right now. For free. And don't expect me to provide
payment-in-kind."
James
------------------------------
Date: Sun, 16 Aug 1998 12:15:18 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Q: How to read all the file name in a directory
Message-Id: <fl_aggie-1608981215180001@aggie.coaps.fsu.edu>
In article <ltyaspbmkn.fsf@asfast.com>, Lloyd Zusman <ljz@asfast.com> wrote:
[me, in some article far, far, away]
+ > So, you're scorning TomC, eh? Ever consider the possiblity that Tom has
+ > feelings, too?
+ I'm sure that Tom has feelings. However, if he or anyone else who has
+ feelings makes a point of deliberately insulting others, then he or
+ she can expect to sometimes get responses in return that he or she
+ might not like, no matter how justified he or she might feel in
+ delivering these insults.
Ummm...if sarcasm where posted to the net, would anyone notice?
James
------------------------------
Date: 16 Aug 1998 18:05:50 GMT
From: gebis@fee.ecn.purdue.edu (Michael J Gebis)
Subject: Re: Q: How to read all the file name in a directory
Message-Id: <6r771u$519@mozo.cc.purdue.edu>
fl_aggie@thepentagon.com (I R A Aggie) writes:
}Requiring a certain level of knowledge is not impolite. Its not impolite
}to expect people to know how to use an index in a book, or how to search
}for a particular string in a text file using their tool of choice. It
}is impolite, however, to expect other people to do your work for you.
I agree 100% with everything in the quoted paragraph above. I'm
making a different point.
Is there something wrong with your eyes that you coudln't read my
post? Is there something wrong with your brain that you couldn't
understand it? Do you have broken fingers that would make you type
something so stupid?
Waitasecond! That last paragraph I wrote is a perfect example of what I
dislike. It's filled with hate, it's too harsh, and standing alone,
would be virtually certain to start a flame war. But for some reason,
that sort of response is seen as okay.
If you become a barbarian to defeat the barbarians, you've already
lost.
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: Sun, 16 Aug 1998 12:26:41 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Reference Confussion
Message-Id: <1ddut43.1h9ljyc1wz12tnN@bay2-82.quincy.ziplink.net>
<ruben@wynn.com> wrote:
> where=>[]->{ left_column =>\$where_left,
> ops => \$where_ops,
> right_values =>\$where_right,
> bool => \$where_cont
> },
What do you really want to do here?
You are trying to dereference an empty anonymous array using a hash
subscript.
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sun, 16 Aug 1998 16:32:58 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: Reference Confussion
Message-Id: <35D70B31.4B9C939@shaw.wave.ca>
[posted and mailed]
ruben@wynn.com wrote:
>
> %build{ cols => [],
This is trying to dereference the hash (improperly), but you want to
initilize it. See below.
> tabs=>[],
> where=>[]->{ left_column =>\$where_left,
This will give you other errors. You probably want $build{'where'} to hold
a reference to an anonymous hash. See below.
> ops => \$where_ops,
> right_values =>\$where_right,
> bool => \$where_cont
> },
> "sort" => \$order
> };
%build = ( # you are initializing the hash, not dereferencing it
cols => [],
tabs => [],
where => { # anonymous hash
left_column =>\$where_left,
ops => \$where_ops,
right_values =>\$where_right,
bool => \$where_cont
},
"sort" => \$order
);
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: 16 Aug 1998 04:33:12 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: X-file (?=...), case postponed.
Message-Id: <6r5ne8$anr$1@client3.news.psi.net>
Patrick Timmins (ptimmins@netserv.unmc.edu) wrote on MDCCCX September
MCMXCIII in <URL: news:6r4siv$1r3$1@nnrp1.dejanews.com>:
++ In article <35D5A203.BC2852D5@shaw.wave.ca>,
++ Rick Delaney <rick.delaney@shaw.wave.ca> wrote:
++ > The part that is left out before this elegant explanation is
++ >
++ > Regex sees ''
++ > Regex matches the null string at the first possible place.
++ >
++ > The part you fail to understand is that the first possible place is
++ > *between* the 'J' and the 'u'. This is a special case with split that
++ > only applies to patterns that match the null string.
++
++ The part you fail to understand is that the first possible place is
++ *between* the first null and the 'J', as you can see here:
No. The documentation says that if the regex matches the null string,
the split is special cased, and the splits will only occur *between*
characters where the regex matches.
++ @arr = split/(?=J)/s, "Just another Perl Hacker\n";
Nope.
@arr = split/(?=x)/s, "Just another Perl Hacker\n";
will give you the same array. The regex fails everywhere it is applied,
leaving an unsplit "Just another Perl Hacker\n".
If you where right, @arr would have 2 elements, "" and
"Just another Perl Hacker\n". But @arr only has one.
Abigail
--
perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'
------------------------------
Date: Sun, 16 Aug 1998 18:18:08 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: X-file (?=...), case postponed.
Message-Id: <35D723CE.F47F6442@shaw.wave.ca>
Patrick Timmins wrote:
>
> The part you fail to understand is that the first possible place is
> *between* the first null and the 'J', as you can see here:
>
Not with split. I suppose that technically the *regex* passed to split
will match at the start of the string, but because it matches the null
string both the first null string and the first 'delimiter' are
discarded by split.
This is documented.
> @arr = split/(?=J)/s, "Just another Perl Hacker\n";
What is this example supposed to demonstrate?
> > Nothing is being thrown out.
Again, technically I'm wrong here, as shown to me in some debugger
output I received from Guy Decoux. However the semantics are the same.
If the first possible match is before the first character in the string
then split will not return the leading null field. Hence in terms of
what split returns, it is not possible for it to match before the first
character of the string.
> Perl is throwing away the 'Just another Perl Hacker\n' element that
> should be put on to the array just in front of the 'J'
No, *split* is throwing out the first matched substring, "", and the
delimiter that failed to advance pos, "Just another Perl Hacker".
>
> As I said before, I don't know how many times I've said it,
> but apparently not enough: Regexes obey rules of parenthetical
> precedence (I'll leave the 'mathematical' part off for you,
> as that appears to throw others into a tizzy as well).
>
You have said it more than enough. I suppose I just don't know what you
mean by it. Does it even have anything to do with your original
question? Do you even have a question anymore?
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: 16 Aug 1998 18:53:28 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: X-file (?=...), case postponed.
Message-Id: <6r79r8$t2m$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Ronald J Kimball
<rjk@coos.dartmouth.edu>],
who wrote in article <1dduqlk.59t74i1yeq0q9N@bay2-82.quincy.ziplink.net>:
> split / */, "Hi there!";
> split / */, " Hi there!";
>
> In the first case, the regex matches the null string at the beginning of
> the string, so split ignores the match. That is the special case with
> split that only applies to patterns that can match the null string.
Undocumented, unfortunately. (And do not mention that joke at the
docs for split().)
And technically speaking, split is not ignoring anything. one can see
it with -Mre=debug (or debugcolor). It just asks the RE engine to
match at least one char when at start-of-string (RE engine has some
bells and whistles not accessible from Perl, like requesting the
minimal length of match). And it not asking for any match at
end-of-string.
Ilya
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3459
**************************************