[6592] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 217 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 2 01:07:25 1997

Date: Tue, 1 Apr 97 22:00:21 -0800
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, 1 Apr 1997     Volume: 8 Number: 217

Today's topics:
     Re: Can you figure this out?  Split, Array, Literal, wi (Mike Crawford)
     Can't print twice... <blan0416@uidaho.edu>
     Re: Compilation problem on sco box (Danny Aldham)
     Creating a mailto link with a predefined subject line. (Elam Birnbaum)
     Re: Creating a mailto link with a predefined subject li (brian d foy)
     Re: Creating a mailto link with a predefined subject li (Andrew Starr)
     Re: Does perl have constants? <good.luck@getting.spam.to.zenin.at.best.com>
     Hellish problems compiling Perl 5.003 on Digital Unix 4 <tpoppe@homer.bus.miami.edu>
     Re: HELP!!!!!my cgi-bin don't work <blan0416@uidaho.edu>
     Re: HELP!!!!!my cgi-bin don't work (Brian L. Matthews)
     IPC_NOWAIT Not working (John L. Daschbach)
     Multiplication9s (Steven Sajous)
     Re: overloading methods with xsubpp <jql@accessone.com>
     perl5-cgiscript <shoaibqureshi@worldnet.att.net>
     perl5.001 binary joeturbo@access.digex.net
     String substitution problem (Ted Yee)
     Re: substituting with /g and simulating "lookbehind" <sfink@cs.berkeley.edu>
     Re: trouble with pipes (Tom Vaughan)
     Unix and ease of use (WAS: Who makes more ...) (Michael Craft)
     Re: Unix and ease of use (WAS: Who makes more ...) (Tom Wheeley)
     Re: When is perl program too large? (Steven W McDougall)
     Re: When is perl program too large? <good.luck@getting.spam.to.zenin.at.best.com>
     Re: Xsubpp part of Win32 distribution (Kermit Tensmeyer)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Tue, 01 Apr 1997 23:26:50 -0500
From: crawform@imperium.net (Mike Crawford)
Subject: Re: Can you figure this out?  Split, Array, Literal, within string
Message-Id: <crawform-0104972326500001@wooster28.imperium.net>

Well, first change the 3 to a 4 in your split command, otherwise
you will get all the remaining pipes in $email. Also, you need a 
semicolon at the end of the first line "$string = ....." (maybe
you already saw that :)  )

As far as the first error is concerned, maybe a translation would
work on $string before you do the split command.


In article <pa19-3103972300410001@p11.ts1.metro.ma.tiac.com>,
pa19@tiac.net (Paul Antinori) wrote:

> Hi:
> 
> I was wondering if anyone can help me figure out how to not recognize the
> "@" symbol as an indicator for an array in the following?
> 
> Thanks much.
> 
> Paul
> pa19@tiac.net
> 
> 
> $string = "John|Smith|John@world.net||||"
> 
> ($fname, $lname, $email) = split (/\|/,$string,3);
> 
> print "$fname\t$lname\t$email\n";
> 
> 
> error messages are:
> # Literal @world now requires backslash, within string
> File 'Macintosh HD:Desktop Folder:Untitled'; Line 1
> # syntax error, near "("
> File 'Macintosh HD:Desktop Folder:Untitled'; Line 3
> # Macintosh HD:Desktop Folder:Untitled had compilation errors.

-- 
Mike Crawford                    -- Highpoint Software -- 
Macintosh Consultant             -- Wooster, Ohio, USA --
crawform@imperium.net
"I'll get all the sleep I need when I'm dead!!!"


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

Date: Tue, 01 Apr 1997 19:22:08 -0800
From: Derek Blandford <blan0416@uidaho.edu>
Subject: Can't print twice...
Message-Id: <3341D0E0.559A@uidaho.edu>

I've been trying to set up a chat on my server...but whenever I say one
thing, I can't say it again, with the exact same words.  Even if I say
something different in between inputs, I still can't say what I've
already said.  I can't figure out the problem  I've tried setting up
different programs, but they're all the same...they just won't let me
say the same exact thing twice.  Any suggestions I would really
appreciate!!!  Thanks a million...

Jason Hansen  blan0416@uidaho.edu


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

Date: 1 Apr 1997 16:52:30 -0800
From: danny@hendrix.postino.com (Danny Aldham)
Subject: Re: Compilation problem on sco box
Message-Id: <5hsake$q0l@hendrix.postino.com>

Jim Femister (jfemister@acm.org) wrote:
: I am getting the following output when trying to make perl5.003 for SCO:
:         cc  -L/usr/local/lib -o miniperl miniperlmain.o libperl.a -ldbm.nfs
: -lin
: tl -lsocket -lnsl_s -lndbm -lld -lm -lc -lPW -lx
: undefined                       first referenced
:  symbol                             in file
: Perl_chsize                         libperl.a
: ld fatal: Symbol referencing errors. No output written to miniperl
: *** Error code 13           
: Things seem to run smoothly until this attempt to compile "miniperl".
: Any suggestions?

Either use gcc to make perl, or download the perl distribution from
ftp.sco.com and use the hints file included with it. For some reason
this has not been fed back into the regular perl distribution hints.

--
Danny Aldham    SCO Ace, MCSE    www.postino.com


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

Date: Tue, 01 Apr 1997 18:40:21 -0500
From: elam@madness.net (Elam Birnbaum)
Subject: Creating a mailto link with a predefined subject line.
Message-Id: <elam-0104971840210001@leopard.madness.net>

Hi, I would like to know whether I need to use Perl/CGI in order to have a
link on my web site which acts as a mailto command, but which fills in a
specified subject line as well as the To: field. Is there an HTML tag that
supports this? If not, how can CGI be used to do this?

Thanks in advance,

Elam Birnbaum
elam@madness.net
Micro Madness / pixel Generation


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

Date: Tue, 01 Apr 1997 23:13:59 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Creating a mailto link with a predefined subject line.
Message-Id: <comdog-0104972313590001@nntp.netcruiser>

[redirected to comp.infosystems.www.authoring.cgi]

In article <elam-0104971840210001@leopard.madness.net>, elam@madness.net
(Elam Birnbaum) wrote:

> Hi, I would like to know whether I need to use Perl/CGI in order to have a
> link on my web site which acts as a mailto command, but which fills in a
> specified subject line as well as the To: field. Is there an HTML tag that
> supports this? If not, how can CGI be used to do this?

some browsers might handle this sort of thing with HTML, but it certainly
isn't universal, and for critical things, if it doesn't work everywhere
it just doesn't work :)

a CGI script could handle something like this.  the script would provide
an interface between the web client and a mailer program on the server.
you might have something similar to this very simple Perl subroutine:

#!/usr/bin/perl -wT
# do you know why i used the -T?  if not, find out!
# <URL:http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html>

$ENV{'PATH'} = '';

&mail_message('hello world', 'whomever@wherever.gov');

sub mail_message
   {
   my ($message, $address) = @_;
   
   open MAIL, "| /usr/bin/rmail $address";
   
   print MAIL <<"HERE";
From: whatever@here.com
Subject: Predetermined subject line

$message
HERE
   }

__END__

-- 
brian d foy                              <URL:http://computerdog.com>                       
unsolicited commercial email is not appreciated


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

Date: Tue, 01 Apr 1997 20:40:54 -0400
From: atstarr@nowhere.edu (Andrew Starr)
Subject: Re: Creating a mailto link with a predefined subject line.
Message-Id: <atstarr-0104972040570001@tppp3.negia.net>

In article <elam-0104971840210001@leopard.madness.net>, elam@madness.net
(Elam Birnbaum) wrote:

> Hi, I would like to know whether I need to use Perl/CGI in order to have a
> link on my web site which acts as a mailto command, but which fills in a
> specified subject line as well as the To: field. Is there an HTML tag that
> supports this? If not, how can CGI be used to do this?
> 
> Thanks in advance,
> 
> Elam Birnbaum
> elam@madness.net
> Micro Madness / pixel Generation

[mailed and posted]
No need for Perl on this one.

<A HREF = "mailto:username@domain.com?subject=hello">

If you want spaces in the subject, use %20 -- various other punctuation
marks may require other substitutions.

You might also be able to do:

<A HREF =
"mailto:username@domain.com?subject=hello?body=the%20quick%20brown%20fox">

Whether the above URL format works on your browser/e-mail program, etc., I
don't know. (The first one works for me on Netscape and Eudora; the second
works in Eudora, untested by me in Netscape.)

I believe this is a new standard in one of the RFCs.

One of the advantages of using a CGI (in Perl or other languages) is that
you have more control. But the mailto is easy. (But note that spambots can
pick up e-mail addresses quite easily in HTML, but if I am correct, not as
easily, if at all, from your scripts.

-Andrew

-- 
Andrew Starr
atstarr at amherst.edu
http://www.amherst.edu/~atstarr/eudora (for Eudora utils. and info)
I have no connection to Qualcomm other than being a happy customer!
If this post/email is answering a help request, please try to post
  followup questions, esp. new questions, to the newsgroup. Thanks.


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

Date: 2 Apr 1997 05:23:04 GMT
From: Zenin <good.luck@getting.spam.to.zenin.at.best.com>
Subject: Re: Does perl have constants?
Message-Id: <5hsqfo$29h$3@nntp2.ba.best.com>

Patrick Hayes <Patrick.Hayes.CAP_SESA@renault.fr> wrote:
: shields@crosslink.net (Michael Shields) writes:
: > Tom Christiansen  <tchrist@mox.perl.com> wrote:
: > >     *PI = \3.14159.
: > 
: > What are the pros and cons of this vs. `sub PI { 3.14159 }'?
: One con is that the sub form is exportable (in @EXPORT & @EXPORT_OK), while
: the glob form isn't (unfortunateley).

	You're mistaken.  Exporting vars via @EXPORT and @EXPORT_OK is both
	posible and simple:

<<FILE PI.pm>>
package PI;

require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw($PI);
use strict;
use vars qw($PI);

*PI = \3.14159;
1;


<<FILE: test.pl>>

use PI;
use strict;

print "$PI\n";
$PI = 4;

Zenin@best$ perl test.pl
3.14159
Modification of a read-only value attempted at test.pl line 6.
Zenin@best$

-Zenin
 Zenin @ Best . com


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

Date: Tue, 1 Apr 1997 20:54:16 -0500
From: Troy Poppe <tpoppe@homer.bus.miami.edu>
Subject: Hellish problems compiling Perl 5.003 on Digital Unix 4.0
Message-Id: <Pine.OSF.3.95.970401203640.10561A-100000@homer.bus.miami.edu>


I am trying to compile Perl 5.003 on AlphaServer 1000 with Digital Unix
4.0 using gcc and cc.  When I compile with gcc 2.7.2 I get the following
errors:


	  CCCMD =  gcc -c -DSTANDARD_C -I/usr/local/include -D__LANGUAGE_C__ -D_NO_PROTO -O2   
In file included from perl.h:803,
                 from pp_sys.c:18:
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:106: warning: conflicting types for built-in function `cosf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:109: warning: conflicting types for built-in function `fabsf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:118: warning: conflicting types for built-in function `sinf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:120: warning: conflicting types for built-in function `sqrtf'
pp_sys.c: In function `Perl_pp_ioctl':
pp_sys.c:1290: warning: cast to pointer from integer of different size
	  CCCMD =  gcc -c -DSTANDARD_C -I/usr/local/include -D__LANGUAGE_C__ -D_NO_PROTO -O2   
In file included from perl.h:803,
                 from doop.c:15:
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:106: warning: conflicting types for built-in function `cosf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:109: warning: conflicting types for built-in function `fabsf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:118: warning: conflicting types for built-in function `sinf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:120: warning: conflicting types for built-in function `sqrtf'
	  CCCMD =  gcc -c -DSTANDARD_C -I/usr/local/include -D__LANGUAGE_C__ -D_NO_PROTO -O2   
In file included from perl.h:803,
                 from doio.c:18:
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:106: warning: conflicting types for built-in function `cosf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:109: warning: conflicting types for built-in function `fabsf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:118: warning: conflicting types for built-in function `sinf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:120: warning: conflicting types for built-in function `sqrtf'
doio.c: In function `Perl_do_ipcctl':
doio.c:1398: warning: cast to pointer from integer of different size
	  CCCMD =  gcc -c -DSTANDARD_C -I/usr/local/include -D__LANGUAGE_C__ -D_NO_PROTO -O2   
In file included from perl.h:803,
                 from regexec.c:55:
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:106: warning: conflicting types for built-in function `cosf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:109: warning: conflicting types for built-in function `fabsf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:118: warning: conflicting types for built-in function `sinf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:120: warning: conflicting types for built-in function `sqrtf'
regexec.c: In function `regmatch':
regexec.c:989: warning: cast from pointer to integer of different size
	  CCCMD =  gcc -c -DSTANDARD_C -I/usr/local/include -D__LANGUAGE_C__ -D_NO_PROTO -O2   
In file included from perl.h:803,
                 from taint.c:8:
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:106: warning: conflicting types for built-in function `cosf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:109: warning: conflicting types for built-in function `fabsf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:118: warning: conflicting types for built-in function `sinf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:120: warning: conflicting types for built-in function `sqrtf'
	  CCCMD =  gcc -c -DSTANDARD_C -I/usr/local/include -D__LANGUAGE_C__ -D_NO_PROTO -O2   
In file included from perl.h:803,
                 from deb.c:16:
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:106: warning: conflicting types for built-in function `cosf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:109: warning: conflicting types for built-in function `fabsf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:118: warning: conflicting types for built-in function `sinf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:120: warning: conflicting types for built-in function `sqrtf'
	  CCCMD =  gcc -c -DSTANDARD_C -I/usr/local/include -D__LANGUAGE_C__ -D_NO_PROTO -O2   
In file included from perl.h:803,
                 from globals.c:2:
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:106: warning: conflicting types for built-in function `cosf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:109: warning: conflicting types for built-in function `fabsf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:118: warning: conflicting types for built-in function `sinf'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2/include/math.h:120: warning: conflicting types for built-in function `sqrtf'
collect2: ld returned 1 exit status
/usr/bin/ld:
Cannot use 32 bit shared lib 'libdl.so.1.64.fpx.so' without -taso option

Stop.



Any ideas as to what is wrong here? (besides a lot :)

Troy Poppe
System Administrator




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

Date: Tue, 01 Apr 1997 16:16:18 -0800
From: Derek Blandford <blan0416@uidaho.edu>
To: Reye S A <c9608753@alinga.newcastle.edu.au>
Subject: Re: HELP!!!!!my cgi-bin don't work
Message-Id: <3341A552.4324@uidaho.edu>

Reye S A wrote:
> 
> cgi-bin, perl:
> 
> ---
> I am having trouble setting up my cgi-bin directory.  It is currently
> set to drwxr_xr_x and the perl scripts are set the same (minus the d of
> course) but browsers only read them as test files and fail to execute
> them.  Could someone please help.

I had the same problem.  Most likely, to execute the cgi-bin scripts,
the server runs through a different port.  Here at my university, for
example, I have to append a port :9000 at the end of the domain, or else
it will simply put the file up for reading instead of execution.  E-mail
your webmaster or somehow find out what port to use, and that should
solve your problems.  

Jason Hansen   blan0416@uidaho.edu


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

Date: 1 Apr 1997 15:59:18 -0800
From: blm@halcyon.com (Brian L. Matthews)
Subject: Re: HELP!!!!!my cgi-bin don't work
Message-Id: <5hs7gm$i48$1@halcyon.com>

In article <5h9m1g$jot@seagoon.newcastle.edu.au>,
Reye S A <c9608753@alinga.newcastle.edu.au> wrote:
|I am having trouble setting up my cgi-bin directory.
|Could someone please help.

Probably, but being it isn't a perl problem, this isn't a good place
to ask. Try your server documentation, your system administrator, then
one of the comp.infosystems.www.servers newsgroups, in that order.

Brian
-- 
Brian L. Matthews				Illustration Works, Inc.
	For top quality, stock commercial illustration, visit:
		  http://www.halcyon.com/artstock


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

Date: 01 Apr 1997 18:26:02 -0800
From: d3h486@wd19518.pnl.gov (John L. Daschbach)
Subject: IPC_NOWAIT Not working
Message-Id: <m3k9mmf9dx.fsf@wd19518.pnl.gov>


Using 5.003 and RedHat Linux 4.0 I have been able to use both
semaphores and messages between Perl and C (or Perl and Perl)
programs.  However using IPC_NOWAIT in the flags for either semop or
msgrv has no effect that I can see, the call blocks untill a message
or semaphore is in the correct state.  

Have others had this work on different systems?  Our sysadmins have
Perl back around 5.001 or 5.002 on AIX but to be honest I have not
tried it there yet.

Thanks.

-John


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

Date: Wed, 02 Apr 1997 04:40:26 GMT
From: steve@golf.com (Steven Sajous)
Subject: Multiplication9s
Message-Id: <3341e294.5786438@news1.alterdial.uu.net>

Is there a way to keep this freom happening?

$value =19.95;
$number = 1;

$total = $value * $number

I get $total = 19.950000000000000698

Thanx


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

Date: Tue, 01 Apr 1997 17:27:39 -0800
From: "John Q. Linux" <jql@accessone.com>
To: Andreas Schmidt <schmidt@miserv2iai.kfk.de>
Subject: Re: overloading methods with xsubpp
Message-Id: <3341B60B.7E04928@accessone.com>

Andreas Schmidt wrote:
> 
> hi,
> 
> i'am currently developing an interface for the objectstore database (c++ - api).
> i wrote some perl-scrips that parse the objectstore include files to build the
> xs-files for me. my problem is now, that the xsubpp-compiler does not allow
> method overloading. so i have for example three methods to open a database with
> different parameters:
> 
>         void
>         os_database::open(para_0= 0)
>                 os_boolean                       para_0
>                 CODE:
>                 THIS->open(para_0);
> 
>         static os_database *
>         os_database::open(para_0,para_1= 0,para_2= 0)
>                 const char *                     para_0
>                 os_boolean                       para_1
>                 os_int32                         para_2
>                 CODE:
>                 RETVAL=os_database::open(para_0,para_1,para_2);
>                 OUTPUT:
>                 RETVAL
> 
>         static os_database *
>         os_database::open(para_0,para_1,para_2,para_3)
>                 const char *                     para_0
>                 os_boolean                       para_1
>                 os_int32                         para_2
>                 os_database *                    para_3
>                 CODE:
>                 RETVAL=os_database::open(para_0,para_1,para_2,para_3);
>                 OUTPUT:
>                 RETVAL
> 
> in this case, all the methods have different numbers of parameters, so perhaps i
> could them distinguish with the 'item' variable. but in other cases, the number
> of parameters is equal to differnt methods.
> 
> has anyone experience with this kind of problem?
> 
> any help or workaround would be helpfull
> 
> thanks in advance
> smiff
> ========================================================================
> andreas schmidt                                email: schmidt@iai.fzk.de
> institut fuer angewandte informatik (iai)        phone: +49 7247 82 5714
> forschungszentrum karlsruhe gmbh
>     - technik und umwelt -
> postfach 3640                                  76021 karlsruhe (germany)
>           http://miserv1.iai.fzk.de/Institut/MI/mitarbeiter/schmidt.html

Unfortunatly, there is no standard method for overloading Perl XS
functions. You will have to use the 'items' variable and perhaps the
Sv*OK macros.

Adding a class:: before the function-name causes xsubpp to assume that
it should create a THIS variable of type 'class' and that it should
initialize it with the first argument. That would be bad with static
member-functions.

In your case, probably the easiest way to achieve what you need is to
do something like this:

os_database *
open(para_0 = 0, para_1 = 0, para_2 = 0, para_3 = 0)
    CASE: !items
	CODE:
	croak("Bad call");
    CASE: sv_isobject(ST(0))
	os_database *para_0
	os_boolean para_1
	CODE:
	para_0->open(para_1);
	XSRETURN_EMPTY;
    CASE: items == 4
	char *para_0
	os_boolean para_1
	os_int32 para_2
	os_database *para_3
	CODE:
	RETVAL = os_database::open(para_0, para_1, para_2, para_3);
	OUTPUT:
	RETVAL
    CASE:
	char *para_0
	os_boolean para_1
	os_int32 para_2
	CODE:
	RETVAL = os_database::open(para_0, para_1, para_2);
	OUTPUT:
	RETVAL

And that's it. It's not very readable, but it works. There is some
overhead, but a reasonable compiler might be able to optimize it away.

Good luck,
Ashley Winters

-- 
"Don't be the last person on your block to stop paying income taxes."
   -- Irwin Schiff, Libertarian party member, author, and convicted felon.


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

Date: Wed, 02 Apr 1997 00:30:10 -0500
From: Shoaib Qureshi <shoaibqureshi@worldnet.att.net>
Subject: perl5-cgiscript
Message-Id: <3341EEE2.2A70@worldnet.att.net>

Hi..

i have created an html voting form using radio buttons for the user to 
click in there respective choice. upon completion of the clicks, the 
user clicks on the submit button...and yes i need help to fill in the 
 ...

1) will i need to use hidden fields to save the variable state 
information?

2) if so, can i use buttons and hidden fields at the same time?

3) if not, what is the alternative or a way around this?

any help would be of great help!

Thanx

Shoaib


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

Date: Tue, 01 Apr 1997 18:51:18 -0600
From: joeturbo@access.digex.net
Subject: perl5.001 binary
Message-Id: <859941848.11311@dejanews.com>

hello.

i was wondering if someone here could email me the perl5.001 interpreter
for hp-ux 10.10.  i just need that one binary file because i have some
scripts that for some reason do not work with 5.003.  i have recovered the
perl5.001 libs but i am missing the interpreter. i believe its size is
877909 bytes.

thank you.

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Wed, 02 Apr 1997 04:08:12 GMT
From: ted@qp.com (Ted Yee)
Subject: String substitution problem
Message-Id: <3341d8a5.113539738@nntp.netcruiser>

Here's my problem:

I have a string substitution where sometimes, some extra text in the
replacement term will conflict with the matching term.

ie.

$string = "this is a test";
$term = "is";

$string =~ s/$term/replace with this/gi;

The problem is that with the above example, the resulting output is:

threplace with this replace with threplace with threplace with this a
test


Now, I do have a work around but I'd like to know if there is a
cleaner way than doing it like this:

$string = "this is a test";
$term = "is";

$string =~ s/$term/!#!#!#/gi;
$string =~ s/!#!#!#/replace with this/gi;

This will give the desired result of:

threplace with this replace with this a test

By using a different string that can't possibly be re-matched again, I
get the desired result but this adds an extra step.

If you're curious, I'm using this in a search script to change the
font color of all matching terms. (I use the <FONT> tag so if you used
"on" as a search term, it would interfere with the tag)

Any help would be appreciated.



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

Date: Tue, 01 Apr 1997 18:21:22 -0800
From: Steve Fink <sfink@cs.berkeley.edu>
Subject: Re: substituting with /g and simulating "lookbehind"
Message-Id: <3341C2A2.2413@cs.berkeley.edu>

Hee hee.

s/\\\{/My comet hath eighteen ears./g;
s/\{//g;
s/My comet hath eighteen ears./\\\{/g;

(Well, you *could* use \011 or something nasty like that...)

Another way to be lazy:

s/([^\\])\{/$1/g;
s/^\{//;

(Warning: all this is untested.)


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

Date: 2 Apr 1997 00:25:04 GMT
From: tommy@best.com (Tom Vaughan)
Subject: Re: trouble with pipes
Message-Id: <5hs910$gqc$1@nntp2.ba.best.com>

I should have been more specific. The interpreter is not always known.
What is known is that some scalar holds some script. This script is meant to be
run through some interpreter. An interpreter (and its options) which is
specified via the "#!" token. Rather than duplicate a shells ability to
parse this line, spawn the right interpreter, pass arguements, and feed the
script, I thought I could pipe this script to a shell, and via the pipe,
everything would happen as though this all happened from the command line.
But I can't seem to get this to happen. Without modifing the contents of
the scalar.

Charles DeRykus (ced@bcstec.ca.boeing.com) wrote:
: In article <5hee31$4ln$1@nntp2.ba.best.com>,
: Tom Vaughan <tommy@best.com> wrote:
:  > I guess this is really more a matter of trouble with shells, yet I digress...
:  > The following script will not work unless I remove the shbang token, "#!".
:  > Is there anyway around this? I would like to leave what constitutes
:  > $SHELLSCRIPT unmodified if at all possible.
:  > 
:  > script follows:
:  > 
:  > #!/usr/bin/perl
:  > 
:  > $SHELLSCRIPT = << 'END_OF_SHELLSCRIPT';
:  > #!/usr/bin/perl
:  > while (<DATA>) {
:  >         print $_;
:  > }
:  > __DATA__
:  > one fish
:  > two fish
:  > blue fish
:  > END_OF_SHELLSCRIPT
:  > 
:  > open(PIPE, "|/bin/sh") || die "unable to open pipe: ";
:  > print PIPE $SHELLSCRIPT;
:  > close(PIPE);

: Feed the shell with perl wrapped in perl:

: ...
: $SHELLSCRIPT = << "END_OF_SHELLSCRIPT';
: perl <<'END_OF_PERLSCRIPT'
: ...
: ...
: END_OF_PERLSCRIPT
: END_OF_SHELLSCRIPT
: ....

: HTH,
: --
: Charles DeRykus
: ced@carios2.ca.boeing.com

--
Tom Vaughan <tommy@best.com>
"I am down with the slow jams."



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

Date: 1 Apr 1997 18:33:30 -0800
From: jsi@idiom.com (Michael Craft)
Subject: Unix and ease of use (WAS: Who makes more ...)
Message-Id: <5hsghq$sp2@idiom.com>

> > Is France a socialist society?
> 
> Yes, it is.

France has a stock market, rich people, etc., just like every 
other country.

(The Socialist Party is not socialist.)



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

Date: Wed, 02 Apr 97 00:35:37 GMT
From: tomw@tsys.demon.co.uk (Tom Wheeley)
Subject: Re: Unix and ease of use (WAS: Who makes more ...)
Message-Id: <859941337snz@tsys.demon.co.uk>

In article <5hiupr$svu@idiom.com> jsi@idiom.com "Michael Craft" writes:

> > > You want a more productive capitalism?  Scrap the copyright and
> > > patent laws and let the little guy, who has invented *everything*,
> > > unleash his creativity and capitalism will have a fighting chance; 
> > > otherwise, socialism is better in all ways than capitalism, which 
> > > inevitably leads to monopolization if it weren't for interference
> > > by the state.
> > 
> > Uh -- patents were invented to *protect* the little guy.  Otherwise,
> > everytime the "little guy" invented something, the "big guy" would
> > simply use the idea, and blow out the little guy because of much
> > greater resources.
> 
> Then what value is the "little guy" if he is unable to compete?
> 
> If the patent and copyright laws were revoked the assets of the
> "big guy" would be substantially depleted as it is economic protection
> by the state that gives the "big guys" their awesome power.

Bollocks.  Imagine if there were no patent laws, and Pharmacy, Ltd. discover
paracetamol.  They would still be charging a hundred pounds per pill today;
were it not for the _openness_ afforded by the patent system which allows
smaller medical companies to sell boxes of 100 paracetamol tablets for 1 pound.

IIRC 1/3 of Glaxo-Wellcome's profits are from the sale of the stomach settler
Zantac.  When the patent runs out they will lose a lot of this profit, as the
competition will legally be abllowed to take the recipe stated in the patent
and sell the drug for a lot less money.

You are thinking of the software industry, where there is mis-use of copyright
laws.  There is no glasnost after x years in this industry.

Believe me, the patent system was designed to encourage invention and
openness by protecting the little guy.  Copyright was designed to protect
authors of printed works.  The choice is whether you define software as
Science (where knowledge is shared) or as literature.  The fact is that due
to the malleability of software, it is science.
-- 
:sb)



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

Date: Wed, 2 Apr 1997 01:28:37 GMT
From: swmcd@world.std.com (Steven W McDougall)
Subject: Re: When is perl program too large?
Message-Id: <E7zLFp.1AE@world.std.com>

soccer@microserve.net (Geoffrey Hebert) writes:

>I am used to writing programs in a size smaller than 800 lines.  If a
>program gets above this amount I break it apart.  

>The perl overhead seems to me to necessitate keeping a program
>together.  I wonder how you all feel about the size of perl programs.

>When do you say - 'This program is too large, I'll break it up'? 

I only break up programs into separate executables if I run into
system limits - e.g. the 640K barrier in DOS. I don't see any reason
to break a Perl program into separate executables.

Do break it into modules.

- SWM


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

Date: 2 Apr 1997 05:10:22 GMT
From: Zenin <good.luck@getting.spam.to.zenin.at.best.com>
Subject: Re: When is perl program too large?
Message-Id: <5hspnu$29h$2@nntp2.ba.best.com>

Geoffrey Hebert <soccer@microserve.net> wrote:
: I am used to writing programs in a size smaller than 800 lines.  If a
: program gets above this amount I break it apart.  

	Define '800 lines'?  800 lines of total code spaning many files (modules
	or at the vary least function libs), or 800 lines in one file?
	
	If you've got 800 lines in one file you're doing something wrong.

: The perl overhead seems to me to necessitate keeping a program
: together.
	This sounds like you are cutting one program up into many smaller
	ones.  This can be good or bad, it really depends on what you
	are doing.

: I wonder how you all feel about the size of perl programs.
	Hasn't anyone ever told you that size doesn't matter? <grin>

: When do you say - 'This program is too large, I'll break it up'? 
	About 3am... -I'm more stuburn then Billy ;-)

-Zenin
 Zenin @ Best . com


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

Date: Wed, 02 Apr 1997 02:00:57 GMT
From: tensmek@cnad.dl.nec.comxx (Kermit Tensmeyer)
Subject: Re: Xsubpp part of Win32 distribution
Message-Id: <5hseiu$79$1@Reliant.cnad.dl.nec.com>

In article <01bc3aea$04e02d10$1e2611ac@tingw>, "Wen Ting" <ting@platinum.com> wrote:
>Is Xsubpp part of Perl Win32 distribution?  
>

  are the symptoms that you are seeing

 ../../miniperl  <xx>Xsubpp -C++ -prototypes www.xs > www.c

  locks up?

  it would appear that the miniperl built using MFC locks up at this point?




-----
Kermit Tensmeyer       Hey! I have my _own_ opinion
kermit@cnad.dl.nec.com   Dallas, Texas


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

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 217
*************************************

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