[7114] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 739 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 16 19:07:20 1997

Date: Wed, 16 Jul 97 16: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, 16 Jul 1997     Volume: 8 Number: 739

Today's topics:
     Re: "Using XS with C++" from perlxs <rroy@wildfire.com>
     Re: [q] building perl5 on irix 6.2 <al@brussels.sgi.com>
     Re: co-routines in Perl <jbokma@caiw.nl>
     Help justify Perl/DBI/CGI solution for large Informix a <ml@au.com>
     Re: How to embed a gif source in perl script ?? (Even Holen)
     Re: How to search ****** <sfairey@adc.metrica.co.uk>
     Re: How to search ****** <rootbeer@teleport.com>
     Re: How to search ****** (Gabor)
     Is Perl 5.004 backwards compatible? <pierre@pobox.com>
     Re: Is Perl 5.004 backwards compatible? <merlyn@stonehenge.com>
     Re: Is Perl 5.004 backwards compatible? <rootbeer@teleport.com>
     Re: Learning Perl ..Help?? <merlyn@stonehenge.com>
     Re: Matching a day inside a given Timeframe (Tina Marie Holmboe)
     Re: Namespace warning in Perl5.004_01 <rootbeer@teleport.com>
     Re: New RDB module: RDB Interactive (rdbi) <Tim.Bunce@ig.co.uk>
     output with Unix commands <jcoursey@sed.nist.gov>
     Parsing boolean logic and converting to SQL? (Antti Tuominen)
     Perl Editors <perrella@ehsn8.cen.uiuc.edu>
     Re: Perl is 20 times slower on Cray J90 than SGI! (Booker Bense)
     PERL WIN32 EDITOR <jpm@iti-oh.com>
     Re: Script CGI to UPLOAD a WEB SERVER (Clay Irving)
     segv in newSV() on AIX 3.2.5.1 <kstevens@globeandmail.ca>
     This is a stupid question, but ... (TColl78218)
     Re: tr.problem (Even Holen)
     Re: Updating other pages with PERL <rootbeer@teleport.com>
     Re: use OR require (suite) <perlprogrammer@hotmail.com>
     WEB ARCHITECT <recruiter@lds.com>
     What's better?.. What's the difference?. perlprogrammer@hotmail.com
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Wed, 16 Jul 1997 15:49:21 -0400
From: Randy Roy <rroy@wildfire.com>
Subject: Re: "Using XS with C++" from perlxs
Message-Id: <33CD25C1.3B4643C3@wildfire.com>

Randy Roy wrote:

> I'm a little confused about this section.
>
> I think I understand the .xs --> .c translation that's going on.
>
> I don't understand the usage model, though.   Is there any other doc
> that contains an sample of perl-->extension-->c++?
>
> Also, are there any pre-conditions, like I have to have made perl with
>
> c++?

  Ok, so I got the linkage figured out, but I now crash in my c++ code
while calling through to a C support library for which I have no
sources.

Has anybody run into static data troubles in this neighborhood?  How
does the dynamically loadable extension model account for static
data/objects?

Am I missing something here?  Thanks.

--rdr



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

Date: Tue, 15 Jul 1997 13:48:32 +0200
From: Alexis Cousein <al@brussels.sgi.com>
To: Peter Lees <peter@junior.next.com.au>
Subject: Re: [q] building perl5 on irix 6.2
Message-Id: <33CB6390.2C67@brussels.sgi.com>

Peter Lees wrote:
> 
> On 14 Jul 1997 01:55:50 GMT, Peter Lees (peter@junior.next.com.au) wrote:
> > i'm having an 'interesting' time building perl on SGI IRIX 6.2
> > with SGI cc.
> 
> > i'm getting lots of warnings about ANSI defines being undefined, but
> > more importantly the DB_File dynamic module doesn't want to build:
> 
> >         Making DB_File (dynamic)
> >         LD_RUN_PATH="/usr/local/lib" cc -o ../../lib/auto/DB_File/DB_File.so  -shared -L/usr/local/lib DB_File.o    -L/usr/local/lib -ldb
> > ld: ERROR 48: Cannot access registry file ./so_locations (No locks available) - ignored.
> > ld: FATAL 51: Can't assign virtual addresses for DB_File.so within specified range.  Please check your registry file ./so_locations.
> > *** Error code 1 (bu21)
> > *** Error code 1 (bu21)
> 
> i found the problem was trying to run ld over a NFS mounted filesystem
> - when i moved to a local filesystem everything worked OK.
> 
Which probably means that lockd/statd wasn't running or broken on the
client or server (esp. in 5.3, you need a lockd patch).

-- 
Alexis Cousein
Sales Support Engineer
Silicon Graphics NV/SA  (Belgium)
in .be domain: al@sgi.be, elsewhere:     al@brussels.sgi.com


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

Date: 15 Jul 1997 23:09:27 GMT
From: "John Bokma" <jbokma@caiw.nl>
Subject: Re: co-routines in Perl
Message-Id: <01bc9174$4473b9c0$c80ab2c2@Tschai>




Tom Phoenix <rootbeer@teleport.com> wrote in article
<Pine.GSO.3.96.970712063115.2012E-100000@kelly.teleport.com>...
> On 10 Jul 1997, Matthew X Economou wrote:
> 
> > You can do co-routines in FORTRAN.
> > You can do them in C.
> > You can do them in Scheme.
> > But can you do co-routines in Perl?
> 
> Probably. What are they?  :-)

Kind of threads (AFIAK). Can I do threads in Perl? (Win32 Perl that
is..)



John


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

Need a Freelance Software Developer (MSc)? (CGI, Perl, Java, C, C++)

http://www.caiw.nl/~jbokma [Java demo's, Curriculum Vitae and
more...]

email: jbokma@caiw.nl  phone: +31 10 4291827



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

Date: Tue, 15 Jul 1997 03:07:52 -0700
From: Mike Linksvayer <ml@au.com>
Subject: Help justify Perl/DBI/CGI solution for large Informix application
Message-Id: <33CB4BF8.4A513AE6@au.com>

I need help justifying the use Perl, DBI, DBD::Informix, and CGI
to implement a large Informix application with a web interface.
The application is for a very large corporation, and will eventually
be accessed from around a thousand locations.

Of most help would be success stories from people who have used
Perl and CGI (and preferably DBI, and DBD::Informix would be awesome)
to create large, heavily used applications.

If demand warrants it, I'll post a collection of responses here
(of course I'll keep a response private if you request it).

Background:  I thought the client had fully accepted Perl for this
application, but now apparently they are wondering why we aren't
using Informix's Web Datablade or some other commercial solution.

Like most large corporations I've seen, they are highly suspicious
about free software, and would much rather use some relatively
untested proprietary solution that some vendor claims to support
and claims is scalable, fast, and easy to develop with all at the
same time.

I've had plenty of experience using proprietary solutions (primarily
Netscape's server side JavaScript, formerly known as LiveWire),
which have proven to be very buggy, have scalability problems,
unflexible (most applications have required additional C++ and/or
Perl code as a workaround), and a pain (not to mention no fun!) to
develop with.

Anyway, thanks in advance for any helpful responses.

--
Mike Linksvayer   http://www.au.com/ml/


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

Date: 15 Jul 1997 13:05:30 GMT
From: evenh@ra.pvv.ntnu.no (Even Holen)
Subject: Re: How to embed a gif source in perl script ??
Message-Id: <slrn5smt9v.gcj.evenh@ra.pvv.ntnu.no>

In article <33CB0F40.957E2893@lmf.ericsson.se>, Harri Vainio wrote:
>My idea would be to include the hex code of the image(Gif) in the perl
>source, but how to tell this to the browser ?? I would be filled with
>thanx to anyone with any information to my problem...

You have several options. One solution is to use the GD-package which
allows you to build a gif image on the fly. Another solution is to let
all the data of the image be after the __DATA__ tag in your file. Then
you might use while (<DATA>) to read this. Like this:

#!/usr/bin/perl

while (<DATA>) {
  print;
}
__DATA_
Just a little test...
And another line...


What data you store after the __DATA__ tag could either be coded or
uncoded. That's dependening on what you want. I guess it's wise to
encode them to say base64 or something similar.

On the subject on how to give a gif image to the browser try
reading/asking in comp.infosystems.www.authoring.cgi. You need to
include a 'Content-type: image/gif' and some more to make it work... But
that's not a perl issue.

Hope this gives you some idea on how to continue your work.

Regards,
Even Holen
-- 
<><   Even Holen, evenh@pvv.ntnu.no, http://www.pvv.ntnu.no/~evenh/   :-)


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

Date: Tue, 15 Jul 1997 10:40:47 +0100
From: Simon Fairey <sfairey@adc.metrica.co.uk>
To: Chao Shao-ju <sc7489@csc.albany.edu>
Subject: Re: How to search ******
Message-Id: <33CB459D.8FE736FC@adc.metrica.co.uk>

Chao Shao-ju wrote:

> Hi,
>
> I tried to search a line that contains more than one star (*)  ,
> using:
>
> if ($line =~ /\*\*/)
> {
> ................
> }
>
> But it does not work. Could anyone......thanks.
>
> =====================
> Chao Shao-ju
> sc7489@csc.albany.edu

The syntax you want is

$line =~ /\*+/

This will match one or more '*', remember if you replace '+' with '*'
everything will match because it will match 0 or more.

Simon



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

Date: Tue, 15 Jul 1997 07:27:44 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Chao Shao-ju <sc7489@csc.albany.edu>
Subject: Re: How to search ******
Message-Id: <Pine.GSO.3.96.970715072357.20153I-100000@kelly.teleport.com>

On Tue, 15 Jul 1997, Chao Shao-ju wrote:

> I tried to search a line that contains more than one star (*)  , using: 
> 
> if ($line =~ /\*\*/)
> {
> ................
> }
> 
> But it does not work. 

Well, you're searching there for two stars. When you say it doesn't work,
what do you mean? Do you mean that it fails to match when you think it
should? It works for me:

    $line = 'this line has two ** stars';
    if ($line =~ /\*\*/) { print "Yep\n" }

Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: 15 Jul 1997 14:39:25 GMT
From: gabor@vinyl.quickweb.com (Gabor)
Subject: Re: How to search ******
Message-Id: <5qg22t$2gq$1@flint.sentex.net>

Chao Shao-ju (sc7489@csc.albany.edu) wrote:
: Hi,

: I tried to search a line that contains more than one star (*)  , using:

: if ($line =~ /\*\*/)
: {
: ................
: }

: But it does not work. Could anyone......thanks.

you want
if($line =~ /\*+/) {
    ...;
}



--
Gabor Egressy : gabor@quickweb.com
    No, I am not going to explain it.  If you can't figure it out, you
    didn't want to know anyway...  -- Larry Wall, 1991


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

Date: Tue, 15 Jul 1997 08:02:32 -0600
From: Pierre Moret <pierre@pobox.com>
Subject: Is Perl 5.004 backwards compatible?
Message-Id: <868971360.30351@dejanews.com>

Hi,

I've been asked to check if Perl 5.004 (or 5.003) is *fully* backwards
compatible with 5.001. A company I'm working for is about to upgrade
(finally!), but they want to be sure their current scripts will still run
under 5.004.

Thanks for any help!
--Pierre, pierre@pobox.com

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


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

Date: 15 Jul 1997 07:17:11 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Is Perl 5.004 backwards compatible?
Message-Id: <8cwwmsjt7c.fsf@gadget.cscaper.com>

>>>>> "Pierre" == Pierre Moret <pierre@pobox.com> writes:

Pierre> I've been asked to check if Perl 5.004 (or 5.003) is *fully*
Pierre> backwards compatible with 5.001. A company I'm working for is
Pierre> about to upgrade (finally!), but they want to be sure their
Pierre> current scripts will still run under 5.004.

There were no deleted features.

However, there *were* many bugs deleted. :-) If your scripts depended
on these bugs, you'd be in for some trouble.

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 413 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: Tue, 15 Jul 1997 07:54:03 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Pierre Moret <pierre@pobox.com>
Subject: Re: Is Perl 5.004 backwards compatible?
Message-Id: <Pine.GSO.3.96.970715074138.20153L-100000@kelly.teleport.com>

On Tue, 15 Jul 1997, Pierre Moret wrote:

> I've been asked to check if Perl 5.004 (or 5.003) is *fully* backwards
> compatible with 5.001. 

No, it doesn't implement 5.001's bugs. Instead, it has a completely
incompatible set of bugs. :-)

No new version of _anything_ is *fully* backwards compatible with the
previous version. But every effort has been made to keep your old scripts
working just as they were, while introducing a few new features. And, my
joking aside, there are many fewer bugs in 5.004 than there were in 5.001. 
Of course, the main incompatibilites are well-documented in the release
notes.

> A company I'm working for is about to upgrade (finally!), but they want
> to be sure their current scripts will still run under 5.004. 

Here's what I always do: I install the new version, but keep the symlink
at /usr/bin/perl pointing at the old version. Then, for any critical
scripts, I test them individually for compatibility with the new version. 
When and if I find anything, I use the information I found to know what to
look for in other scripts, and what to recommend to my users. Finally, I
give the users fair warning and update the symlink. If a user has a script
which can't be updated (for whatever reason), the first line can be set to
"#!/usr/bin/perl5.001" to keep it running on the older version. 

The main thing you're likely to need to fix in older scripts is "funny" 
code, which Perl is more likely to point out to you now. For example,
suppose you had this line in your old code. 

    while ($filename = <*>) {			# Check all files

If warnings are enabled, current versions of Perl should notice that this
construct drops out of the loop early if any file is named '0'. So that
should be re-written like this.

    while (defined($filename = <*>)) {		# Check all files

In short, the incompatibilites are mostly to your advantage. :-)

Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: 15 Jul 1997 05:42:29 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: clin@cs.umd.edu (Charles Lin)
Subject: Re: Learning Perl ..Help??
Message-Id: <8c4t9wlc5m.fsf@gadget.cscaper.com>

>>>>> "Charles" == Charles Lin <clin@cs.umd.edu> writes:

Charles>     I wonder if this is an O'Reilly style?  That is, the
Charles> first chapter is a quick run through everything, and the rest
Charles> of the book deals with smaller portions.  I think it's a
Charles> weird idea, if this is true.  Why try to cram everything into
Charles> one chapter when you should start gently and work your way
Charles> through?  If you need a "do-it-all" chapter, make it an
Charles> appendix, and direct non-beginners there.

It's more of a "randal" style, developed over the 20 years of experience
I've had as a technical writer.  As Steve Talbott (my editor on that book)
worked for me at one time back when I was a real employee, he readily
endorsed the outline as a successful structure.

The first chapter lets the reader discover within the first hour of
reading the book a number of basic concepts about the product, backed
up by a sample walkthrough illustrating said concepts through
examples.  It is not meant as a learning tool -- more of an
*orientation* tool... to let you know if you should even be reading
the book.

I first developed that style when I was writing product
documentation...  on the cover sheet in bold letters it said "if you
don't do anything else, at least read THIS chapter"... because we all
know that nobody reads product documentation all the way through. :-)

If the style has leaked into other ORA books, it's got to be because
Steve's next job after working for me was working alongside Tim
O'Reilly, from whence O'Reilly and Associates has sprung forth. :-)

And just to give original credit where it is due, my mentor Lyle
Settle first pioneered that particular structure, although he'd
probably say I made it practical.  (That's the "Lyle" in "thanks to
Lyle and Jack" line from the classic Camel and Llama forewords.)

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 413 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: 15 Jul 1997 11:49:14 GMT
From: tina@scandinaviaonline.se (Tina Marie Holmboe)
Subject: Re: Matching a day inside a given Timeframe
Message-Id: <5qfo3q$1lp@news1.sol.no>

In article <33CB219F.661C@bnr.ca>,
	Gregor Binder <binder@bnr.ca> writes:


> Situation:
> I have a Database that holds - among other
> Information - dates.
> 
> Task:
> Find all Database Entries the date of which
> is inside a given Start- and Enddate.

  Usually, when handling dates, the standard libraries which Perl provide
are doing their job.

  However, date handling in Perl *is* rather easy: store the dates in the
format returned by time(), ie. the number of seconds since 00:00:00 Jan 1
1970.

  This, being a rather large integer, can easily be used for calculating
such intervals as you seek.

  Good luck !

--
 Tina Marie Holmboe                          tina@mail.scandinaviaonline.se

 The opinions expressed above are mine, and should in no way or under any
 circumstances be associated with Scandinavia Online AB unless this disclaimer
 is explicitly revoked.


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

Date: Tue, 15 Jul 1997 07:23:13 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Anatol Filin <anatol@ml.com>
Subject: Re: Namespace warning in Perl5.004_01
Message-Id: <Pine.GSO.3.96.970715071228.20153H-100000@kelly.teleport.com>

On Tue, 15 Jul 1997, Anatol Filin wrote:

> I got this warning
> 
>     "my" variable $PACK_NAME masks earlier declaration in same scope at
> twarning.pl line 7.

>     package One;
>     my $PACKAGE_NAME = "One";
> 
>     package Two;
>     my $PACKAGE_NAME = "Two";

Yes, that warning is correct. 

perlfunc explains:

    A package statement affects only dynamic variables--including those
    you've used local() on--but I<not> lexical variables created with
    my().

Since a package directive neither starts nor ends a scope, those my
variables are in the same scope. You can create a scope by using a
naked block, which might be what you're looking for. (package directives
may be used within the inner scope as well.)

    my $variable = 'I am a variable in the outer scope.';
    {
	# This is a new scope
	my $variable = 'I exist only in the naked block.';
    }

Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 16 Jul 1997 14:11:49 GMT
From: Tim Bunce <Tim.Bunce@ig.co.uk>
Subject: Re: New RDB module: RDB Interactive (rdbi)
Message-Id: <EDF0rp.JEt@ig.co.uk>

In article <199707152217.PAA06799@id.rand.org>,
Walt Hobbs <hobbs@rand.org> wrote:
> What RDB is:
> 
> RDB is a fast, portable, Relational DataBase Management System without
> arbitary limits, (other than memory and processor speed).
> 
> RDB uses the 'operator/stream' DBMS paradigm described in Unix Review,
> March, 1991, page 24, entitled A 4GL Language.  The operators are UNIX
> filters, i.e. they read STDIN and write STDOUT so they can be connected
> by pipes (the '|' char).
> 
> The operators work with relational data in ascii files.  The fields in
> each row are separated by a 'TAB' char and the row is terminated with
> a 'NEWLINE' char.  The first section of rows (the header) contains the
> names and data definitions for each column.  The header also contains
> optional embedded documentation relating to the entire datafile and/or
> each data column.  Subsequent rows (the body) contains the data values.
> A file in this form is said to be an 'rdbtable'.  RDB is compliant with
> the Relational Model.
> 
> There are currently 22 RDB modules (operators and utilities) written
> in PERL.

I'd be _very_ grateful if someone would write a DBD::RDB driver
module for the DBI.

Tim.



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

Date: Tue, 15 Jul 1997 10:44:22 -0400
From: Jack Coursey <jcoursey@sed.nist.gov>
Subject: output with Unix commands
Message-Id: <33CB8CC6.41C6@sed.nist.gov>

I'm using fgrep to search some files.

$fgrep = "/usr/bin/fgrep";
open (SEARCH, "$fgrep $query, @searchfiles |);

I would like to print the output to a file instead of to the screen.
How do I do this?

Thanks in advance,

Jack


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

Date: 15 Jul 1997 10:15:07 GMT
From: d74403@majakka.uwasa.fi (Antti Tuominen)
Subject: Parsing boolean logic and converting to SQL?
Message-Id: <5qfijb$ihb@verkko.cc.uwasa.fi>

I'm doing a database query www interface with perl and need to be able
to process boolean queries like: "NOT L=a AND ( A=b OR A=c )", where L
and A are fields in the database. I need to parse this query string
and convert it to a SQL query.

I was wondering if someone had done something even remotely similar
and could give me some hints or even some code to do this. I figure
that every search engine supporting boolean queries must do this sort
of thing and if someone has already done this there's no use for me
to reinvent the wheel.

Please, email me any thoughts about this. Thanks!

--
Antti J. Tuominen, d74403@uwasa.fi


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

Date: Tue, 15 Jul 1997 07:49:54 -0500
From: perrella andrew c <perrella@ehsn8.cen.uiuc.edu>
Subject: Perl Editors
Message-Id: <Pine.SOL.3.95.970715074758.8627A-100000@ehsn8.cen.uiuc.edu>


Hi,

	Does anybody know of any programming editors for perl.  I am just
looking for simple text editor that colors codes important stuff like sub,
{, $, @, etc..

thanks, 

Andrew Perrella
perrella@uiuc.edu
 



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

Date: 15 Jul 1997 14:36:16 GMT
From: bbense@telemark.stanford.edu (Booker Bense)
Subject: Re: Perl is 20 times slower on Cray J90 than SGI!
Message-Id: <5qg1t0$ahj$1@nntp.Stanford.EDU>

In article <33C669DF.35F204C3@hotmail.com>,
Scott Blanksteen  <sibsib@hotmail.com> wrote:
>Brett Denner wrote:
>> and the following C program (compiled with "cc prog.c -o prog"):
>> 
>>   void main()
>>   {
>>       int i; float a;
>>       for (i=0; i <= 1000000; i++)
>>           { a = 0; }
>>   }
>
>Brett - 
>
>Does your C compiler optimize this away?  (Wouldn't explain why 
>Perl's speed differs so btw the two machines, but might explain why
>Perl is so much slower than C...)

- Yes the Cray C compiler completely ignores this.  Any variable that
doesn't get input/output or sent to a subroutine never even gets
allocated, much less manipulated. Perl will never be cost effective as
a number cruncher on a Cray Vector machine.  You might look at some of
the (PDL)? stuff, I think that has linked C libraries for doing heavy
duty number crunching with perl as the glue language. You're still
going to pay a high over head for the data conversion.

- Char ptr's and Crays don't play nice together. Any code that 
depends heavily on char ptr's will never run as fast as it can 
on a heavy duty workstation like an SGI or UltraSparc. A trick you can 
use is to convert all the char ptr's to int's or even better integer
arrays. This will increase memory usage 4x, but it gives the compiler
at least a chance of producing code that can use the vector processor. 

- The cray vector processor was designed to crunch the bejezuz out of
Fortran DO loops. The only way to get your money's worth is to make 
your code look like fortran DO loops. Cray provides lots of tools 
to make this process much less painful than it used to be. 

- Booker C. Bense : bbense@stanford.edu 


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

Date: 15 Jul 1997 13:31:36 GMT
From: "Joshua Marotti" <jpm@iti-oh.com>
Subject: PERL WIN32 EDITOR
Message-Id: <01bc9123$65d19c50$36601ec6@bach>

This is the last time I send this...
Xemacs for win32 is called w32jed
it is located at
http://space.mit.edu/~davis/jed.html
you can get perl mode for it and it works quite well (even for something
like =~/.*\s\//)



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

Date: 15 Jul 1997 08:42:05 -0400
From: clay@panix.com (Clay Irving)
Subject: Re: Script CGI to UPLOAD a WEB SERVER
Message-Id: <5qfr6t$hb4@panix.com>

In <33CA1105.167E@sesm.it> Loredana De Dominicis <lory@sesm.it> writes:

>I'm trying to write a PERL 4 CGI that permits
>to upload a Web Server.
>Is it possible to download it from Internet?

There are a few scripts listed in the CGI section of Perl Reference
<http://www.panix.com/~clay/perl/query.cgi?cgi>.

-- 
Clay Irving                                        See the happy moron,
clay@panix.com                                     He doesn't give a damn,
http://www.panix.com/~clay                         I wish I were a moron,
                                                   My God! Perhaps I am!


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

Date: Tue, 15 Jul 1997 10:39:58 -0400
From: Ken Stevens <kstevens@globeandmail.ca>
To: kspeicher@globeandmail.ca, ylu@globeandmail.ca, bclaus@globeandmail.ca, perlbug@perl.com
Subject: segv in newSV() on AIX 3.2.5.1
Message-Id: <33CB8BBE.C7FE5F98@globeandmail.ca>

The following segmentation violation occurs randomly approximately once
every 30-60 times we run a short perl program.  We hired AIX specialists
from IBM to study the machine this perl script was running on to
determine whether the error could be associated with a problem with the
hardware or operating system.  They found nothing.  I re-compiled perl
changing over to the built-in malloc in the hopes that a buggy AIX
malloc was the cause of the problem--to no avail--the segv persisted. 
Note that because of other software running on the machine, we can not
upgrade to a later version of AIX.

segmentation violation in Perl_newSV at 0x10006dd0
0x10006dd0 (Perl_newSV+0x30) 80ff0000        lwz   r7,0x0(r31)
(dbx) where
Perl_newSV(0x20070c50) at 0x10006dd0
Perl_pp_split() at 0x1006f800
Perl_runops() at 0x1005f8c8
perl_run(0x20070c50) at 0x1000bf4c
main(0x20070c50, 0x2011fbef, 0x20070c4c) at 0x1000030c
(dbx) quit
~ cww> perl -v

This is perl, version 5.003 with EMBED
        built under aix at Jun 19 1997 17:03:53
        + suidperl security patch


Here's the segment of code which contains the erronious call to split()
which dumps core.  Nothing special here.  It splits filenames on '#'
characters.

sub rename_directory {
    my($dir) = @_;
    my $filename;       
    my $SN;
    my $error;

    mkdir("$OUTROOT/$dir/$date", 0755);

    opendir(INROOT, "$INROOT/$dir");

    for $filename (readdir(INROOT)) {

        next if $filename =~ /^\./;
        my ($dummy, $PR, $DU, $SU, $SN, $SC, $HS, $dummy, $DP, $DQ, $DC)
= split(/\#/, $filename);
        $SN =~ s/^SN://;
        $HS =~ s/^HS://;
        
        `cp -pf $INROOT/$dir/$filename $OUTROOT/$dir/$date/$SN`;
        unlink("$INROOT/$dir/$filename");
    }

    closedir INROOT;    

}

--
Ken Stevens, Internet Software Developer       THE GLOBE AND MAIL
voice: 416 585 5392	        444 Front St. W, Toronto, On, M5V 2S9


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

Date: 15 Jul 1997 14:35:26 GMT
From: tcoll78218@aol.com (TColl78218)
Subject: This is a stupid question, but ...
Message-Id: <19970715143500.KAA05975@ladder02.news.aol.com>

I am relatively new to perl programming, and I'd like to create a script
to return a page based on what type of browser a client has. I have the
script written, but I have a pretty simple problem. How do I call the
script so that it executes before they get to the page? Like I said, it's
a stupid question, but I am a newbie here...


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

Date: 15 Jul 1997 13:28:55 GMT
From: evenh@ra.pvv.ntnu.no (Even Holen)
Subject: Re: tr.problem
Message-Id: <slrn5smulr.gcj.evenh@ra.pvv.ntnu.no>

In article <33cce76f.34215056@news.prodigy.net>, Fan Ng wrote:
>Hi all:
> I had seem a example in book whick is
> tr[\200-\377]
>   [\000-\177];  #delete 8th bit     
>
>I don't know that delete 8th bit means and why in the [ ] need \ in front of
>number?? Thank you
>fanng@prdigy.net

A number with \ in front is to interpreted as an octal number. The
example therefore translates every character within the range \200-\377
which is 128 to 255 in decimal, to the the range \000-\177 which is
0 to 127 in decimal. This is an operation equal to removing the 8th bit
if we were looking on the binary value of this numbers.

If you still don't understand it please lookup documentation on how to
represent numbers in different bases. Look especially on binary and
octal representation.

Regards,
Even Holen
-- 
<><   Even Holen, evenh@pvv.ntnu.no, http://www.pvv.ntnu.no/~evenh/   :-)


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

Date: Tue, 15 Jul 1997 07:39:14 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Orlando Frooninckx <of@lms.be>
Subject: Re: Updating other pages with PERL
Message-Id: <Pine.GSO.3.96.970715073629.20153K-100000@kelly.teleport.com>

On Tue, 15 Jul 1997, Orlando Frooninckx wrote:

> Can someone tell me whether it's possible to update pages on an other
> server using PERL? 

Sure it is. You simply (possibly by invoking a module) implement a
protocol to tell the server how to update the file. Some common protocols
used for this sort of thing are FTP and HTTP. Hope this helps! 

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 15 Jul 1997 03:25:08 -0700
From: perl guy <perlprogrammer@hotmail.com>
Subject: Re: use OR require (suite)
Message-Id: <33CB5004.726F@hotmail.com>

Joelle D'Antin & Nicolas Gregoire wrote:
> 
> I call my libarry with :
> require '/users/dantin/perl/biblios/recherche_par_prenom.pl';
> 
> help me.

um...????.. 

$file = "/path/to/file.pl";

require("$file") || die "Could not get file";

You can try that.. it should tell you if it's working...


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

Date: Tue, 15 Jul 1997 09:02:55 -0400
From: Recruiter <recruiter@lds.com>
Subject: WEB ARCHITECT
Message-Id: <33CB74FF.298F@lds.com>

Logical Design Solutions, a leader in the design and development of
Interactive Business Communications has an immediate full-time opening
in their Morristown, NJ office for a Web Architect.

Job Description:
In this visible role, the ideal candidate will possess experience in
configuration of Internet technologies as part of a multi-tiered     
information technology architecture.  Keeping up-to-date with
current technology trends is essential, as is the ability to evaluate
appropriate technology components for development and delivery
environments.  This individual must also have the ability to integrate
application support technologies with preexisting client IT 
infrastructure.  Experience with C/C++, Perl, HTML, Java, CGI and
knowledge of Internet protocols and standards is required.  
Knowledge of Active X a plus.

Contact:

Technical Recruiter
Logical Design Solutions
Phone: (201) 971-0100
Fax:   (201) 971-0103
email: recruiter@lds.com

For further info:   http://www.lds.com


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

Date: Tue, 15 Jul 1997 06:02:40 -0600
From: perlprogrammer@hotmail.com
Subject: What's better?.. What's the difference?.
Message-Id: <868964018.26540@dejanews.com>

## Instead of typing this...
if ($something ne "")

##Couldn't I just type this?..
if ($something)

# but then if so, what would the best idea for
if ($something eq "")

#what would be equal to nothing? I'm dealing with numbers and characters,
etc..

# Also, What's better? Rather, what's the difference in this?

$msg_to_read = $user_last_read + 1;
$msg_to_read -= $how_many_old;
if ($msg_to_read < 1)
   {
    $msg_to_read = 1;
   }
if ($high_message >= $msg_to_read)
    {
     for ($x = $high_message; $x >= $msg_to_read; $x--)
      {
########### this...
        $x = sprintf("%6d",$x);
        $x =~ tr/+/ /;
########### Or this ...
        $x = sprintf("%6d",$x);
        $x =~ tr/ /0/;
#### what's better? what's the differnce?..
        if (-e "$dir/$x.msg")
          {
           open(MSG,"$dir/$x.msg") |


if ($function ne "")
   {
    $message eq "EVERYONE";
    $high_number = &GetHighMessageNumber;
    $high_number++;
###This...
    $high_number = sprintf("%6d",$high_number);
    $high_number =~ tr/ /0/;
#####Or this....
    $high_number = sprintf("%6d",$high_number);
    $high_number =~ tr/+/ /;
## Is there any differnce?
    open(FILE, ">$path/$file.msg");
    print FILE

can I change the order of messages with this?.. I.e., from newest at the
bottom and oldest at the top? This order makes sense to me, to read from
oldest to newest info, yet not many people do that?..

Anyway, I assume the above doesn't make any difference at all?.

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


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

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

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