[9615] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3209 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 20 22:07:29 1998

Date: Mon, 20 Jul 98 19:00:26 -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           Mon, 20 Jul 1998     Volume: 8 Number: 3209

Today's topics:
    Re: A simple question about sub routines <mpersico@erols.com>
    Re: Alphabetical order [CGI-Unix] <mpersico@erols.com>
    Re: Array element translation (Abigail)
        Bug in regex quantifiers? (Bryan Miller)
    Re: Bug in regex quantifiers? <matt@whiterabbit.co.uk>
    Re: Bug in regex quantifiers? (Larry Rosler)
    Re: Bug in regex quantifiers? (Larry Rosler)
    Re: Bug in regex quantifiers? <matt@whiterabbit.co.uk>
    Re: Bug in regex quantifiers? <matt@whiterabbit.co.uk>
        Cant figure pattern matching exp =~ <dmwaff@erols.com>
    Re: Cant figure pattern matching exp =~ <matt@whiterabbit.co.uk>
    Re: comp.lang.perl.moderate (Ronald J Kimball)
    Re: compare arrays (Abigail)
    Re: compare arrays (Larry Rosler)
    Re: converting html to latex using Perl. <Savage.Ron.RS@bhp.com.au>
    Re: converting html to latex using Perl. <mpersico@erols.com>
    Re: dumb questions Re: Problem with DBD::Oracle <mpersico@erols.com>
        Dynamically linking C++ (Netlogic Inc.)
    Re: efficiency: print<<"xxx" vs. print (Snowhare)
    Re: Flat-File Database (Tad McClellan)
    Re: Geography.pm (clay irving)
    Re: get a key strike in perl... (Martien Verbruggen)
    Re: Help!!: using foreach in 2 Dimension Hash... <root@ns.asic.net>
    Re: join and warnings on undef values (Ronald J Kimball)
        More on Perl Conference 2.0 lisam@oreilly.com
        NEED HELP find a CGI/PERL class??? <lly4m@Virginia.EDU>
    Re: newbie (Tad McClellan)
    Re: novice Q; reading columns of numbers (Ronald J Kimball)
        Perl 5.003x and WinNT <Ashley@Pistachio-Software.com>
    Re: Perl Beautifier Home Page <zenin@bawdycaste.org>
        slick ideas that don't work tdeering@my-dejanews.com
    Re: slick ideas that don't work (Kelly Hirano)
    Re: slick ideas that don't work (Craig Berry)
    Re: slick ideas that don't work (Ronald J Kimball)
    Re: Tcl is better than Perl <rpsavage@ozemail.com.au>
    Re: Tcl is better than Perl (Martien Verbruggen)
    Re: Tcl is better than Perl (Ronald J Kimball)
    Re: Turning 13 lines of text into one (Ronald J Kimball)
    Re: Wierd behaviour of .. operator (Ronald J Kimball)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 20 Jul 1998 21:31:31 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
To: webmaster@acidhouse.com
Subject: Re: A simple question about sub routines
Message-Id: <35B3EF73.200B0A05@erols.com>

The code gets sucked in and checked for syntax. Then it gets run.
Otherwise everyting would be a run-time error.

ADVANCED: There is also a BEGIN statement, much like the BEGIN in awk
whose code is checked and then executed right there and then before the
rest of the code is checked. There are various uses for this. Suggest
Advanced Perl Programming ISBN 1-56592-220-4.


------------------------------

Date: Mon, 20 Jul 1998 21:36:19 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
To: miedo <431854@cienz.unizar.es>
Subject: Re: Alphabetical order [CGI-Unix]
Message-Id: <35B3F093.1472C424@erols.com>

series of strings inplies a list. Step one is to make a list (array) out
of them.

2) Step two is to read the perl documentation, in particular the Perl
functions page. The function sort() is what you are seeking.

In the future, you need to do a little more searching locally before
posting.


------------------------------

Date: 21 Jul 1998 00:21:58 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Array element translation
Message-Id: <6p0mv6$kk1$1@client3.news.psi.net>

Randal Schwartz (merlyn@stonehenge.com) wrote on MDCCLXXXIV September
MCMXCIII in <URL: news:8cogukw4s5.fsf@gadget.cscaper.com>:
++ >>>>> "Abigail" == Abigail  <abigail@fnx.com> writes:
++ 
++ Abigail> map {tr/0123/3210/} @seq = @comp;
++ 
++ Ewww.  Void use of map.  Five yard penalty.

Why? Aren't you the same person that said that lists don't exist
in scalar context? :)




Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


------------------------------

Date: 21 Jul 1998 00:12:38 GMT
From: millerb@millerb.fc.hp.com (Bryan Miller)
Subject: Bug in regex quantifiers?
Message-Id: <6p0mdm$9ph@fcnews.fc.hp.com>

Has anyone else seen this or am I simply using this
regex incorrectly?  BTW, this is Perl 5.004_04.

----------
#!/usr/bin/perl -w

use strict;

my $patch_num = "123456789";

if ($patch_num !~ /[0-9]{3,4}/) {
    print "Patch number too small/big.\n",
}
----------

If I use a small sized scalar for $patch_num such as "12" the
regex fails to match but if I use a value such as "123456789"
it continues to match despite the maximum quantifier of 4.

cheers,
Bryan Miller
---
HP-UX Development Labs
Fort Collins, CO, USA
millerb@patchsvr.fc.hp.com


------------------------------

Date: Tue, 21 Jul 1998 01:32:52 +0100
From: Matt Pryor <matt@whiterabbit.co.uk>
To: millerb@patchsvr.fc.hp.com
Subject: Re: Bug in regex quantifiers?
Message-Id: <35B3E1B4.34C21297@whiterabbit.co.uk>

That's because it can match 3 or four digits between 0 and 9 within the
text.

You need to look into using ^ and $ to anchor the patterns.

Matt



Bryan Miller wrote:
> 
> Has anyone else seen this or am I simply using this
> regex incorrectly?  BTW, this is Perl 5.004_04.
> 
> ----------
> #!/usr/bin/perl -w
> 
> use strict;
> 
> my $patch_num = "123456789";
> 
> if ($patch_num !~ /[0-9]{3,4}/) {
>     print "Patch number too small/big.\n",
> }
> ----------
> 
> If I use a small sized scalar for $patch_num such as "12" the
> regex fails to match but if I use a value such as "123456789"
> it continues to match despite the maximum quantifier of 4.
> 
> cheers,
> Bryan Miller
> ---
> HP-UX Development Labs
> Fort Collins, CO, USA
> millerb@patchsvr.fc.hp.com

-- 
Matt Pryor

http://www.whiterabbit.co.uk/cgi/cartoons.txt


------------------------------

Date: Mon, 20 Jul 1998 17:44:05 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Bug in regex quantifiers?
Message-Id: <MPG.101d842ea3e1ec6b98972f@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a courtesy copy sent to Bryan Miller 
<millerb@millerb.fc.hp.com>.]

In article <6p0mdm$9ph@fcnews.fc.hp.com> on 21 Jul 1998 00:12:38 GMT, 
Bryan Miller <millerb@millerb.fc.hp.com> says...
 ... 
> if ($patch_num !~ /[0-9]{3,4}/) {
>     print "Patch number too small/big.\n",
> }
> ----------
> 
> If I use a small sized scalar for $patch_num such as "12" the
> regex fails to match but if I use a value such as "123456789"
> it continues to match despite the maximum quantifier of 4.

Ugh.  An HP guy who hasn't grokked perlre yet.

The '1234' part of '123456789' matches your regex, doesn't it?  If you 
want this not to match, you have to tell it that the next thing (if 
any) is not a digit:

if ($patch_num !~ /^\d{3,4}(?!\d)/) {

I've also added a front anchor, just in case, and replaced your digit 
ranges by the more shapely '\d'.

Invest in 'Programming Perl', read the docs, and help improve our profit-
sharing!

-- 
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Mon, 20 Jul 1998 18:00:50 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Bug in regex quantifiers?
Message-Id: <MPG.101d8821da48706989731@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a courtesy copy sent to Bryan Miller 
<millerb@millerb.fc.hp.com>.]

In article <MPG.101d842ea3e1ec6b98972f@nntp.hpl.hp.com> on Mon, 20 Jul 
1998 17:44:05 -0700, Larry Rosler <lr@hpl.hp.com> says...
 ...
> The '1234' part of '123456789' matches your regex, doesn't it?  If you 
> want this not to match, you have to tell it that the next thing (if 
> any) is not a digit:
> 
> if ($patch_num !~ /^\d{3,4}(?!\d)/) {

As Matt Pryor says, if you want to ensure nothing but 3 or 4 digits in 
the datum, you should replace the trailing '?!\d)' simply by '$':

  if ($patch_num !~ /^\d{3,4}$/) {

Clean and simple.  Of course, if you *know* that $patch_num is a number,
why not just use an arithmetic test:

  if (100 <= $patch_num && $patch_num <= 9999) {

is cleaner, simpler, faster, more legible, and more flexible.  Not every 
problem is best solved by a regex.

-- 
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Tue, 21 Jul 1998 02:14:45 +0100
From: Matt Pryor <matt@whiterabbit.co.uk>
Subject: Re: Bug in regex quantifiers?
Message-Id: <35B3EB85.5EBEF8EF@whiterabbit.co.uk>

Private email received from Bryan and passed on to the group:

Bryan Miller wrote:
> 
> On : Tue, 21 Jul 1998 01:32:52 BST you appear to have written"
> 
> > That's because it can match 3 or four digits between 0 and 9 within the
> > text.
> >
> > You need to look into using ^ and $ to anchor the patterns.
> 
> Which appears to work (i.e. if ($patch_num !~ /^[0-9]{3,4}$/) )
> 
> but what if my string looks like
> 
> $patch_num = "PHKL_12345"
> 
> then the anchors won't work.  What is the best way to tie (er,
> bad methaphor) {3,4} to [0-9]?  I've never had this problem with
> the usual quantifiers such as + and *...
> 
> Bryan

-- 
Matt Pryor

http://www.whiterabbit.co.uk/cgi/cartoons.txt


------------------------------

Date: Tue, 21 Jul 1998 02:26:47 +0100
From: Matt Pryor <matt@whiterabbit.co.uk>
Subject: Re: Bug in regex quantifiers?
Message-Id: <35B3EE57.70459BA2@whiterabbit.co.uk>

And my reply (to give Randal the opportunity of slapping my wrists)

Bryan Miller wrote:

> but what if my string looks like
> 
> $patch_num = "PHKL_12345"


Then you'd use something like /^[a-zA-Z]{4}_[\d]{5}$/

or if a possible number was contained within a larger string:

$patchnum = "My number is MATT_00491.  Is that correct?";
print "You entered:\n$patchnum\n\n";
$useful_bit = $patchnum;      # in case we want to keep the orig.
if ($useful_bit =~ s/.*?([a-zA-Z]{4}_[\d]{5}).*/$1/) {
        print "Your number is $useful_bit.\n";
} else {
        print "Your number isn't recognised.\n";
}

I hope this helps.

Matt
--


-- 
Matt Pryor

http://www.whiterabbit.co.uk/cgi/cartoons.txt


------------------------------

Date: Mon, 20 Jul 1998 21:42:14 -0400
From: "David Waffen" <dmwaff@erols.com>
Subject: Cant figure pattern matching exp =~
Message-Id: <6p0rh1$ao1$1@winter.news.erols.com>


I am reading hand me down code and can't quite figure out this expression's
function.

format  of file:
realname: John Smith
uid: 10568
gid: 401
home: /Users/jsmith

CODE:
while (<IN>) {
if (/^realname:  /) { $realname=(split("realname:  ",$_))[1]; }
$_ =~ s? ??g;
if (/^uid:/) { $uid=(split(":",$_)) [1]; }
elsif (/^gid:/) { $gid=(split(":",$_)) [1]; }
elsif (/^home:/) {$homedir=(split(":",$_)) [1]; }
}

I understand the begin with realname, uid, gid, home and split is storing
values in variables,
BUT what is happening with the $_ =~ s? ??g;

=~ match pattern
s? zero or more occurrences of s
?? zero or more of any character???
g match all possible patterns, since not /g during s/ (substitution)

What am I missing.  It appears not to be matching a pattern but assigning a
pattern to $_

Thanks
waffen
dmwaff@erols.com




------------------------------

Date: Tue, 21 Jul 1998 02:46:13 +0100
From: Matt Pryor <matt@whiterabbit.co.uk>
To: David Waffen <dmwaff@erols.com>
Subject: Re: Cant figure pattern matching exp =~
Message-Id: <35B3F2E5.7D3C524C@whiterabbit.co.uk>

It's removing all of the spaces from $_ (s represents substitution).
Exactly the same as s/ //g but with a different delimiter.

HTH

Matt


-- 
Matt Pryor

http://www.whiterabbit.co.uk/cgi/cartoons.txt


------------------------------

Date: Mon, 20 Jul 1998 20:50:45 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: comp.lang.perl.moderate
Message-Id: <1dchcq6.1y4nyqj1pkkhxcN@bay1-85.quincy.ziplink.net>

Zheng Yuan <zyuan@hercules.acsu.buffalo.edu> wrote:

> Subject: comp.lang.perl.moderate

As opposed to

comp.lang.perl.conservative
   I'm stuck using perl4.  How do I...?

comp.lang.perl.liberal
   -w and use strict?  Never!

comp.lang.perl.socialist
   perlbug: my() keyword should be changed to our()

comp.lang.perl.religious-right
   sin() and die "You heathen!\n";

comp.lang.perl.anarchy
   comp.lang.perl.misc


-- 
 _ / '  _      /         - 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: 21 Jul 1998 00:27:59 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: compare arrays
Message-Id: <6p0naf$kk1$2@client3.news.psi.net>

Larry Rosler (lr@hpl.hp.com) wrote on MDCCLXXXIV September MCMXCIII in
<URL: news:MPG.101d6136874df5e798972e@nntp.hpl.hp.com>:
++ [Posted to comp.lang.perl.misc and a courtesy copy sent to John Porter 
++ <jdporter@min.net>.]
++ 
++ In article <35B3B8E8.41F1@min.net> on Mon, 20 Jul 1998 21:32:22 GMT, John 
++ Porter <jdporter@min.net> says...
++ ...
++ > >         "@x" eq "@y"
++ > 
++ > No, that is even worse.  It still has to loop, in order to get every
++ > element of the array and stringize it.  But it's worse, because it
++ > always loops over the entire array, rather than jumping out at the
++ > earliest possible opportunity.  (Plus all the other reasons you
++ > mentioned for eschewing this technique.)
++ 
++ That is way overstated.  If the arrays match, the stringizing approach is 
++ about twice as fast as the loop.  If the first mismatch is halfway 
++ through, they are about the same.  So on average they are about the same.
++ 
++ I posted the benchmarks on July 14.


We have been through this before. (See dejanews)

   @x = ("a b", "c");
   @y = ("a", "b c");

   print "Wrong answer!\n" if "@x" eq "@y";


An algorithm that is twice as fast as another, but which is wrong, is
pointless.



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'


------------------------------

Date: Mon, 20 Jul 1998 17:49:47 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: compare arrays
Message-Id: <MPG.101d8589949af26b989730@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a courtesy copy sent to Abigail 
<abigail@fnx.com>.]

In article <6p0naf$kk1$2@client3.news.psi.net> on 21 Jul 1998 00:27:59 
GMT, Abigail <abigail@fnx.com> says...
> Larry Rosler (lr@hpl.hp.com) wrote on MDCCLXXXIV September MCMXCIII in
> <URL: news:MPG.101d6136874df5e798972e@nntp.hpl.hp.com>:
 ...
> ++ That is way overstated.  If the arrays match, the stringizing approach is 
> ++ about twice as fast as the loop.  If the first mismatch is halfway 
> ++ through, they are about the same.  So on average they are about the same.
> ++ 
> ++ I posted the benchmarks on July 14.
> 
> 
> We have been through this before. (See dejanews)
> 
>    @x = ("a b", "c");
>    @y = ("a", "b c");
> 
>    print "Wrong answer!\n" if "@x" eq "@y";
> 
> 
> An algorithm that is twice as fast as another, but which is wrong, is
> pointless.

We have been through this before. (See dejanews)

The solution emphasized that there had to exist some character guaranteed 
not to be in any of the data (it suggested "\0"), and it set $" to that 
value.

Twice as fast and correct is fine with me.

-- 
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: 21 Jul 1998 00:11:48 GMT
From: "Ron Savage" <Savage.Ron.RS@bhp.com.au>
Subject: Re: converting html to latex using Perl.
Message-Id: <01bdb43c$7491edc0$b6ea1286@steelres-pcm657.resmel.bhp.com.au>

Jorge,
Yes.
1.1. Where can I get this document?

The latest version of this FAQ is available from
http://www.mincom.com/mtr/sdf/faq/.

1.2. What is SDF?

SDF (Simple Document Format) is a freely available documentation system
designed and developed by Ian Clatworthy, with help from many others. Based
on a simple, readable markup language, SDF generates high quality output in
multiple formats, all derived from a single document source. Supported
output formats include HTML, PostScript, PDF, man pages, SGML, POD, LaTeX,
GNU Info, MIF, RTF, Windows help and plain text. If you want to:

-- 
Ron Savage
Home (preferred): rpsavage@ozemail.com.au
Office: Savage.Ron.RS@bhp.com.au
http://www.ozemail.com.au/~rpsavage


publish documents or reports on the Web or in multiple formats maintain a
large documentation suite using rule-based formatting and hypertext
generation embed documentation in source code or pretty print source code



then SDF may be for you.

Jorge Kinoshita <jkinoshi@pcs.usp.br> wrote in article
<35B2CC24.D637AFBD@pcs.usp.br>...
> Hello everybody,
>     I would like to know if exists a program that converts html to latex
> (and/or vice-versa), free of charge , and in Perl by preference.
>     Thanks for any help.
>             Jorge K.
> ps: if possible, cc -me the answer.
> 
> 
> 


------------------------------

Date: Mon, 20 Jul 1998 21:41:56 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
To: Jorge Kinoshita <jkinoshi@pcs.usp.br>
Subject: Re: converting html to latex using Perl.
Message-Id: <35B3F1E4.C7F66B1B@erols.com>

Step 1: http://www.perl.com/CPAN

Jorge Kinoshita wrote:
> 
> Hello everybody,
>     I would like to know if exists a program that converts html to latex
> (and/or vice-versa), free of charge , and in Perl by preference.
>     Thanks for any help.
>             Jorge K.
> ps: if possible, cc -me the answer.


------------------------------

Date: Mon, 20 Jul 1998 21:47:27 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
To: Richard J Kucera <kucerar@hhmi.org>
Subject: Re: dumb questions Re: Problem with DBD::Oracle
Message-Id: <35B3F32F.D426AC32@erols.com>

Partially because the DBDs all eventually access the VENDOR's API
LIBRARY, which is proprietary and cannot be linked into a binary
distribution and passed around like so many nachos at a superbowl party. 
And compiling using the shared versions of the vendors libraries is an
even worse option. There would have to be multiple version kept around
to account for additional entry ponuts as the verndor libraries were
updated.

Quite frankly, I've had zero truble building Perl modules. If you're
mucking around with gcc, try the native compiler. ANd may I suggest that
if you have to muck around with gcc, it probably wasn't built right.

Richard J Kucera wrote:
> 
> Why aren't there pre-built DBD's for major vendors and platforms?
> It seems like Perl would take off in popularity if there were just some pre-built
> packages...
> especially a pre-built Apache + mod_perl + Oracle DBD...
> 
> I would gladly switch to Apache & DBI from Java Web Server & Oracle type 4 JDBC
> but I simply don't have the time for such mucking around with running gcc anymore
> (I'd love to do it,  but I'd get in trouble).
> 
> Also,  if Perl networking is so great,   why don't they write network drivers like
> they've done with Java,  rather than continue to rely on native drivers?   It seems
> like
> it would make life simpler.
> 
> ... if I could just get a pre-built DBD
> I could start using it immediately for some quick CGI jobs where servlets are
> cumbersome,  rather than keep proliferating Java.
> 
> -R Kucera,  Web Apps Developer.
> 
> Eric Zylberstejn wrote:
> 
> > Ralf Orlowski wrote:
> > > As I could need some data from the Oracle-Database in this scripts I tried
> > > to install the DBI and the DBD-Oracle module to access the Database from
> > > within perl.
> > > But during the installation of the DBD module I had to recognize that this
> > > module needs some header files from oracle for the installation that are
> > > not included in my runtime Version of Oracle.
> >
> > Hi,
> >
> > I think you need Oracle's Pro*C module, because DBD::Oracle is partly written
> > in C. Once you get Pro*C on your computer everything will run correctly. I have
> > been using DBI and DBD::Oracle for quite some time now.
> >
> > Take a look at:
> > http://www.hermetica.com/technologia/perl/DBI/index.html
> >
> >         Eric
> >
> >   ------------------------------------------------------------------------
> >
> >   Eric Zylberstejn <Eric.Zylberstejn@wanadoo.com>
> >   FTI
> >
> >   Eric Zylberstejn
> >   FTI                      <Eric.Zylberstejn@wanadoo.com>
> >   41 r Camille Desmoulins  Work: 01 41 33 94 59
> >   Issy-les-Moulineaux      Netscape Conference Address
> >   92130                    Netscape Conference DLS Server
> >   France
> >   Additional Information:
> >   Last Name  Zylberstejn
> >   First Name Eric
> >   Version    2.1


------------------------------

Date: 21 Jul 1998 01:21:40 GMT
From: netlogic@aa.net (Netlogic Inc.)
Subject: Dynamically linking C++
Message-Id: <6p0qf4$oi5$1@slave1.aa.net>


Hello,
 
I am currently attempting to dynamcially link C++ libraries to perl. I have
read the xs man page and the xs tutorial. I have also successfully
linked basic C code to perl but am having problems with C++.
 
The steps I've followed are basicly used in example 4 in the xs turorial:
Roughly they are:
 
   1) Created a very simple C++ class Test1 with one method doit.
   void Doit(char* msg);
 
   2) Created a Makefile.PL for the new code
 
   (These files are in a separate directory then the xsub stuff)
 
   3) Ran h2xs on my header file test1.h
 
   4) Modified the Makefile.PL file for the main directory by:
      Adding an extention lib path to the new code in the pm 
      Adding a new replacement subroutine

   5) Added the function definition of doit to the .xs file
   doit(obj,msg)
      Test1 * obj
     const char * msg
      OUTPUT:
 
 
   6) Modified the typemap file to include

      const char * T_PV
      Test1 * O_OBJECT
 
      OUTPUT
      O_OBJECT
      sv_setrev_pv($arg,CLASS,(void*)$var);
 
      INPUT
         O_OBJECT
         if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) )
            $var = ($type)SvIV((SV*)SvRV( $arg ));
         else{
            warn(\"$var is not a blessed SV reference\" );
            XSRETURN_UNDEF;
         }
 
 
(I really don't get the why of the INPUT and OUTPUT sections of this but
simply followed the example in the C++ portion of the xs man page)
 
My most basic questions are:
   1) how do I call my constructors and destructors? Do I  need destroy and
   new functins in my xsub code?
 
   2) Where does the THIS variable come into play? Where does it get created
   and how do I use it.
 
   3) Are there any examples or documentation on dynamically linking C++
   code available - if so where is it?
 
Thank you,
Jacque
NetLeaf Technologies
jacque@netleaf.com
 



------------------------------

Date: 20 Jul 1998 07:46:05 -0600
From: snowhare@xmission.xmission.com (Snowhare)
Subject: Re: efficiency: print<<"xxx" vs. print
Message-Id: <6ovhmt$st4$1@xmission.xmission.com>



Nothing above this line is part of the signed message.

In article <6ovfhg$ffh$2@justus.ecc.lu>,
Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu> wrote:
>The worst program I ever encountered was in assembler. It 
>had a comment for each and every line of code:
>
>	inc	A	; increment A
>	jnz	foo	; goto foo if A non zero
>
>etc, etc.
>The program was in excess of 20,000 lines of code, IIRC, and each
>line had a similar comment. If there was one comment discussing
>what the program did, I must have overlooked it. 

The opposite is even worse. I had to update bootstrap ROM code many years
ago. The engineer who wrote the existing code wrote raw, almost
undocumented, octal machine - disdaining to use things like mnemomic
assembler 90% of the time. I spend most of a day just figuring out *what*
op codes he used. We are talking code like this: 

	033127             ; Process time
        123754
        234521
        323277
        723211
        123
        123132
        323333
        555443
        inc (45,A)
        233
        233434

And you couldn't even trust the rare comments (many sections of code
simply had _no_ comments) to be correct. 

No joke. No 'when I was a boy we....'. Just an immense pain in the ass. 

He was their _senior_ hardware designer.

Sigh.

Benjamin Franz


Version: 2.6.2

iQCVAwUBNbNJ/ujpikN3V52xAQGxzQQAhuBRypxwC55qlBq1ynCMo7EgYWQd2xJ1
NpD7gOz+Nxye/UAwpKKOpvBnBE1VWa4Zkr5UISvQwNdn+tsFIIBNOFB/hVCIQISK
FRWGuhcZ0mcxsPC3MJ8Sw1J+1G4JUxEHuhOa+5zcE5JTvLZQ84tfHfm3Ah1Tr7kW
5RrlNCepERk=
=VmKP
-----END PGP SIGNATURE-----


------------------------------

Date: Mon, 20 Jul 1998 17:43:01 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Flat-File Database
Message-Id: <l5h0p6.tl.ln@localhost>

Sam Spurling (spurling@mindspring.com) wrote:
: I am new to perl and am wanting to write a database that can be added to
: deleted from and modified.  Does anyone have an example that I can use to
: see and understand how this works in perl.


Sure. Here is an example. It is largely tongue-in-cheek because
you have given such a loose Requirements Specification.

I would suggest giving a little more detail in what database operations
you will need to perform. 

I submit that the below implements all of the operations that you 
mention while being simultaneously useless to you  ;-)

[ I expect the answer to the Perl FAQ below will help you along
  toward implementing a flatfile database.  Perl FAQ, part 5:

    "How do I change one line in a file/
     delete a line in a file/
     insert a line in the middle of a file/
     append to the beginning of a file?"
]


--------------------
#!/usr/bin/perl -w

@db = qw(one two three four five);
print "db: @db\n";

# add to database
push @db, 'six';
print "db: @db\n";

# delete from database
@db = grep $_ ne 'three', @db;
print "db: @db\n";

# modify database
@db = grep $_ !~ /four/ || s/four/4/, @db;
print "db: @db\n";



--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: 20 Jul 1998 21:34:10 -0400
From: clay@panix.com (clay irving)
Subject: Re: Geography.pm
Message-Id: <6p0r6i$hd@panix.com>

In <35B3B93F.1556@2lm.com> Paula Gibb <paula@2lm.com> writes:

>I am looking for a Perl module called Geography; does anyone know the
>whereabouts of this module?  BTW, I have already searched for the module
>via CPAN, but have come up empty-handed.

>Thanks for any information you can provide.

Could it be the Location.pm module?

  http://reference.perl.com/query.cgi?geographical

-- 
clay irving
clay@panix.com
http://www.panix.com/~clay/


------------------------------

Date: 20 Jul 1998 23:51:09 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: get a key strike in perl...
Message-Id: <6p0l5d$os3$1@nswpull.telstra.net>

In article <6oujqm$s2p$1@netnews.csie.nctu.edu.tw>,
	dennis@info4.csie.nctu.edu.tw (GEMINI) writes:
> hi there,
>   in my program I need to let user key in a password.
> I'd like to get every key he strikes and display a '*'
> instead of echoing the key directly. under unix,
> we can use system 'stty ....' to do that. however,
> my program will be used under win32 environment. 
> then what should I do?

Did you check the FAQ?

# perldoc perlfaq8
     How do I ask the user for a password?

It mentions Term::ReadKey. I believe the GS port of perl for win32 has
it included in the distribution. Don't know if there's a version for
the Activestate port.

Martien
-- 
Martien Verbruggen                      |
Webmaster www.tradingpost.com.au        | "In a world without fences,
Commercial Dynamics Pty. Ltd.           |  who needs Gates?"
NSW, Australia                          |


------------------------------

Date: 21 Jul 1998 00:37:41 GMT
From: root <root@ns.asic.net>
Subject: Re: Help!!: using foreach in 2 Dimension Hash...
Message-Id: <6p0nsl$iq6$1@news.att.co.kr>

yroh <yroh@samsung.co.kr> wrote:

Thanks folks!!!

I haven't read that man page...
I'm going to eat it up today.  Thanks again.



------------------------------

Date: Mon, 20 Jul 1998 20:50:52 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: join and warnings on undef values
Message-Id: <1dchenv.1f0r1d01k66yp2N@bay1-85.quincy.ziplink.net>

Uri Guttman <uri@sysarch.com> wrote:

>   RJK> Assuming that $foo is undefined, then join('', 'abc', $foo,
>   RJK> 'def') is pretty much equivalent to "abc${foo}def", and I would
>   RJK> expect both of them to give a 'Use of unitialized value' warning
>   RJK> - that's what the warning is for, after all.
> 
> but it is an array, not a set of scalar vars

That's pretty much what an array is.  (List instead of set, of course.)

> so it is different in my
> book. i would think that having undef's in an aray would be a more
> conscious choice than just forgetting to initialize a scalar.

If it were a concious choice, you could just as easily replace the
undefs with null strings.  And perhaps you have an undef in your array
because you forgot to initialize a scalar.

-- 
 _ / '  _      /         - 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: Mon, 20 Jul 1998 16:34:45 -0700
From: lisam@oreilly.com
Subject: More on Perl Conference 2.0
Message-Id: <35B3D415.70E5@oreilly.com>

August 17-20, 1998 - San Jose, CA

The Perl Conference 2.0 is just one month away!

If you haven't already registered, we hope you will very soon.
Tutorials are filling up fast.  Topics include CGI, Apache and Perl,
Regular Expressions, Windows NT, Security, and Advanced
Perl Fundamentals.  There's even an Introduction to Perl for
Programmers. Space is limited, so register now to
get your first choice.  

Besides tutorials, you will learn about the new and practical 
uses for Perl in 18 User Applications presentations. You'll be
able to ask your thorniest technical questions to experts in
one on ones.  And you will hear from the core Perl developers
including Larry Wall, Malcolm Beattie, Tom Christiansen, Tim
Bunce, Nick Ing-Simmons, Chris Nandor on topics as far-ranging
as Windows, MacPerl, 5.005, freeware, Apache and more.There's 
also a special presentation on XML and Perl by Tim Bray,
co-editor of XML and a keynote  by Tom Paquin of Netscape
on mozilla.org.

With over 50 speakers in five tracks, and all the key Perl
developers in one place at one time, this is *the* place
to learn more about Perl.

Register at http://conference.perl.com


------------------------------

Date: 21 Jul 1998 01:06:24 GMT
From: Luke Lu-Si Yao <lly4m@Virginia.EDU>
Subject: NEED HELP find a CGI/PERL class???
Message-Id: <6p0pig$6hs$2@murdoch.acc.Virginia.EDU>

hi all...
Can someone help me in finding a CGI/PERL class to register for
 .
I am willing to travel anywhere domestic...
pleas e give me a web site or a place where I can contact for
the class..
thanks



------------------------------

Date: Mon, 20 Jul 1998 17:58:49 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: newbie
Message-Id: <93i0p6.an.ln@localhost>

Jerry Chapman (jerrball@rust.net) wrote:

: This is my first newsgroup - anything!
: I am as new as it gets.

   We already knew that just from seeing the "subject" that you
   chose to put in your Subject header (it does not describe in
   any way the subject of your article...)

   The subject of your post is not about "newbie"s.

   The subject of your post is about CGI and server setup.



   You will get better results from Usenet if you know how folks
   are expected to conduct themselves on Usenet.

   You can get all kinds of free consulting help on Usenet if you
   follow the established guidelines that are posted periodically
   to the

         news.announce.newusers

   newsgroup.

   Investing 15 minutes there will pay you back big time with your
   very first question...

   (I expect your very first question (this one) will not be
    answered to your satisfaction because you didn't read any
    of the above mentioned articles before posting.

    If you had read them, you might have ended up posting to a
    newsgroup where folks that know about server setup hang out...
   )



: However, I am trying to learn perl - especially from the server side.  


   Perl does not have a server.

   I think you are talking about server setup here, which has nothing
   to do with perl.

   Server and CGI issues have their own newsgroups:

      comp.infosystems.www.advocacy
      comp.infosystems.www.announce
      comp.infosystems.www.authoring.cgi
      comp.infosystems.www.authoring.html
      comp.infosystems.www.authoring.images
      comp.infosystems.www.authoring.misc
      comp.infosystems.www.browsers.mac
      comp.infosystems.www.browsers.misc
      comp.infosystems.www.browsers.ms-windows
      comp.infosystems.www.browsers.x
      comp.infosystems.www.misc
      comp.infosystems.www.servers.mac
      comp.infosystems.www.servers.misc
      comp.infosystems.www.servers.ms-windows
      comp.infosystems.www.servers.unix
      comp.infosystems.www.providers
      comp.infosystems.www
      comp.infosystems.www.users


: What
: I need is a step by step process to get the server running.  

   You asked your question in the wrong place.

   Try one of the above.


: I have
: installed win32 - perl.  I think it works, but when I try to link with html
: the .pl files basically prints out without executing.  What am I doing wrong


   You are not setting up your server correctly.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: Mon, 20 Jul 1998 20:50:55 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: novice Q; reading columns of numbers
Message-Id: <1dcheva.7x6rou1tq9xsgN@bay1-85.quincy.ziplink.net>

John Porter <jdporter@min.net> wrote:

> Ronald J Kimball wrote:
> > 
> > If you use split, watch out for the lines with initial whitespace.
> 
> Except that if you split on the special string " " (or ' '), it
> strips off leading whitespace for you.  (i.e. DWIM.)

Oh yeah, I forgot about that.  Thanks!

-- 
 _ / '  _      /         - 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: Mon, 20 Jul 1998 16:36:31 -0700
From: "Ashley" <Ashley@Pistachio-Software.com>
Subject: Perl 5.003x and WinNT
Message-Id: <6p0k70$7p$1@supernews.com>

HiHiHi,

    I recently downloaded and installed Perl v. 5.003 on my WinNT server as
well as one of the Win98 clients. I retrieved the binary from
www.activestate.com . I installed the activestate version. I was wondering
if anyone has had any problems with this.

   This installation did not install the extutils or core directories. Does
anyone know if the activestate  or x86 versions are missing some of the
modules?

thanx

ashley@pistachio-software.com




------------------------------

Date: 21 Jul 1998 01:21:57 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Perl Beautifier Home Page
Message-Id: <900984706.77186@thrush.omix.com>

William R. Ward <hermit@cats.ucsc.edu> wrote:
	>snip<
: This is even shorter:
: $VERSION = ((q$Revision: 2.19 $ =~ /([\d.]+)/)[0]);

	As I've already made clear, this is a bad idea.  You've already
	broken the restriction on this style when you went past minor
	number .9.  With this stile, your 2.19 revision will appear
	*lower* then your 2.2, 2.3, 2.4, etc releases.  When you go
	to 2.20, it will look the same as 2.2.

	And it still doesn't handle release branches, but not all
	people need those.  The ordering issue however, is undeniable.

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


------------------------------

Date: Mon, 20 Jul 1998 22:50:31 GMT
From: tdeering@my-dejanews.com
Subject: slick ideas that don't work
Message-Id: <6p0hjn$vgs$1@nnrp1.dejanews.com>

When I want grep to ignore case (upper or lower case) I add the -i flag.  But
where do I put the flag in the following Perl line?


@results = grep(/$search/,@indata);


If Perl's grep can't do this, then is there an alternative?

Tom

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


------------------------------

Date: 20 Jul 1998 16:11:49 -0700
From: hirano@Xenon.Stanford.EDU (Kelly Hirano)
Subject: Re: slick ideas that don't work
Message-Id: <6p0irl$6ij@Xenon.Stanford.EDU>

In article <6p0hjn$vgs$1@nnrp1.dejanews.com>,
 <tdeering@my-dejanews.com> wrote:
>When I want grep to ignore case (upper or lower case) I add the -i flag.  But
>where do I put the flag in the following Perl line?
>
>@results = grep(/$search/,@indata);

@results = grep(/$search/i,@indata);
                         ^---------- works just like any other m// regexes
-- 
Kelly William Hirano	                    Stanford Athletics:
hirano@cs.stanford.edu	                 http://www.gostanford.com/
hirano@alumni.stanford.org      (WE) BEAT CAL (AGAIN)! 100th BIG GAME: 21-20


------------------------------

Date: 20 Jul 1998 23:12:19 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: slick ideas that don't work
Message-Id: <6p0isj$r1$1@marina.cinenet.net>

tdeering@my-dejanews.com wrote:
: When I want grep to ignore case (upper or lower case) I add the -i flag.  But
: where do I put the flag in the following Perl line?
: 
: @results = grep(/$search/,@indata);

You add the /i flag -- like /$search/i.  Be careful about metachars inside
$search, of course.  And you can also embed the case-insensitivity inside
$search using the (?i) syntax.  See perlre for the glorious details.

: If Perl's grep can't do this, then is there an alternative?

Like Perl's grep wouldn't be able to do this...

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


------------------------------

Date: Mon, 20 Jul 1998 20:51:00 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: slick ideas that don't work
Message-Id: <1dchfhg.fr6jl71kupim3N@bay1-85.quincy.ziplink.net>

<tdeering@my-dejanews.com> wrote:

> When I want grep to ignore case (upper or lower case) I add the -i flag.  But
> where do I put the flag in the following Perl line?
> 
> @results = grep(/$search/,@indata);

@results = grep(/$search/i,@indata);


This is covered in the extensive documentation included with every
distribution of perl.

-- 
 _ / '  _      /         - 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: 20 Jul 1998 23:34:50 GMT
From: "Ron Savage" <rpsavage@ozemail.com.au>
Subject: Re: Tcl is better than Perl
Message-Id: <01bdb437$6455fdc0$94eb1286@steelres-pcm657.resmel.bhp.com.au>

They are designed for different purposes, so it does not make sense to
choose one to the exclusion of the other. Of course, Tcl will take you 100
times as long to do anything...

Kin-Koi Lo <kinkoi@leland.Stanford.EDU> wrote in article
<6p0f8n$3ks$1@nntp.Stanford.EDU>...
> Hi,
> 
> I am going to write script programe so that the server can talk to my
client programe. People told me it is better to use Tcl instead of Perl. I
only know Perl and know nothing about Tcl. Would anyone tell me which is
better? 
> 
> Thanks,
> Kinkoi
> 


------------------------------

Date: 21 Jul 1998 00:04:24 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Tcl is better than Perl
Message-Id: <6p0lu8$os3$2@nswpull.telstra.net>

[Please configure your newsreader so that it wraps lines at a decent
length]

[Followups set]

In article <6p0f8n$3ks$1@nntp.stanford.edu>,
	kinkoi@leland.Stanford.EDU (Kin-Koi Lo) writes:

> I am going to write script programe so that the server can talk to

'the' server?

> my client programe. People told me it is better to use Tcl instead
> of Perl. I only know Perl and know nothing about Tcl. Would anyone
> tell me which is better? 

They're different. There is no way to say which one is better. Each
programming language has its strong and weak points. This discussion
comes up many many times. In the case of perl vs. tcl there is some
article about it somewhere on the web, but I believe it's severely out
of date. 

Without knowing exactly what you want to do, no one will be able to
make a decent guess about which programming language will be better
for the task at hand. There are may issues that are important: Ease of
code maintenance, legacy code re-use, learning curve, performance,
stability, portability, and many many others. It might very well be
that for your task you should actually be using c or fortran. Who
knows.

Martien

PS. Please be aware that on many language groups you would be shot for
asking this question. Nobody needs another language holy flame war.
There simply _is_ _no_ _best_ language.

-- 
Martien Verbruggen                      |
Webmaster www.tradingpost.com.au        | "In a world without fences,
Commercial Dynamics Pty. Ltd.           |  who needs Gates?"
NSW, Australia                          |


------------------------------

Date: Mon, 20 Jul 1998 20:51:05 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Tcl is better than Perl
Message-Id: <1dchfry.2akqeuycps00N@bay1-85.quincy.ziplink.net>

Kin-Koi Lo <kinkoi@leland.Stanford.EDU> wrote:

> I am going to write script programe so that the server can talk to my
> client programe. People told me it is better to use Tcl instead of Perl. I
> only know Perl and know nothing about Tcl. Would anyone tell me which is
> better?

If we really thought Tcl were better, why would all be reading
comp.lang.perl.misc?

That said, Perl is obviously better than Tcl.

P.S.  Your newsreader is not wrapping the text of your messages.

-- 
 _ / '  _      /         - 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: Mon, 20 Jul 1998 20:51:07 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Turning 13 lines of text into one
Message-Id: <1dchfvt.14yup6qc6o4gxN@bay1-85.quincy.ziplink.net>

Martin <minich@globalnet.co.uk> wrote:

> >            I'm just feeling my way around here, and have a little project
> >I'm trying to get a bead on.  I've got a text file that contains about
> >10,000 records in it, each record consisting of 13 lines of text, while
> each
> >line is exactly 80 characters long.  I need to take each "record", and turn
> >the 13 lines of text into one really long line.  What's the best way to do
> >so?  Thanks for any and all suggestions!
> 
> 
> I've just spent a few weeks programming a lot of Perl and this was one of
> the functions I used. I'm sure there's a much more elegant - shorter way of
> doing it involving the odd / here and there; but this is what I used.
> 
> # put the filename into $filename
> 
> open(INF,"$filename");
> @number = <INF>;
> close(INF);
> 
> $temp="@number";

You just introduced a whole bunch of spaces into the file contents.  Try
this instead:

open(INF, $filename) or die "Unable to open $filename: $!";
{local $/; $contents = <INF>}
close(INF);

> @temp2 = split(/\n/, $temp);

Okay...  Why do you go to the trouble of joining the lines if you're
just going to split them again?  Ick!  If you just wanted to remove the
newlines, you could use the chomp function.

open(INF, $filename) or die "Unable to open $filename: $!";
chomp(@lines = <INF>);
close(INF);

> foreach $temp3 (@temp2) {
>     $nolines = "$nolines$temp3";
> }
> open(INF,">$filename");
> print INF "$nolines";
> close(INF);

Okay...  First you read the lines into an array.  Then you join them.
Then you split them.  Then you join them again.  Why'd you stop so soon?
You could have kept this up for ages!

Or, in four lines:

open(INF, $filename) or die "Unable to open $filename: $!";
chomp(@lines = <INF>);
open(INF, ">$filename) or die "Unable to open $filename: $!";
print @lines, "\n";

> That's it! The script takes the file input, puts it all on one line, and
> rewrites the old file with the new file containing only one line.

Keep in mind that the original poster actually wanted to join each block
of 13 lines into a single line, not the entire file.  From the command
line:

~> perl -pi -e 'chomp if $. % 13'

-- 
 _ / '  _      /         - 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: Mon, 20 Jul 1998 20:51:11 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Wierd behaviour of .. operator
Message-Id: <1dchgfj.1454c881y5tx7qN@bay1-85.quincy.ziplink.net>

Richard Proctor <Richard@waveney.demon.co.uk> wrote:

> > > foreach('A1'..'A13') ...
> 
> Basicly I think what it did was not what exactly 'right', Perl should either
> do it 'right' or at least have given a warning that the endpoint was never
> reached.

And then you've solved the halting problem.  :-)

-- 
 _ / '  _      /         - 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: 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 3209
**************************************

home help back first fref pref prev next nref lref last post