[6773] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 398 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 30 12:17:17 1997

Date: Wed, 30 Apr 97 09:00:24 -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           Wed, 30 Apr 1997     Volume: 8 Number: 398

Today's topics:
     Re: 'C' structure passing <minaret@sprynet.com>
     aub (oops!) <paw24@cam.ac.uk>
     Re: Banner Ad Perl Scripts?? <deeto@idt.net>
     Re: Can i use Perl/Tk for my projekt ? <minaret@sprynet.com>
     Re: Can't swap uid and euid (sometimes) suid script. <rootbeer@teleport.com>
     globs, refs, aliases, foreach - have I got the idea? (David Alan Black)
     HELP: system call (Aurangzeb Agha)
     HELP: system call (Aurangzeb Agha)
     Re: How to join 2 different files togheter <minaret@sprynet.com>
     Re: How to write '&' through Perl's decoding <minaret@sprynet.com>
     Re: HTML parser in Perl <merlyn@stonehenge.com>
     Re: Junk Email Overflow! <phil@bts.com>
     Looking for *roff expert to help out in Perl problem lvirden@cas.org
     Need Help With Permissions with NT.4 <gibby@tcol.net>
     Re: Newbie W95 install hassles <johnsone@camax.com>
     Re: Notice to antispammers (Nathan V. Patwardhan)
     Re: Notice to antispammers <mkruse@shamu.netexpress.net>
     Re: Object IDs are good ( was: Object IDs are bad ) <celtschk@physik.tu-muenchen.de>
     Perl 5 under IRIX 6.2 <robert_cothren@out.trw.com>
     Perl 5.003 "exec" function bug in CGI scripts under AIX <jbellet@ifhamy.insa-lyon.fr>
     Perl equivalent of "source in c-shell" or "dot command  (kim )
     Re: Perl on the Mac - hep me! (Bob Wilkinson)
     Re: Perl on Win95? <johnsone@camax.com>
     Perl programmer wanted <steve@mimi.com>
     Re: Pointing a Filehandle _AT_ a Subroutine <rootbeer@teleport.com>
     Q: How do I ... <glee@teir.com>
     Re: shtml extension from perl? <rx@rxlist.com>
     Re: sourcing a ksh script within PERL <seay@absyss.fr>
     Re: Syntax checking? <lee.burns@mosby.com>
     test <paw24@cam.ac.uk>
     URGENT: Building perl 5.003 on Solaris 2.5.1 <Roberto.Fabbretti@dim.hcuge.ch>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 30 Apr 1997 15:07:51 GMT
From: "Geoff Mottram" <minaret@sprynet.com>
Subject: Re: 'C' structure passing
Message-Id: <01bc5578$176717c0$bddbaec7@cactus>

> I have a 'C' application which has defined a type XLong as:
> 
> typedef struct XLong {
> 	long high;
> 	long low;
> } XLong;
> 
> I'm trying to pass this back to Perl and I can't figure out what entry
> to put in the 'typemap' file for the XS compiler. Anyone have any ideas
> about this?

I don't think you can pass structures back and forth.  I would return each
element separately with two calls to XPUSH.

Geoff Mottram
minaret@sprynet.com


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

Date: 30 Apr 1997 15:34:00 GMT
From: Paul A. Watters <paw24@cam.ac.uk>
Subject: aub (oops!)
Message-Id: <5k7op8$o1o@lyra.csx.cam.ac.uk>

Oops!

That subject line should have read 'AUB' not 'test'. Many apologies...



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

Date: Wed, 30 Apr 1997 01:57:47 -0400
From: Scott Kramer <deeto@idt.net>
To: herbr@pfinders.com
Subject: Re: Banner Ad Perl Scripts??
Message-Id: <3366DF5B.5346@idt.net>

I've just written a script that allows you to enter the number of hits
and stops displaying the banner when that number has been reached.  It
keeps a log of all the people that "hit" the banner.  I have not yet
made this public (I haven't even implemented it on my site yet). 
If you would like me to email you if I ever make it available, let me
know.


Herb Rubin wrote:
> 
> Does anybody know of banner ad Perl scripts that I can tinker with.
> 
> Thanks in advance,
> 
> Herb Rubin

-- 
######################################################################
#      mailto:deeto@idt.net     mailto:Webmaster@makeyoulaugh.com    #
#                       Make You Laugh .COM                          #
#                   http://www.makeyoulaugh.com                      #
#     Advertisers wanted: http://www.makeyoulaugh.com/advertise.html #
######################################################################


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

Date: 30 Apr 1997 15:09:44 GMT
From: "Geoff Mottram" <minaret@sprynet.com>
Subject: Re: Can i use Perl/Tk for my projekt ?
Message-Id: <01bc5578$5b0ac440$bddbaec7@cactus>

If you don't get a response to your questions, you can try the newgroup
"comp.lang.perl.tk"

Geoff Mottram
minaret@sprynet.com


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

Date: Wed, 30 Apr 1997 08:07:37 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Jamie Hoglund <jhoglund@skypoint.com>
Subject: Re: Can't swap uid and euid (sometimes) suid script.
Message-Id: <Pine.GSO.3.96.970430080328.29715O-100000@kelly.teleport.com>

On 29 Apr 1997, Jamie Hoglund wrote:

> Subject: Can't swap uid and euid (sometimes) suid script.

> I don't know if this has anything to do with it, but.. user "nobody" 
> is uid 65535 

Perl swaps the uid and euid by means of a system call. If I recall
correctly, the value of 65535 in the system call can mean "leave that id
alone", rather than changing it. If you can set up your system to have
65534 be "nobody", then I don't think you'll have that problem. (Although
this problem could be construed as a feature, rather than a bug. :-) 

Hope this helps! 

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: 30 Apr 1997 14:27:38 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: globs, refs, aliases, foreach - have I got the idea?
Message-Id: <5k7ksq$287@pirate.shu.edu>


#!/usr/local/bin/perl -w
=head

I've puzzled through the matter of the relation between
typeglobs and typeglob references, initially in connection
with an earlier thread (References in foreach loop variables),
in an attempt to understand why, given:

$i = \*foo;

these two loop specifiers produce identically behaving loops:

foreach $$i ...
foreach $$$i ...

I would be very happy if anyone with insight into this would look
over the following, which is my current understanding of it, and
comment/correct/pat on shoulder :-)

Thanks -


David Black
dblack@icarus.shu.edu

=cut

# PART I

$bar = 'abc';

# Testing the equivalence of these two assignments:

*myglob1 = *bar;
*myglob2 = \*bar;

print $myglob1, $myglob2;  # prints 'abcabc'


# So, for aliasing purposes, the right-hand can be a typeglob
# or a typeglob reference.

# Explanation:

# Assigning a reference to a typeglob only aliases
# the member specified (e.g., *glob = \$foo; now $glob == $foo
# but @glob != @foo [ at least, not as a result of this ]).
# (And yes, I know that != doesn't really work on arrays.)

# Therefore, assigning \*bar to *myglob "only" aliases the
# "*" member - which is the glob itself.

# Therefore, it has the same effect as assigning *bar to *myglob. 


# PART II

# Given:

$k = \*foo;

# then these two loops are equivalent:

foreach $$k ('x') { print $foo };  # prints x
foreach $$$k ('x') { print $foo }; # prints x

# In the first, the loop variable is a typeglob reference.
# In the second, it's a typeglob.

# But foreach() uses aliasing, so (see Part I) aliasing whatever
# temporary glob is holding the 'x' to $$k has the same effect
# as aliasing it to $$$k.

# Inside either loop, however, $$k is treated (where the difference
# matters) as a glob ref, and $$$k is treated as the scalar member
# of that glob:

foreach $$k ('x') { print "$$k $$$k" };  # prints *main::foo x
__END__



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

Date: 30 Apr 1997 14:08:39 GMT
From: aagha@cis.ohio-state.edu (Aurangzeb Agha)
Subject: HELP: system call
Message-Id: <5k7jp7$kke$1@news.cis.ohio-state.edu>

I'm trying to take the output from a system call and put it into a variable.

	1) $test = system("date");
	2) print("*** test: $test\n");

1 -- executes the system call and sets $test to 0 to show successful execution
2 -- prints 0 for successful execution

How can I make a system call to 'date', and direct the output to $test
(preferably without output to STDIO)?

	Thanks in Adavance,
	Aurangzeb

PS -- Please eMail me at: aagha@cis.ohio-state.edu

-- 
   \     \  |    \    | aagha@cis.ohio-state.edu  | AURANGZEB M. AGHA
  _ \   |\/ |   _ \   | aagha@hotmail.com         | The Ohio State University
_/  _\ _|  _| _/  _\  | agha.2@osu.edu            | Computer Info. Science
              *** http://www.cis.ohio-state.edu/~aagha ***


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

Date: 30 Apr 1997 15:32:30 GMT
From: aagha@cis.ohio-state.edu (Aurangzeb Agha)
Subject: HELP: system call
Message-Id: <5k7ome$lni$1@news.cis.ohio-state.edu>

got it.  thanks.


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

Date: 30 Apr 1997 15:12:33 GMT
From: "Geoff Mottram" <minaret@sprynet.com>
Subject: Re: How to join 2 different files togheter
Message-Id: <01bc5578$bf1fcca0$bddbaec7@cactus>

> I have 2 differnet files with the same number of rows and I want to
> join them togheter in order to get only one file that will have for each
> row the "sum" of the rows of the single file.

You could open each source file separately and use a loop to read one line
from each file and output the combined results to a third file.

Geoff Mottram
minaret@sprynet.com


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

Date: 30 Apr 1997 15:14:34 GMT
From: "Geoff Mottram" <minaret@sprynet.com>
Subject: Re: How to write '&' through Perl's decoding
Message-Id: <01bc5579$0792db80$bddbaec7@cactus>

> I used &amp; in an HTML file in order to display '&' in    
> an HTML form. However, when an '&' in a word is written  
> in a file it is processed as a new line, because I had to
> use the '&' to split the whole data and to write each 
> name-value pair in each line of a file. 
> Can anyone tell me how to write a special character,'&',
> in a file, which is inserted by user's selection from
> a fill-out form. 

The simplest way would be to use a different separator in your file. 
Alternately, you'll have to "escape" the & character with a backslash   in
some manner.

-- 
Geoff Mottram
minaret@sprynet.com


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

Date: 30 Apr 1997 07:09:56 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: rubin@quip.eecs.umich.edu (Aviel Rubin)
Subject: Re: HTML parser in Perl
Message-Id: <8cg1w84n63.fsf@gadget.cscaper.com>

>>>>> "Aviel" == Aviel Rubin <rubin@quip.eecs.umich.edu> writes:

Aviel> Is there a public domain HTML parser in perl available
Aviel> anywhere?

No.  The only one I know (in the LWP) is freely available under the
same terms as Perl itself.  That keeps it from being public domain,
but you can use it for free, which will probably be close enough, eh?

Get familiar with the stuff in http://www.perl.com/CPAN/modules/ and
your life will be much happier.

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 489 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: 30 Apr 1997 08:23:10 -0400
From: Phil Eschallier <phil@bts.com>
Subject: Re: Junk Email Overflow!
Message-Id: <x6d8rc3djl.fsf@bts.com>

Tim Russell <trussell@nfinity.com> writes:


> Hi, I was wondering if anybody can help me out on this.
> 
> Has anybody written or know of a perl program that you can use to
> validate From: addresses after sendmail receives them, but before the
> actual message is delivered to the user?  What I'm getting at is that
> most mass-mailings have bogus from fields in them, so filtering them
> out  and sending them to /dev/null would be the easiest fix.  Those that
> don't use bogus from addresses usually supply a method of removing a
> person from a mailing list.
> 
> Any help here will be greatly appreciated,
> 
> Tim Russell
> trussell@nfinity.com

Tim;

There are some perl scripts that have been floating around (including
one on CPAN from Tom C.).

However, I've had good luck with procmail.  procmail's regular
expression capabilities are not equivalent to those in perl5, but they
are ample for filtering out bullshit like make money fast or other
nonsense ... the only thing that I could see perl5 supporting that I
didn't achieve in procmail is something like "trash articles that have
similar sender / receiver lines" ...

I've opt'd from procmail because it has other capabilities that I like
for mailbox management and it is a binary so there is less overhead
during invocation.

I hope this helps.

-- 
Phil Eschallier      | Bux Technical Services | UNIX and the Internet
   inet phil@bts.com | 131 Wells Road         | for your business.
    tel 215 348 9721 | Doylestown, PA  18901  |
    fax 215 348 2567 | http://www.bts.com     |


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

Date: 30 Apr 1997 14:56:15 GMT
From: lvirden@cas.org
Subject: Looking for *roff expert to help out in Perl problem
Message-Id: <5k7mif$im0$1@cas.org>


Perl 5.003_97j (someday to be 5.004) has this great shell command called
roffitall which attempts to take the most useful man pages from perl and
create 2 PostScript(tm) documents: a Table of Contents and the man pages,
with page numbers.

The problem is this.

On a SPARC Solaris 2.5.1, using groff 1.10, when the shell calls
groff -man -rC1 -rD1 -rF1
with the list of man pages, a very nice Table of Contents .ps is created.
However, the .ps file containing the pages has a page 0 that is created.
This causes duplex output to put the odd pages on the back instead of the
front.
If I change roffitall to invoke groff as
groff -man -rC1 -rD1 
then the page 0 is gone.  However, instead of the Table of Contents, I get
the errors:
perlmodlib.1:183: warning: numeric expression expected (got `f)
perldiag.1:839: warning: numeric expression expected (got `s')
perltrap.1:695: name expected (got `\e'): treated as missing


Anyone know of a way that I could get rid of page 0 AND get the Table of
Contents?
-- 
Larry W. Virden                 INET: lvirden@cas.org
<URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
Unless explicitly stated to the contrary, nothing in this posting should
be construed as representing my employer's opinions.


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

Date: 30 Apr 97 16:58:37 GMT
From: "Mark Gibbs" <gibby@tcol.net>
Subject: Need Help With Permissions with NT.4
Message-Id: <01bc557e$6ef4aba0$04cf88d0@tcol.net.tcol.net>

Can some one please help me we have installed perl 5 on our server and I
have Associated the .pl with the perl.exe and for some reason the perl
files work fine when I'm on the server but when I'm on another machine it
always asks me for a password?
I don't get it I think I must have the permissions messed up in the cgi-bin
dir or the dir were the perl is located which is c:\programs files\perl5\
this is driving me crazy ..... 
I have a mailto.exe file in the cgi-bin dir and it works fine so it makes
me think that it is in the perl dir were the permissions is wrong...
Please help me solve this problem 
Thank you 
gibby@tcol.net


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

Date: Wed, 30 Apr 1997 08:53:21 -0500
From: Eric Foster-Johnson <johnsone@camax.com>
To: Michael Boswell <bozi@connexus.apana.org.au>
Subject: Re: Newbie W95 install hassles
Message-Id: <33674ED1.1909@camax.com>

Michael Boswell wrote:
> 
> Hi there, I've downloaded a zipped version of perl5, when i double click on
> the w32 self install file it returns a message saying cannot run this in dos
> mode? Can anyone be bothered giving me a step by step instruction on how to
> install perl5 for w95 ??
> 
> thanks
> bozi


See my Web page at the following URL for some tips. 

http://www.pconline.com/~erc/perl95.htm

This describes problems (with solutions) that I faced
when installing on Win95.

You probably also want to look in any README files that 
come with your Perl distribution, as well as any problems 
reported at the internet site you downloaded the Perl 
distribution from.

Good luck,
-Eric

-- 
Eric Foster-Johnson http://www.pconline.com/~erc
CAMAX, SDRC's CAM Business
7851 Metro Parkway         phone: +1 612 854 5300 fax: +1 612 854 6644
Minneapolis, MN 55425 USA  johnsone@camax.com


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

Date: 30 Apr 1997 13:58:20 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Notice to antispammers
Message-Id: <5k7j5s$n1v@fridge-nf0.shore.net>

Matt Kruse (mkruse@shamu.netexpress.net) wrote:
: Had this thread been started by anyone other than Tom, he and others 
: would surely have responded with the 'This has nothing to do with Perl, 
: now go somewhere else' by now.

This will be the last thing I'll say about this thread before I killfile
it (just like those 6 sordid discussions about Tcl/Scheme/etc)...

Please use a mail filter, like procmail.  If you're using a provider that
doesn't offer one (from what I've heard, you can even filter your mail 
through AOL of all things), please get a provider who can.

I've eliminated most of the crrrraaaaaaap from savetrees.com and porno
distributors.  When I check my procmail.log, I know that they've been 
around, but I've never had to see their messages in my mailbox.

I'd hate to think that someone (legitimate) who was trying to contact
me couldn't because I munged my headers.

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: 30 Apr 1997 15:35:55 GMT
From: Matt Kruse <mkruse@shamu.netexpress.net>
Subject: Re: Notice to antispammers
Message-Id: <5k7osr$fie@news1-alterdial.uu.net>

Nathan V. Patwardhan <nvp@shore.net> wrote:
: Please use a mail filter, like procmail.  If you're using a provider that
: doesn't offer one (from what I've heard, you can even filter your mail 
: through AOL of all things), please get a provider who can.

Nice solution, but not practical in many, if not most, circumstances.

You shouldnt assume that
1) everyone runs their mail server on unix
2) everyone even has access to install/use things like this
3) everyone has the knowledge needed to create filters

: I'd hate to think that someone (legitimate) who was trying to contact
: me couldn't because I munged my headers.

me too, which is why i just put up with the spam (lots of it) for now.  
but not everyone feels this way.

-- 
Matt Kruse
mkruse@netexpress.net
http://mkruse.netexpress.net/                       http://www.mkstats.com/
---------------------------------------------------------------------------


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

Date: Wed, 30 Apr 1997 17:15:05 +0200
From: Christopher Eltschka <celtschk@physik.tu-muenchen.de>
Subject: Re: Object IDs are good ( was: Object IDs are bad )
Message-Id: <3367620D.22F6E2BE@physik.tu-muenchen.de>

Matthias Blume wrote:
> 
> In article <33607944.3852@ws6a17.gud.siemens.co.at> "Istvan.Simon" <simo@ws6a17.gud.siemens.co.at> writes:
> 
>    Even if two things LOOK the same then they are not the same. If they
>    were the same you could never make a copy from anything. If this is
>    true in reality then there is no reason to be untrue in programming
>    languages.
> 
> Several misconceptions:
> 
>    - There are things in the "real" world that don't have an "identity".
>      Numbers are one example, and we generally don't expect to be able
>      to distinguish between _this_ 1 and _that_ 1.  Another example is the
>      electron (or other thingies that particle physicists might be interested
>      in).

Nice analogy - especially as it can be used to prove that is *does* make
sense to obtain a pointer to an object:

While electrons are indistinguishable (and this is an important concept
in
quantum mechanics), it *does* make sense to speak of "the electron in
the 1s
state" vs. "the electron in the 2p state", because there is the
so-called
Pauli principle, that no two electrons can be in the same state
(ironically
this is true *only* for identical particles). In the same sense it makes
sense
to speak of "the object at this place" and "the object at that place",
as
again no two objects can be at the same place. Of course, if you would
exchange
those identical objects in memory (without updating references to them),
you
would see no difference - just as you would see no difference if you
exchanged
the two electrons above. It's the electrons "identified" by their state,
and
the objects "identified" by their address.

> 
>    - Things that _actually_ look the same in each and every
>      respect_are_ the same.  Things that we can distinguish between
>      do _not_ look the same (by definition -- this is what we mean by
>      being able to distinguish).
> 

Even identical objects may be distinguished by their relationship to the
rest
of the world. For example replace the two electrons of the example by
two
myons. Then it *would* make a difference, if the 1s myon or the 2p myon
decayed (although both are "identical"). In the same sense it makes a
difference
f. ex. *which* of the identical subtrees you replace - you just get
different
trees by removing different subtrees, even if they are identical. Or,
simpler,
take the following list: (1, 1, 2, 3). Now it *does* make a difference
if I
replace the first 1 or the second 1 by 2. So we *can* distinguish
between
*this* 1 and *that* 1 (this 1 being the first in the list, that 1 being
the
second)

>    - Even if, for a moment, we assume that all "real world" things have an
>      inherent identity (the electron is a nice counterexample), then
>      it is _still_ a bad idea to extrapolate from this and make every
>      value in a programming language the same. Abstract things (like
>      numbers, functions, sets) do _not_ have an identity.
> 

Such like the first 1 and the second 1 in the list above?

>    - From a denotational point of view object identity doesn't matter
>      for immutable things.
> 

Ok, then I'll change the task: Create a new list with the first 1 or the
second 1 replaced by 2. Now, no difference?

>    - Exactly _because_ there is no notion of identity, and because
>      things that look the same _are_ the same, it is possible for the
>      compiler to make copies of things (or represent them differently
>      at different times during execution).  This is of great value for
>      optimizing compilers.
> 

But *because* there is an identity, the compiler is not free to move
things
around without updating all references to them (else it could happen
that
composed objects *do* change by accident). And this in turn means that
the
objects from the program view are *not* moved around.
Or to say it a different way: A pointer is an object that *points* to
another
object. By doing this, it produces a *relationship* between itself and
this
object. And this relationship makes the object distuingishable from
other
"identical" objects. The fact that pointers are most easily are
implemented as
physical memory address does nothing to the concept (in fact, the
"address"
in modern processors isn't really the address in memory - the object
might
even be swapped out of memory).

For this reason, a perfectly valid C++ implementation would be allowed
to
store f.ex. names in pointers, which then could be looked up in a hash
table
to find the object itself (does this sound somewhat familiar?). The
reason
this is not done is that it would be much slower than the simple
implementation
to store just the address.

>    You always have a memory address even you don't want to have one.
>    This address will identify your object even if you don't want it.
> 
> See, here is the mistake.  If you don't have the concept of identity,
> then the compiler can choose to duplicate things when it needs to, it
> can keep things in registers instead of bundling them up and allocate
> them on the heap, it can use a hash-consing GC that identifies
> lookalikes the programmer didn't think of and represent them by the
> same "pointer" internally, and so on.  Once you do any of this, you
> don't have _one_ pointer that identifies your value -- there might be
> two, or ten, or none at all.
> 

But the compiler still has to keep track of which things belong to the
same
object - i.e. the object identity.
And C++ compilers also are allowed to optimize this way - storing values
in
registers is a common optimization technique in C++ compilers. And all
objects - including pointers - may be optimized away if the compiler
can prove that it doesn't need them to be there. And different variables
may
be stored in the same place under the as-if rule as well, if the
compiler
can proof that it won't change the program's behaviour. Under the as-if
rule,
pointers to different objects may even have the same physical value, if
the
compiler can proof that this won't change program behaviour.

I think the problem is just the (unfortunately very common)
misunderstanding
that a pointer *is* a memory address - it's not more of a memory address
than
the letter 'A' is the number 65: it's how it is (usually) implemented.

A pointer is an abstraction, just as a letter or a number is an
abstraction.
A pointer is the abstraction of the concept "that one".


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

Date: Wed, 30 Apr 1997 09:24:15 -0600
From: "Robert M. Cothren, PhD" <robert_cothren@out.trw.com>
Subject: Perl 5 under IRIX 6.2
Message-Id: <3367641F.446B@out.trw.com>

I need to get Perl 5 running under IRIX 6.2. However, it seems to have a
bunch of configuration problems using the ./Configure script. Can anyone
tell me what magic things I need to do to get it to compile so I don't
have to rediscover everything myself?

Thanks.

-- 
--Robert M. Cothren, PhD------------------robert_cothren@out.trw.com--
  TRW Systems Integration Group
  Advanced Medical Imaging Laboratory            voice: 510 881-0469
--Ogden, Utah--------------------------------------fax: 510 727-9781--


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

Date: Wed, 30 Apr 1997 16:37:13 +0200
From: "Jirtme BELLET" <jbellet@ifhamy.insa-lyon.fr>
Subject: Perl 5.003 "exec" function bug in CGI scripts under AIX
Message-Id: <33675918.41C6@ifhamy.insa-lyon.fr>

When a CGI script that uses the "exec" function to run another script is
called from a browser, it simply doesn't work (under AIX). With older
versions of Perl (<5.003), it worked fine.

How can we solve the problem ? Please help !
-----
jbellet@ifhamy.insa-lyon.fr


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

Date: Wed, 30 Apr 1997 13:51:55 GMT
From: kktan@concentric.net (kim )
Subject: Perl equivalent of "source in c-shell" or "dot command in Korn shell" ?
Message-Id: <5k7ii8$839@nntpa.cb.lucent.com>

Hi there,
        Is there a Perl equivalent of "source command" in c-shell or "dot" 
command in Korn shell ? right now I have to run a shell script with multiple
command, including the "dot" command just because I need to run all those 
in the same shell environment. I will rather do it all in Perl if I know how.
        thanks for any info.

                                                                       


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

Date: Wed, 30 Apr 1997 14:31:15 +0100
From: b.wilkinson@pindar.co.uk (Bob Wilkinson)
Subject: Re: Perl on the Mac - hep me!
Message-Id: <b.wilkinson-3004971431150001@ip57-york.pindar.co.uk>

In article <eyoung-2904970838250001@bopc3.ncsa.uiuc.edu>,
eyoung@ncsa.uiuc.edu (Ed Young) wrote:

> Ok, I'm just learning...know very little...and going nowhere fast.
> 
> I'm learning perl from the "learn Perl" book (the one with the camel)
> This book was written with a unix platform in mind. They don't allow cgi
> on our unix servers so I turned my mac into a server (webstar) and I'm
> learning Perl/finding and trying to get scripts, I find on the web,
> working, so I too can have a guestbook.
> 
> Trouble is, there's enough diffrences between MacPerl and Unix Perl,
> learning this is not the easiest thing. 
> I've tried to take scripts others have made and get them to work on my mac
> with no results.
> 
> Are there any MacPerl scripts out there and where...and where can I find
> something that shows me the diffrences between Unix Perl and MacPerl?
> 
> Thanks

MacPerl FAQ at http://www.connection.co.uk/bob/perl/MacPerlFAQ.html explains
these differences.

Bob

-- 
I have become death, destroyer of the worlds.


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

Date: Wed, 30 Apr 1997 08:59:11 -0500
From: Eric Foster-Johnson <johnsone@camax.com>
To: Grant Totten <grantt@nortel.ca>
Subject: Re: Perl on Win95?
Message-Id: <3367502F.1099@camax.com>

Grant Totten wrote:
> 
> Hi Perl gurus,
> 
> So, is it possible to use perl5 on a Windows 95 platform?
> 
 
Grant,

Perl indeed works on Win32 platforms. You have to be careful
about certain UNIX-isms built into the Perl model, though.
(For example, the process models are different, including
the basicconcept of fork--fork is not supported on Win32.)

For the most part, Perl works great on Win32.

For more information on this, see my Perl on Windows
web page at:

http://www.pconline.com/~erc/perlwin.htm

To download Perl for Win32, see:

http://www.activeware.com/

Hope this helps,
-Eric


-- 
Eric Foster-Johnson http://www.pconline.com/~erc
CAMAX, SDRC's CAM Business
7851 Metro Parkway         phone: +1 612 854 5300 fax: +1 612 854 6644
Minneapolis, MN 55425 USA  johnsone@camax.com


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

Date: Wed, 30 Apr 1997 13:51:57 GMT
From: Steve <steve@mimi.com>
Subject: Perl programmer wanted
Message-Id: <E9GEGB.808@nonexistent.com>

Wanted:  Project-based Perl programmer.  Must be experienced with Perl
5.0 & familiar with running on NT platform.  New York City-based new
media company currently has 2 order-entry system projects that need
immediate attention & completion.  Excellent pay.  Location
unimportant.  Email phil@dcinteractive.com or call 908-530-3290.


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

Date: Wed, 30 Apr 1997 08:03:01 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: automan <automan@umich.edu>
Subject: Re: Pointing a Filehandle _AT_ a Subroutine
Message-Id: <Pine.GSO.3.96.970430075206.29715N-100000@kelly.teleport.com>

On Mon, 28 Apr 1997, automan wrote:

> What I'd like to do is to create a filehandle to a pseudo-pipe that is
> really a subroutine internal to my script. 

> Everything written to FILEHANDLE would then be fed through the
> subroutine. 

How about opening a pipe with an implicit fork, like this?

    $pid = open FILEHANDLE, "|-";
    die "Couldn't fork: $!" unless defined $pid;
    unless ($pid) {
        # Child process here
        while (<STDIN>) {
            #
            # Where should your output go?
            #
            &my_output_handler($_);	# Or whatever
        }
        exit;
    }

Anything printed to FILEHANDLE will be sent to &my_output_handler (in a
separate process), or you can customize it as needed. Hope this helps! 

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: Wed, 30 Apr 1997 11:23:54 -0400
From: Gordon Lee <glee@teir.com>
Subject: Q: How do I ...
Message-Id: <3367640A.428@teir.com>

convert a string to uppercase except for quoted text which may occur 0
or more times within the string?  Example:

$line = <img src="image.gif" align="left">;

The following will work on the above:

$line =~ s/(.*?)(\".*?\")/\U$1\E$2/g;

but won't work on:

<img>

I could do it a character at a time using the quotes as flags, but I was
wondering if there was a single expression to handle this.  TIA.


-- 
Gordon Lee | Thomson Electronic Information Resources |  Voice: (703)
736-1729
           | 205 Van Buren Street                     |    Fax: (703)
736-1750
           | Herndon, VA  22070                       | E-mail:
glee@teir.com


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

Date: Tue, 29 Apr 1997 22:23:50 -0700
From: "Neil Sandow, Pharm.D." <rx@rxlist.com>
To: Eric Harley <erich@powerwareintl.com>
Subject: Re: shtml extension from perl?
Message-Id: <3366D766.7BCD@rxlist.com>

Eric Harley wrote:
> 
> In article <3365A385.4C7@rxlist.com>, "Neil Sandow, Pharm.D."
> <rx@rxlist.com> wrote:
> 
> > I'm currently running a perl script on my website that searches
> > the input (drugname) and outputs the results as an html file
> > with a url which ends with ?drugname   I'd like to modify the script
> > to have the url end with ?drugname.shtml so I can run a server side
> > script with the new html file.  Is adding this .shtml extension easy to
> > do?  Can somebody point me in the right direction?
> 
> $cgi_object->redirect($url);

I thought a redirect would send somebody to an already existing
html page.  Here, the perl/cgi creates a new html document on the fly
and is always different, depending on the input of the user.  All I'm
trying to do is have the name of the resulting url end in .shtml   Is
that what $cgi_object->redirect($url); will do?

Could you possible provide an example of what that line would look like?

Thanks!  -Neil
=================================================================
Neil Sandow, Pharm.D. - RxList : The Internet Drug Index
        http://www.rxlist.com     rx@rxlist.com


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

Date: Wed, 30 Apr 1997 15:55:33 +0100
From: Douglas Seay <seay@absyss.fr>
Subject: Re: sourcing a ksh script within PERL
Message-Id: <33675D65.4AA577B1@absyss.fr>

Doug Olsen wrote:
> 
> I've tried the obvious
> 
> `. /mydir/myEnvironmentFile`
> 
> but the requisite variables cannot be picked up using
> 
> $MYVAR=$ENV{"MYVARENV"}
> 
> I guess I could always parse myEnvironmentFile, but
> it would be more readable if I could source it.

Did I read this correctly?  Did you basically did

	#!/usr/bin/perl
	`. /mydir/myEnvironmentFile`;
	$MYVAR = $ENV{"MYVVARENV"};

and expected something useful to happen?

Sorry, but this doesn't come close to doing anything other than burn CPU
cycles.  This is most likely in a dozen FAQs across Usenet, but I'll
repeat it anyway.  A CHILD PROCESS CANNOT AFFECT THE ENVIROMENT OF ITS
PARENT.  In line 2 you launch a shell, have it source a file.  This
shell is a child process of your Perl script.  It has its own unique
enviroment, it does not share that of its parent.  This shell can change
whatever variables until the cows come home, but it won't affect the
parent process.  This cannot be done.  Give up.  You have to learn to
think multi-process.  Things like this might work using a primitive
monitor OS like those sold by Microsoft, but in the real world (tm) we
don't expect one process to alter another.  That would be bad manners.

As for your idea of loading some sort of script file into a Perl
program, I have to say "huh?".  When coding C do you often use #include
to grab some random scheme or VisualBasic file and expect that to work? 
Would you expect for your ksh program to source a Perl script?  I
shouldn't think so.

Stop, take a step back and think about what you are doing.  Your
solution should be to initialize your environment variable MYVARENV
_before_ you start your Perl script.  Or at least try something like
(untested)

	$ENV{MYVARENV} = `. /mydir/myEnviromentFile; echo $MYVARENV`;

which should work (baring syntax errors) as you use the `` to capture
the output of your little shell script, and that output has what you
want.  Kinda tedious for multiple variables.  And don't forget that ``
doesn't strip end-of-line characters like its cousin in shells do.  Look
for `` in the man pages to see the details.  Its raison d'etre is to
capture output.  Use system() if you want to launch something but don't
care about the output.

- doug

PS - Sorry about being harsh, but seeing another damned frequently asked
question posted by someone with anti-spam crap in his return address is
just too much.  Your timing was bad.

PS2 - I replied to a similiar question a month or two ago and I included
an awk script (ungh) that can convert limited X=Y assignments to several
shell types including comments for modifying it for Perl.  Use dejanews
and get it if you like.  Free of charge and everything.


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

Date: Wed, 30 Apr 1997 09:03:32 -0700
From: Lee Burns <lee.burns@mosby.com>
Subject: Re: Syntax checking?
Message-Id: <33676D54.6712@mosby.com>

Have you tried "perl -c mycode.pl" on Un*x ... other perls may have
built-in checkers to help you pay the syn tax ... 

Good luck

Lee Burns

TCM Online wrote:
> I've started off on a new project from the ground up and now get a
> run error stating I'm missing a right bracket... is there any good
> freeware syntax checkers that will find this for me?
>
> Ernie Johnson


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

Date: 30 Apr 1997 15:32:26 GMT
From: Paul A. Watters <paw24@cam.ac.uk>
Subject: test
Message-Id: <5k7oma$o1o@lyra.csx.cam.ac.uk>

Hi,

Does anyone have a version of aub (aka 'Assemble Usenet Binaries')
which is compatible with Perl 5? All the versions I have found on
FTP sites are 4.036....

Cheers,
Paul



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

Date: Wed, 30 Apr 1997 16:09:49 +0200
From: FABBRETTI Roberto <Roberto.Fabbretti@dim.hcuge.ch>
Subject: URGENT: Building perl 5.003 on Solaris 2.5.1
Message-Id: <336752AD.4EF1@dim.hcuge.ch>

I am desperately trying to build perl 5.003 on our Solaris 2.5.1 systems
and it seems to me that the Configure script does not work because the
makedepend script fails with the folowing message

$make depend
sh ./makedepend
 ./makedepend: /dev/null: cannot execute
 ./makedepend: -f: not found
cp: Insufficient arguments (1)
Usage: cp [-f] [-i] [-p] f1 f2
       cp [-f] [-i] [-p] f1 ... fn d1
       cp -r|R [-f] [-i] [-p] d1 ... dn-1 dn
 ./makedepend: test: argument expected
*** Error code 1
make: Fatal error: Command failed for target `depend'

Using a precompiled perl available on the net is not an option because
it is statically linked and I need to add some modules.


Thanks for any answer

	R. Fabbretti


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

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

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