[7405] in Perl-Users-Digest
Perl-Users Digest, Issue: 1030 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 16 04:07:56 1997
Date: Tue, 16 Sep 97 01:00:36 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 16 Sep 1997 Volume: 8 Number: 1030
Today's topics:
"hello.pl > x" gives empty x on NT <olli.blackburn@visigenic.com>
Re: Attempt to free unreferenced scalar?? <rootbeer@teleport.com>
Re: automatically generating regex patterns (Matti Kinnunen)
Chicago User Group <mus24@erols.com>
FTP Commands <alpengeist@msn.com>
Re: Getting a file from some other server (David Efflandt)
Gotcha regarding parsing comma separated lines and the <zot@ampersand.com>
Having problems installing... <jmotter@fgi.net>
Re: I'm in an idiom rut ... (dave)
Re: Including common code with 'my' variables <rootbeer@teleport.com>
Re: Including common code with 'my' variables (Dan Sumption)
Re: Is there a simpler syntax for: defined $a && $a ne <ajohnson@gpu.srv.ualberta.ca>
Re: Need Pgp signature/checksum for Perl distribution <rootbeer@teleport.com>
Parsing e-mail folder (newbie) <hmw-dave@pplus.best.com>
Re: perl and Apache and Header controls <jshapiro@idea-net.com>
Re: Perl Executables? <tlawallANTISPAM@concentric.net>
Perl Sockets <dexterp@acay.com.au>
Q:here document <jxia@worldnet.att.net>
Randal Schwartz: Menace to society? <joepet@server.berkeley.edu>
Re: Randal Schwartz: Menace to society? <lth@dannet.dk>
RFC: method naming in module "Bit::Vector" (Steffen Beyer)
SQL program that works both in Win'95 and Linux (kiet)
Re: Submit Using Image (Chris Russo)
Re: Why a three-digit exponential for double precision <rootbeer@teleport.com>
Re: Why can't I talk directly to the mail daemon? <lth@dannet.dk>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 12 Sep 1997 11:17:28 -0700
From: Olli Blackburn <olli.blackburn@visigenic.com>
Subject: "hello.pl > x" gives empty x on NT
Message-Id: <34198738.7C97B83E@visigenic.com>
I'm having problems redirecting the stdout of perl scripts from the
cmd.exe command line on NT4.0 using perl:
This is perl, version 5.001 Unofficial patchlevel 1m.
Perl for Win32 Build 110
Built Aug 13 1996@08:18:50
The problem is that running the command without redirection works fine,
as does running it via "perl hello.pl", but using the NT associations to
allow me to simply run "hello.pl" results in no output in the output
file. Here's a transcript:
C:\temp> cat hello.pl
print "Hello World!\n";
C:\temp> hello.pl
Hello World!
C:\temp> hello.pl > x
C:\temp>cat x ### why is this empty
C:\temp> perl hello.pl > x
C:\temp> cat x ### but this works!!
Hello World!
I've created a PerlScript file type to 'open' (i.e. run) a perl script
and added an association from .pl files to PerlScript. I used the ftype
and assoc commands to do this, which results in new entries in
HKEY_CLASSES_ROOT.
C:\temp>assoc .pl
.pl=PerlScript
C:\temp>ftype PerlScript
PerlScript=C:\Progra~1\Perl5\bin\perl.exe "%1" %*
This is a corrected version from the Perl for NT FAQ and "help ftype"
(Microsoft telling me how to configure perl, what's the world come to
:-). It also mirrors the definitions for bat, cmd, exe and com files.
The correction is the double quotes around %1 to support spaces in perl
script file names.
(BTW: I know about PATHEXT, I'm just keeping things as simple as
possible for this problem).
So where does the stdout go!!!
On a related subject, why is the output from system() not correctly
interleaved with that from print when stdout is redirected? Another
transcript shows what I'm having trouble with:
C:\temp> cat mixlines.pl
print("print 1\n");
system("echo echo 1");
print("print 2\n");
system("echo echo 2");
C:\temp> perl mixlines.pl
print 1
echo 1
print 2
echo 2
C:\temp> perl mixlines.pl > x
C:\temp> cat x
echo 1
echo 2
print 1
print 2
I'm using echo as an example, but all programs I've tried give the same
result.
Hope someone can help with these frustrating problems.
If you mail directly back to me remove the _nojunkmail from my reply
address.
Thanks,
Olli
------------------------------
Date: Mon, 15 Sep 1997 20:48:20 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Ken Williams <ken@forum.swarthmore.edu>
Subject: Re: Attempt to free unreferenced scalar??
Message-Id: <Pine.GSO.3.96.970915204217.3740I-100000@julie.teleport.com>
On Mon, 15 Sep 1997, Ken Williams wrote:
> I'm getting a bizarre error message in my Perl program, and I'm hoping
> someone here will be able to help me figure out what it means. The
> message is:
>
> Attempt to free unreferenced scalar at /forum/taco.dev/lib/io.lib.pl
> line 315.
The perldiag(1) manpage says:
=item Attempt to free unreferenced scalar
(W) Perl went to decrement the reference count of a scalar to see if
it would go to 0, and discovered that it had already gone to 0
earlier, and should have been freed, and in fact, probably was freed.
This could indicate that SvREFCNT_dec() was called too many times, or
that SvREFCNT_inc() was called too few times, or that the SV was
mortalized when it shouldn't have been, or that memory has been
corrupted.
Hmmm... Not as helpful as most such items in perldiag. I'd translate that
message as "Somebody screwed up." :-)
Basically, it's not an error in your Perl code; it's an error in
somebody's compiled code, probably in Perl itself or (more likely) in some
compiled module you're using. If you're using the most recent versions of
everything, try contacting the module's author (or run perlbug, if you're
not using any compiled modules).
> When I put debug statements in my code, the error message jumps around
> like a slippery fish. Thus, I can't produce a test program which
> isolates the error.
Dang. But that's not unusual for these things.
> My only guess is that this is some garbage collection thing, but I don't
> understand it.
That's about the size of it. Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: 16 Sep 1997 10:22:40 +0300
From: matti@universe.pc.helsinki.fi (Matti Kinnunen)
Subject: Re: automatically generating regex patterns
Message-Id: <lzbu1t3epr.fsf@universe.pc.helsinki.fi>
In article Hakan Kjellerstrand <hakank@kajen.com> writes:
I've done a little module (MakeRegex) for this, and handle more advanced
regular expressions than just |-ring the strings. By the way, it is
inspired from emacs' make-regexp, and has the same shortcomings.
The program can be tested (and downloaded) from
http://www.netch.se/~hakank/makeregex
I'm developing a natural language interface to regular expressions.
Here is a sample run:
*******
universe:~/Haskell/Nancy$ ROutput
Give a description for me to translate
> Find a word boundary and a word and store it in $word. Find a word boundary. Find some whitespace and $word at least ten times. Replace them with the result of applying the function 'length' to $word globally and caseinsensitively.
English:
Find a word boundary and a word and assign it to $word. Find a word boundary. Find some whitespaces and $word at least ten times. Replace them with the result of applying the function "\"length\"" to $word globally and caseinsensitively.
Haskell:
subst </\\b word@([a-z]+)\\b(\\s*${word}){10,}/length(${word})/Global_Match Case_Insensitive>
Perl:
s/\b([a-z]+)\b(\w*\1){10,}/length($1)/gie
universe:~/Haskell/Nancy$
*******
Everything is automatic.
In a month my program will be available in the net.
I'll let everyone to know then.
- matti -
--
* matti.kinnunen@helsinki.fi *
* http://universe.pc.helsinki.fi/~matti/contact.html *
* +358-(0)40-593 50 91 but try first +358-(0)9-191 23978 *
------------------------------
Date: Mon, 15 Sep 1997 20:13:51 -0400
From: Mus <mus24@erols.com>
Subject: Chicago User Group
Message-Id: <341DCF3F.2E39@erols.com>
Is there a Chicago Perl User Group, if so please email me thanks!
mailto:mus24@erols.com
------------------------------
Date: Mon, 15 Sep 1997 17:51:45 -0700
From: <alpengeist@msn.com>
Subject: FTP Commands
Message-Id: <01bcc23a$a901f220$19c82399@default>
Can any please tell me how to use cgi for ftp? Thanks...
-Stephon
------------------------------
Date: Tue, 16 Sep 1997 01:33:34 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Getting a file from some other server
Message-Id: <341ee0a2.5392258@flood.xnet.com>
Terry Lee <tdlee@terrylee.com> wrote:
(snip)
>What do I use to open the file on another server other than where the
>code is running?
>For instance, let's suppose I saw a file on
>tigger.number1.com/var/www/temp/data.txt and wanted to display the
>contents like the above example.
wwwgrab is a perl script that will grab a web page even if you do not
have the LWP module. I also wrote my own module based on wwwgrab that
can get a page with or without headers, just the headers or just the
first line of the header (to validate links). See
http://www.xnet.com/~efflandt/pub/
I included the original wwwgrab with my wwwpost or you can get wwwgrab
from the wwwpost subdir.
David Efflandt/Elgin, IL USA
efflandt@xnet.com http://www.xnet.com/~efflandt/
------------------------------
Date: 15 Sep 1997 20:52:58 -0400
From: Mark Atwood <zot@ampersand.com>
Subject: Gotcha regarding parsing comma separated lines and the FAQ
Message-Id: <v64t7m6pw5.fsf@colon.dev.ampersand.com>
In the FAQ, there is a question "How can I split a [character]
delimited string except when inside [character]? (Comma-separated
files)". The answer gives two solutions. One is to use a hairy regular
expression, and the other is to use the Text::Parsewords module
function "quotewords".
Warning! These two approaches are not identical.
The quotewords function is "smart" about "quoted quote characters",
while the given regexp is not.
I was trying to parse a database of CSV lines, and some of the values
are URLs and so look like
"foo","http://domain/path/part/","bar"
but some were like
"baz","http://domain/path\part\","zug"
(Bloody Microsoft brainwashed droids....)
And so parsewords would see the pair \" and interpret it as the
character " instead of the end of string delimiter, and then blow up
with a "Unmatched quote" error when it reached the EOL for that
record.
I think that a little bit of verbage should be inserted into the FAQ
identifying this difference. Its already big enough, what's another
sentence or two? *grin*
--
Mark Atwood | Thank you gentlemen, you are everything we have come to
zot@ampersand.com | expect from years of government training. -- MIB Zed
------------------------------
Date: 16 Sep 1997 00:28:31 GMT
From: "Jeff Motter" <jmotter@fgi.net>
Subject: Having problems installing...
Message-Id: <01bcc238$cbcd0760$3f4682d0@mott1>
I'm using Perl on my NT 4.0 Workstations and Server and I love it. Now I
want it on
a Unix machine(excuse me, Sun OS 4 machine). My Unix background is lame so
I've had to turn to someone in my office to get it installed. She is
having a real hard
time getting it to compile. If you have any suggestions, I would greatly
appreciate them.
Below is part of an email she sent be describing the problem. TIA!
> Basically when ever I run the "make"
> command it completes and then the last line it spits is the ld error.
> The procedure is to do a make after the configure, make, make test,
> and then make install. All bomb out on the ld command.
> cc -L/usr/local/lib -o perl perlmain.o
> lib/auto/DynaLoader/DynaLoader.a libpe
> rl.a `cat ext.libs` -lnsl -ldbm -ldl -lm -lc -lposix
> ld: cannot move temp file l.outa16581 to perl: Is a directory
> *** Error code 4
> make: Fatal error: Command failed for target `perl'
Jeff Motter
jmotter@c1chicago.com
------------------------------
Date: Tue, 16 Sep 1997 00:34:36 GMT
From: over@the.net (dave)
Subject: Re: I'm in an idiom rut ...
Message-Id: <341dd3fd.1413769@news.one.net>
bsa@void.apk.net (Brandon S. Allbery KF8NH; to reply, change "void" to
"kf8nh") wrote:
>In <341d8d81.1206482@news.one.net>, on 09/15/97 at 07:39 PM,
> over@the.net (dave) said:
>+-----
>| while( @_ > 0 )
>| {
>| last unless defined $_[1];
>| $hash{$_[0]} = $_[1];
>| shift; shift;
>| }
>| Just wondering if I could have less typing with the same
>| functionality, without writing a "getargs" subroutine.
>+--->8
>
>Have you tried
>
> %hash = @_;
>
Now that is what I call a "trick answer" :)
Dave
|
| Please visit me at http://w3.one.net/~dlripber
|
| For reply by email, use:
| dlripber@one.net
|________
------------------------------
Date: Mon, 15 Sep 1997 20:54:50 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Dan Sumption <dan@gulch.demon.co.uk>
Subject: Re: Including common code with 'my' variables
Message-Id: <Pine.GSO.3.96.970915204932.3740J-100000@julie.teleport.com>
On Mon, 15 Sep 1997, Dan Sumption wrote:
> In effect what I want to do is call a subroutine which passes its 'my'
> variables to the parent subroutine, so that they only go out of scope at
> the end of the parent block.
Maybe you want references. But maybe not. Do you want a variable to be
shared between two subroutines? One way is to do this sort of thing.
{
my $shared;
sub foo { ... }
sub bar { ... }
}
Both subs can access $shared, which is lexically contained inside the
naked block. Maybe not what you want, if you're doing something like
subclassing. ($shared stays around between invocations of &foo and &bar,
which may or may not be desirable.)
If you're doing OO stuff, maybe you want to include a field in your object
to pass such stuff. Good luck!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Tue, 16 Sep 1997 07:39:01 GMT
From: dan@gulch.demon.co.uk (Dan Sumption)
Subject: Re: Including common code with 'my' variables
Message-Id: <341e3567.43321462@news.demon.co.uk>
On Mon, 15 Sep 1997 20:54:50 -0700, Tom Phoenix
<rootbeer@teleport.com> wrote:
>On Mon, 15 Sep 1997, Dan Sumption wrote:
>
>> In effect what I want to do is call a subroutine which passes its 'my'
>> variables to the parent subroutine, so that they only go out of scope at
>> the end of the parent block.
>
>Maybe you want references. But maybe not. Do you want a variable to be
>shared between two subroutines? One way is to do this sort of thing.
>
> {
> my $shared;
>
> sub foo { ... }
>
> sub bar { ... }
> }
Kind of, except the part that varies is the declaration of my $shared
- and this is the part I can't do in a subroutine. For example, in one
class I might only want to declare $shared before going into foo and
bar, but in a subclass I may want to declare $shared, $other_shared
and $something_else_to_share.
Ideally, like most other inherited objects, I would be able to call
the over-ridden subroutine (let's call it 'share') which would set
$other_shared and $something_else_to_share, then I would call
SUPER::share which would set $shared and would perform the necessary
operations on the variables. However, this would mean that
$other_shared and $something_else_to_share would not be seen by
SUPER::share, and $shared would have gone out of scope before
returning control to the current class's share subroutine.
I also don't think I want references, because the variable I'm copying
into $shared will change, but I don't want the copy to change.
Dan Sumption, Technical Director dan@gulch.demon.co.uk
Hard Reality, Canary Wharf, London E14 dan@hardnet.co.uk
http://www.hardnet.co.uk/dan/
------------------------------
Date: Tue, 16 Sep 1997 00:09:27 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: Is there a simpler syntax for: defined $a && $a ne ''
Message-Id: <341E1487.644A0451@gpu.srv.ualberta.ca>
Bart Lateur wrote:
>
> Andrew Johnson <ajohnson@gpu.srv.ualberta.ca> wrote:
>
> >> Russell> $a = 1 if $a eq '';
> >
> >that would give an 'uninitialized' warning under -w
> >if $a was not defined.
>
> That's only a warning, not an error.
as I said, a warning...
> If it annoys you (it clutters your output, hiding really interesting
> warnings), you can temporarily disable warnings by clearing $^W:
[snip]
yes one can locally disable warnings...but I'm not sure I'd
consider that, in combination with the above quoted example, to
be an example of a "simpler syntax" than the poster's orignal
statement (but maybe that's just me).
regards
andrew
------------------------------
Date: Mon, 15 Sep 1997 20:35:25 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: "Chris M. Pineda" <chris.pineda@predictive.com>
Subject: Re: Need Pgp signature/checksum for Perl distribution
Message-Id: <Pine.GSO.3.96.970915202820.3740F-100000@julie.teleport.com>
On Mon, 15 Sep 1997, Chris M. Pineda wrote:
> Is there a PGP signature/file checksum available for the current
> releases of Perl?
Well, you could see what's in this file...
http://www.perl.com/CPAN/authors/Tim_Bunce/CHECKSUMS
...but there's no guarantee that it hasn't been tampered with as well.
There's something in the works for authentication from the CPAN source,
but it's not yet implemented. (Volunteers would probably be helpful, hint,
hint. :-) FWIW, I see this section in that file:
'perl5.004_01.tar.gz' => {
shortname => 'perl5001.tgz',
size => 2507999,
md5 => 'bc29b3bd93b6511234455ba733913ea0',
'md5-ungz' => '3c82586a86cc84c72e893e8a9027f68a'
},
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Tue, 16 Sep 1997 00:36:27 -0700
From: "David W. Wong" <hmw-dave@pplus.best.com>
Subject: Parsing e-mail folder (newbie)
Message-Id: <341E36FA.A7AE5A41@pplus.best.com>
In the next few days I will need to create (or help create) a script
that will parse the e-mail folder file on a UNIX (actually, SGI IRIX)
system to get the most recent message and output that message to an
external text file. The file will be inserted (via server-side include)
into an HTML file.
To better illustrate the situation, here it is: the crew of a yacht on
an ocean voyage will be e-mailing their status, messages, etc. to an
e-mail account on our central server. The most recent message will be
posted to the HTML page, where visitors of the site can read the
message.
I'm not looking for a complete solution, but if anyone has/can explain
how to create a script that will parse the mail folder file and extract
the most recent message, it would be tremendous help.
Thanks in advance,
Dave
dave@hmw.com
------------------------------
Date: Mon, 15 Sep 1997 21:15:39 -0600
From: Jeff Shapiro <jshapiro@idea-net.com>
Subject: Re: perl and Apache and Header controls
Message-Id: <341DF9DB.10BFF508@idea-net.com>
Lloyd Vancil wrote:
>
> Anyone out there know what has to be done to an Apache server (1.2.4) to
> allow one perl script of Many to transmit the headers?
>
> I want to do an auto redirect without using the meta tag.
> There are several pl scripts out there to do that but I don't
> seem to be able to find the configure change in APACHE to make this
> work.
You shouldn't need to do anything to apache. You'll notice that most
scripts have the line
print "content-type: text/html";
This is header information.. it is the last header information before
the browsers starts interpreting what comes next as HTML.. if the
content-type (or mime-type) is different, your browser will deal with
it in the specified way (for graphics, zip files, plug-ins, etc.)
For redirects you need to print "Location: http://www.yourserver.com"
and something else which I forget.
Because I forget alot, I use this:
#!/usr/local/bin/perl
use CGI (:standard);
print redirect("http://www.yourserver.com/");
When you requestion something, the server normally prints out header
information like this..:
HTTP/1.0 200 OK
Server: Netscape-Enterprise/2.01
Date: Tue, 16 Sep 1997 01:53:07 GMT
Last-modified: Sun, 22 Jun 1997 14:28:51 GMT
Content-length: 267
And then the script prints out the rest that tells the browser to go
out and load a new page.
You can also bypass the normal server headers if you use a nph (no
parsed header) script. Check out CGI.pm.. It'll let you easily add
additional headers and it has more info about nph if you need to use
them.
Good Luck,
Jeff Shapiro
Colorado Idea Net, Inc.
jshapiro@idea-net.com
------------------------------
Date: Mon, 15 Sep 1997 21:34:03 -0600
From: "T. LaWall" <tlawallANTISPAM@concentric.net>
To: benndorf@fys.ruu.nl
Subject: Re: Perl Executables?
Message-Id: <341DFE2B.4559@concentric.net>
Try this site out:
http://www.demobuilder.com/perl2exe.htm
You might also want to use the -small option to keep your exe
from bloating (especially if you already have perl on the server).
Good luck and Best Regards,
Todd
--
-------------------------------------------------
T. LaWall
To reply, remove ANTISPAM from my address
-------------------------------------------------
Where do I want to go today?
With Linux, Anywhere I want, TOLL FREE!
-------------------------------------------------
------------------------------
Date: Tue, 16 Sep 1997 11:24:56 +0000
From: Dexter Plameras <dexterp@acay.com.au>
Subject: Perl Sockets
Message-Id: <341E6C88.61F7A836@acay.com.au>
HI
I'm trying to write a network socket that will all for two way
communication between programs. I have used the example in the O'Relliy
Camel book
to write one way communication sockets but I don't know how to write two
way communications sockets.
Please note I want to learn to write it from scratch so any reference
material on the inernet or books that can be recommended
would be appreciatted as well as perl codes.
Dexter Plameras
------------------------------
Date: 16 Sep 1997 04:46:32 GMT
From: "Jerry Xia" <jxia@worldnet.att.net>
Subject: Q:here document
Message-Id: <5vl2v8$8bk@bgtnsc03.worldnet.att.net>
Hi,
I am trying to run Oracle SQL command in perl script. In shell, I can use
something like:
sqlplus user/passwd <<!
select * from my_table;
...
!
How can I do this in perl ?
Thanks!
Jerry
------------------------------
Date: Mon, 15 Sep 1997 17:29:54 -0700
From: Joe Petrow <joepet@server.berkeley.edu>
Subject: Randal Schwartz: Menace to society?
Message-Id: <Pine.ULT.3.96.970915172356.27660A-100000@server>
I see that Randal's story has made the big time, as I found an
interesting article on his situation on http://www.news.com (written by
another Schwartz, no less!)
Just goes to show that the old adage "it's easier to seek forgiveness than
permission" is a load of hogwash...
Joe Petrow
joepet@server.berkeley.edu
http://server.berkeley.edu/~joepet
------------------------------
Date: Tue, 16 Sep 1997 09:03:53 +0200
From: Lars Thegler <lth@dannet.dk>
Subject: Re: Randal Schwartz: Menace to society?
Message-Id: <341E2F59.C56271AB@dannet.dk>
Is there an URL for that article? I can't seem to find it using the search
mechanism at www.news.com...
Joe Petrow wrote:
>
> I see that Randal's story has made the big time, as I found an
> interesting article on his situation on http://www.news.com (written by
> another Schwartz, no less!)
>
> Just goes to show that the old adage "it's easier to seek forgiveness than
> permission" is a load of hogwash...
>
> Joe Petrow
> joepet@server.berkeley.edu
> http://server.berkeley.edu/~joepet
--
Lars Thegler mailto:lth@dannet.dk
Internet Development http://www.dannet.dk
Dan Net A/S phone: +45 45 82 16 00
Blokken 9 - DK-3460 Birkeroed - Denmark fax: +45 45 82 16 44
------------------------------
Date: 15 Sep 1997 20:46:40 GMT
From: sb@sdm.de (Steffen Beyer)
Subject: RFC: method naming in module "Bit::Vector"
Message-Id: <5vk6rg$fpt$1@en1.engelschall.com>
Dear Perl users,
some time ago, a Perl VIP has raised the question of method naming
in my module "Bit::Vector".
He said that he would use this module if only its method names were
following a "better" naming convention.
He wanted to send me a list of method names to show me what "better"
actually means, but till today unfortunately has failed to do so.
He suggested that I should change the method names accordingly,
supplying aliases for backward compatibility.
My questions to all of you are the following:
What do you think about the method names in the "Bit::Vector" module?
Do you think they are okay the way they are, or would you like to have
a different naming convention? (For a list of method names and return
types, see further below!)
Do you think I shouldn't change method names at all, or do you think I
should indeed change them and provide aliases for backward compatibility,
or should I change them and provide no backward compatibility aliases at
all?
If you think I should change the method names, what naming convention
or what particular names do you propose? (You can return me the list
below with the names you would like to have filled in.)
My convention is as follows:
Method naming convention
========================
Method names completely in lower case indicate a boolean return value.
(Except for method "new()", of course.)
(Other return types have no special naming convention.)
Here's the list of all currently available methods with their return types:
Method Name: --> New Name: Return Type:
============ ========= ============
Version --> ? string
new --> ? reference
Resize --> ? void
Size --> ? scalar
Empty --> ? void
Fill --> ? void
Flip --> ? void
Interval_Empty --> ? void
Interval_Fill --> ? void
Interval_Flip --> ? void
Interval_Scan_inc --> ? list
Interval_Scan_dec --> ? list
Bit_Off --> ? void
Bit_On --> ? void
bit_flip --> ? boolean
bit_test --> ? boolean
equal --> ? boolean
lexorder --> ? boolean
Compare --> ? scalar
Copy --> ? void
rotate_left --> ? boolean
rotate_right --> ? boolean
shift_left --> ? boolean
shift_right --> ? boolean
Move_Left --> ? void
Move_Right --> ? void
increment --> ? boolean
decrement --> ? boolean
Add --> ? void
Subtract --> ? void
Negate --> ? void
Absolute --> ? void
Sign --> ? scalar
Multiply --> ? void
Divide --> ? void
to_String --> ? string
from_string --> ? boolean
Union --> ? void
Intersection --> ? void
Difference --> ? void
ExclusiveOr --> ? void
Complement --> ? void
subset --> ? boolean
Norm --> ? scalar
Min --> ? scalar
Max --> ? scalar
Word_Bits --> ? scalar
Word_Size --> ? scalar
Word_Assign --> ? void
Word_Value --> ? scalar
Word_Insert --> ? void
Word_Delete --> ? void
Word_List_Assign --> ? void
Word_List_Value --> ? list
Multiplication --> ? void
Closure --> ? void
Shadow --> ? reference
Clone --> ? reference
new_from_String --> ? reference
to_ASCII --> ? string
from_ASCII --> ? void
GCD --> ? reference
BTW, the module is available from any CPAN ftp server or from my web site at
http://www.engelschall.com/u/sb/download/.
You can also find a description of the module ("what does it do") there:
http://www.engelschall.com/u/sb/download/Bit-Vector/.
Please mail me your responses to <sb@sdm.de>, I will post a summary here!
Thanks a lot in advance for any feedback!
Yours sincerely,
--
Steffen Beyer <sb@sdm.de> http://www.engelschall.com/u/sb/
"There is enough for the need of everyone in this world,
but not for the greed of everyone." - Mahatma Gandhi
>> Unsolicited commercial email goes directly to /dev/null <<
------------------------------
Date: 16 Sep 1997 03:39:58 GMT
From: kiet@uclink2.berkeley.edu (kiet)
Subject: SQL program that works both in Win'95 and Linux
Message-Id: <5vkv2e$vi@agate.berkeley.edu>
Hi people of the world:
Anyone know of a SQL program that works both in Win'95 and Linux. The
only thing that I found are exclusive for Win'95 or Linux. Such programs
for Win'95 are Access, MS-SQL, Fox Pro. For Linux they are mSQL, Oracle.
I just want a mini-SQL that works in both environment.
thanks!
------------------------------
Date: Mon, 15 Sep 1997 17:30:54 -0700
From: news@russo.org (Chris Russo)
Subject: Re: Submit Using Image
Message-Id: <news-1509971730540001@buzz.alink.net>
In article <874329132.641@dejanews.com>, Charles Wyatt <cwyatt@cris.com> wrote:
>This must have been asked dozens of times, but a Deja News search
>didn't yield any helpful results for me.
>
>Is there a common routine that allows one to convert the coordinates
>on a given image on a GET/POST form to equal the function "submit" button?
This is a PERL newsgroup.
You might have more luck by posting to
comp.infosystems.www.authoring.html, or one of the more web-based groups.
Regards,
Chris Russo
----------------------------------------------------------------------
Chris Russo A-Link Network Services, Inc.
news@russo.org Bolo me
http://www.alink.net/~crusso
------------------------------
Date: Mon, 15 Sep 1997 20:39:33 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: "D. Lamar Hawkins" <hawkinsd@email.uah.edu>
Subject: Re: Why a three-digit exponential for double precision numbers?
Message-Id: <Pine.GSO.3.96.970915203725.3740H-100000@julie.teleport.com>
On Mon, 15 Sep 1997, D. Lamar Hawkins wrote:
> I'm running an ActiveWare WIN32 port of perl based on perl 5.003_07
> under Windows NT Workstation 4 on a PC. When I write out double-
> precision numbers using printf "%e", the exponential has three digits.
> If the same script is run under SGI IRIX, the exponential has only two
> digits. What's going on? How can I get my script to output a two-digit
> exponential while running on my PC?
Prior to 5.004, Perl used the system's (s)printf, which may be somewhat
different from system to system. For security reasons, Perl now has its
own code for formatting output, so (in most cases) the output should be
the same even on different machines once you use 5.004 on both. Hope this
helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Tue, 16 Sep 1997 08:57:38 +0200
From: Lars Thegler <lth@dannet.dk>
Subject: Re: Why can't I talk directly to the mail daemon?
Message-Id: <341E2DE2.AFFD3D@dannet.dk>
You can't pipe input to telnet via STDIN like that. telnet is an
interactive application, and so assumes a bi-directional terminal.
In 'perldoc perlipc', there's a section titeled 'Bidirectional
Communication with Another Process' which should show you what to do. But
beware: this is not for the faint-of-heart!
A *much* easier solution for you is to use the Net::SMTP module:
#!/usr/local/bin/perl -w
use Net::SMTP;
$smtp = Net::SMTP->new('mailhost');
$smtp->mail($ENV{USER});
$smtp->to('postmaster');
$smtp->data();
$smtp->datasend("To: postmaster\n");
$smtp->datasend("\n");
$smtp->datasend("A simple test message\n");
$smtp->dataend();
$smtp->quit;
Brian Kendig wrote:
>
> I'm trying to write a simple test Perl script which, when run, will send
> me email. (I don't want to use sendmail for this.) The script below
> runs and gives no errors, but doesn't send any email to me, and I can't
> figure out why:
>
> #!/usr/bin/perl
>
> open(MAIL, "|telnet localhost 25") || die "Couldn't telnet: $!\n:;
> $| = 1;
>
> print MAIL "MAIL FROM: foo\@bar\n";
> print MAIL "RCPT TO: bskendig\@netcom.com\n";
> print MAIL "DATA\n";
> print MAIL "From: foo\@bar\n";
> print MAIL "To: bskendig\@netcom.com\n";
> print MAIL "Subject: My Test Email\n\n";
>
> print MAIL "Test Line 1\n";
> print MAIL "Test Line 2\n\n";
> print MAIL ".\n";
> print MAIL "QUIT\n";
> close (MAIL);
>
> But if I telnet to port 25 of localhost by hand, and enter this:
>
> MAIL FROM: foo@bar
> RCPT TO: bskendig@netcom.com
> DATA
> From: foo@bar
> To: bskendig@netcom.com
> Subject: My Test Email
>
> Test Line 1
> Test Line 2
> .
> QUIT
>
> the mail comes through fine. Why isn't the Perl script working? What's
> the difference between what the Perl script did and what I did by hand?
>
> --
> _/_/_/ Be insatiably curious. Je ne suis fait comme aucun
> /_/_/ Ask "why" a lot. de ceux que j'ai vus; j'ose croire
> _/_/ n'etre fait comme aucun de ceux qui existent.
> / Brian Kendig Si je ne vaux pas mieux, au moins je suis autre.
> / bskendig@netcom.com -- Rousseau
> http://people.netscape.com/brian/
--
Lars Thegler mailto:lth@dannet.dk
Internet Development http://www.dannet.dk
Dan Net A/S phone: +45 45 82 16 00
Blokken 9 - DK-3460 Birkeroed - Denmark fax: +45 45 82 16 44
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 1030
**************************************