[12331] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5931 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 9 12:07:20 1999

Date: Wed, 9 Jun 99 09:00:22 -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, 9 Jun 1999     Volume: 8 Number: 5931

Today's topics:
        Accessing a SuperBase database with Perl <pdonahu1@visteon.com>
    Re: Apache Authenticate and CGI <jeromeo@atrieva.com>
    Re: Binary File Uploading (Hasanuddin Tamir)
        Bulletin Board in Perl <Hummert@infantry.usmc.net>
    Re: Calling an applet from perl <greynaga@yahoo.com>
    Re: Converting Perl to C <rootbeer@redcat.com>
    Re: Creating an external config file. How ? (Hasanuddin Tamir)
    Re: Getting HTTP Error 405 (Hasanuddin Tamir)
    Re: HELP:Hash mapping of subroutines with params <aqumsieh@matrox.com>
        How do I change my frameset thru perl shilpa_w@my-deja.com
        keys and multilevel hashes and other things (Steve Vertigan)
        Make COPY/PASTE in Excel With Perl <craye@ugsolutions.com>
    Re: Make COPY/PASTE in Excel With Perl <gellyfish@gellyfish.com>
    Re: Newbie simple question regarding graphics/charts di <rhrh@hotmail.com>
    Re: Perl "constructors" <jdporter@min.net>
    Re: Perl "constructors" <jdporter@min.net>
        perl debugging in emacs <dnp@ams.org>
    Re: Perl on win32 <sb@sdm.de>
        Problem Building Perl 5.005_57 ON AIX <mijmm@hotmail.com>
    Re: Problems sorting.  I'm stupid and I'll die (Larry Rosler)
    Re: quotemeta (Hasanuddin Tamir)
    Re: Strip "http" from URL's (Hasanuddin Tamir)
    Re: Substitution with functions <aqumsieh@matrox.com>
    Re: Substitution with functions (Hasanuddin Tamir)
    Re: Telnet monitor <nico.wieland@ubs.com>
    Re: Using the Net::Ping Module <rootbeer@redcat.com>
    Re: waiting... (Hasanuddin Tamir)
    Re: Why does $blabla = <STDIN> not work in VMS Perl 5? <sterk@ebi.ac.uk>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Wed, 09 Jun 1999 10:52:13 -0400
From: Pat Donahue <pdonahu1@visteon.com>
Subject: Accessing a SuperBase database with Perl
Message-Id: <375E7F9C.1734C023@visteon.com>

I would like to set up an interface to a SuperBase server to retrieve
document info via a Web Browser. This would be a 'read-only' access to
the database.
Are there any DBI modules that would work? My searches turned up null,
even for dbase.
Thanks!
Pat Donahue
pdonahu1@visteon.com



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

Date: Wed, 09 Jun 1999 07:53:18 -0700
From: Jerome O'Neil <jeromeo@atrieva.com>
To: "Chinasee B." <chinaseeb@unocal.com>
Subject: Re: Apache Authenticate and CGI
Message-Id: <375E7FDE.B0E98099@atrieva.com>

I have written a module to control Apache style acl and group lists. 
I'm considering posting it to CPAN, but I don't think it's quite ready
for that, yet, even though it's useable.  Let me know if you'd like it,
and I'll send you a copy.

Chinasee B. wrote:
> 
> I use authentication on Apache to protect my webpage.
> How can I use cgi to check username when user login
> I wan to write cgi for user to change password and profile.
> anyone who experinced this would you please supply me a example source



-- 
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947 
The Atrieva Service: Safe and Easy Online Backup  http://www.atrieva.com


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

Date: 10 Jun 1999 05:59:20 GMT
From: hasant@trabas.co.id (Hasanuddin Tamir)
Subject: Re: Binary File Uploading
Message-Id: <slrn7lsvht.qks.hasant@borg.intern.trabas.co.id>

On Tue, 08 Jun 1999 19:54:21 GMT, Capt. Ry <dfs@thegrid.net> wrote:
> 
> Hello Group,
> 
> I am trying to create a binary upload script using CGI.pm I have tried to
> follow the doc files for CGI.pm but I am running into a 500 internal error.
> My uploaded file is created on my server, but no information is read into
> it. So I get a file name with 0 kb ?? 

Try:

   use CGI::Carp 'fatalsToBrowser';

so you get `Software Error' instead of `500 ...'
along with some explanation.

   perldoc CGI::Carp

or check the syntax with:

   perl -c script_name

or run it from command line.


HTH,
-hasan-
uhm, no more sig(h)


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

Date: Wed, 09 Jun 1999 17:23:09 +0200
From: Christian Hummert <Hummert@infantry.usmc.net>
Subject: Bulletin Board in Perl
Message-Id: <375E86DD.3AD07A4F@infantry.usmc.net>

Hi,

I try to develop a Standart Bulletin Board for my Homepage... (All this
free once are so full of advertisment :-( ) 
I did a Perl CGI Script, but it doesn't work... I don't know why - I
read the source for several 100 times and I can't find any mistake...

Did anyone of you develop a Bulletin Board in the past - and can mail me
the source - so I can see how you worked it out and find some new ideas
for my project...

Thank You...
  Christian Hummert


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

Date: Wed, 09 Jun 1999 14:35:29 GMT
From: Gerardo <greynaga@yahoo.com>
Subject: Re: Calling an applet from perl
Message-Id: <7jlu3g$l2q$1@nnrp1.deja.com>

In article <375e6237.0@news.new-era.net>,
  scott@aravis.softbase.com (Scott McMahan) wrote:
> Gerardo (greynaga@yahoo.com) wrote:
>
> > I'm trying to call an applet from a perl script. I keep getting:
> > "Applet Files class Files could not be loaded"
>
> But your program is a CGI program, and its document base is
> different from regular web pages. Could it be that you need
> to give the complete URL to the class files?
>
> Scott

First of all thank you for your answers.
Reading from cgi-bin/test:
Yes, the server can read from there. I have some other scripts there,
but just to be on the safe side I've copied the files to cgi-bin
directory.

Static web page:
It runs fine if I call it from a plain HTML code. I even tried changing
the applet for a HelloWorld with same results.

URL:
I've tried puting the URL but I may be have the wrong syntax, even
though I tried different ways to write it. What's the right syntax?

Thanx
Gerardo


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Wed, 9 Jun 1999 08:55:31 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Converting Perl to C
Message-Id: <Pine.GSO.4.02A.9906090853580.26349-100000@user2.teleport.com>

On Wed, 9 Jun 1999 cor75@my-deja.com wrote:

> Is there a program that can convert Perl script to C source code?

The FAQ has an entry on this. Does that enlighten you? Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 10 Jun 1999 05:59:11 GMT
From: hasant@trabas.co.id (Hasanuddin Tamir)
Subject: Re: Creating an external config file. How ?
Message-Id: <slrn7lstjt.qks.hasant@borg.intern.trabas.co.id>

On Tue, 08 Jun 1999 07:45:27 +0800, Raj Dutt <raj.dutt@voxel.net> wrote:
> Hi Greg,
> 
> My perl is still a bit iffy, but i'll give it a go.. hope this helps..
> 
> open(INFILE,"configfile.cfg");

   open(INFILE,"configfile.cfg") or die $!;

so you know why if something goes wrong.

> @config_data = INFILE;
> 
> foreach $line (@config_data) {
> 	chomp($line);
> 	if ($line ~= /^#/) next;
> 	($p1,$p2) = split(/ /,$line);
> 	$config_values{$p1} = $p2;
> }

Perl has while as well, and you need the curlies
for if even if it's just one line. But if you
avoid {}, there's other ways.

   while (<INFILE>)  {  # note the angle brackets
      # code here
      next if /^#/;
      # other code
   }

> As you can probably see i've come from a C background but have had to
> pick up perl quickly for a variety of projects.

Reading a bit of the docs might take you a while,
but it's worth. You can start from

   perldoc perl or perldoc perlsyn

At least, check your syntax before executing,

   perl -c script_file_name

it helps a lot.


HTH,
-hasan-
uhm, no more sig(h)


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

Date: 10 Jun 1999 05:59:38 GMT
From: hasant@trabas.co.id (Hasanuddin Tamir)
Subject: Re: Getting HTTP Error 405
Message-Id: <slrn7lt0us.qks.hasant@borg.intern.trabas.co.id>

On Wed, 9 Jun 1999 01:20:44 -0500, Tiny Troll <chess@mocom.net> wrote:
> HTTP Error 405
> 405 Method Not Allowed
> 
> The method specified in the Request Line is not allowed for the resource
> identified by the request. Please ensure that you have the proper MIME type
> set up for the resource you are requesting.

It says that you can use `METHOD=POST',
check your web server configuration since
this has nothing to do with perl.

HTH,
-hasan-
uhm, no more sig(h)


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

Date: Wed, 9 Jun 1999 10:28:55 -0400 
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: HELP:Hash mapping of subroutines with params
Message-Id: <x3yn1y9fnx4.fsf@tigre.matrox.com>


kgentes@gentek.net writes:

> I really like the above usage of hash/procedure
> references, but here is what I want to do
> in the call.  Is this ok?
> 
> ==============================================================
> if ($States{$page}) {
>    $States{$page}->($myvariable, $yourvariable); # call the subroutine
> } else {
>    no_such_page();
> }
> ==============================================================

What happened when you tried? It would've been much easier (and much
much faster) for you to just try it out, than to post, and wait for an
answer.

It works fine.

Ala



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

Date: Wed, 09 Jun 1999 14:50:46 GMT
From: shilpa_w@my-deja.com
Subject: How do I change my frameset thru perl
Message-Id: <7jlv01$lfu$1@nnrp1.deja.com>

My web application has a window that has 3 frames.
When the user clicks on the submit button in the
form in one of the frames, a perl program is
executed that gets the data from the server. I
want to display this data in a new framset that
has only 2 frames. How can I do this?


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Wed, 09 Jun 1999 15:09:34 GMT
From: vertigan@bigfoot.com (Steve Vertigan)
Subject: keys and multilevel hashes and other things
Message-Id: <375e7d81.31158763@news.aurum.net.au>

Is there a way, that I've missed, to run through a multilevel hash, similar
to this...

foreach $key (keys %HASH) { 
    foreach $key2 (keys $HASH{$key}) { } 
    }

So I could get all the $HASH{$key}{'whatever'} values?  I achieved what
needed to be done using Symbolic References and one level hashes but this
would seem a better way to go if it could be done.

Another question if I may, on hashes vs array.  When working on a flat file
database would it be more efficient to load everything into an @array or to
to stick each line in a $DATA{$primary_key} = $restofline; structure?  It
would obviously be easier to work with the hash but I wonder if that would
mean a tradeoff in program speed and memory usage.  Most of my perl
programming is currently CGI scripts which sit on other people's hosts so
I'm always looking for the (quickest|best) way to do things.

And while we're talking about perl and CGI I'll re-ask a question which has
gone unanswered in a CGI group even though it's more appropiate there, so
feel free to ignore it. :-)

I know this is really dependant on various factors but, as a general rule,
what's the largest size text-based datafile you can safely load into memory
when running as a CGI script?  Or at what point does it become preferable to
use an SQL solution.  The most likely scenario for failure that I can think
of would be running under a CGI wrapper like CGIWrap that has imposed memory
or CPU-usage limits on the script in which case I presume the script would
be killed or encounter an error trying to read the file.  Has anyone
experienced hitting such a limit and have wisdom to share?

Anyways this post is getting far longer than it should so I'll give it a
rest here.

Ciao,
--Steve





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

Date: Wed, 09 Jun 1999 16:52:13 +0200
From: Stephane CRAYE <craye@ugsolutions.com>
Subject: Make COPY/PASTE in Excel With Perl
Message-Id: <375E7F9D.7CAB5862@ugsolutions.com>

Hi

How i can coding the function "Copy/Paste" one Excel line with Perl Ole

Thanks

Stephane





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

Date: 9 Jun 1999 16:13:26 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Make COPY/PASTE in Excel With Perl
Message-Id: <375e8496@newsread3.dircon.co.uk>

Stephane CRAYE <craye@ugsolutions.com> wrote:
> Hi
> 
> How i can coding the function "Copy/Paste" one Excel line with Perl Ole
> 

You might find the information that you need in :

<file:///C:/Perl/html/perl-win32/perlwin32faq12.html>

(if you have a recent Activestate distribution)

/J\
-- 
"Malcolm, what have I told you about putting chocolate near your
crotch?" - Mrs Merton


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

Date: Wed, 09 Jun 1999 15:18:47 +0100
From: Richard H <rhrh@hotmail.com>
Subject: Re: Newbie simple question regarding graphics/charts display on an HTML page
Message-Id: <375E77C7.594C1899@hotmail.com>

monsri@my-deja.com wrote:
> 
> Hi here,
> I'm a beginner in CGI, and I'd just like to know whether it's
> easily possible to generate graphics, pie-charts and that
> kind of stuff on an HTML page, thru the means of Perl or
> JavaScript. I know nothing about Java, and I wonder if it's
> possible to do it with Perl and/or JavaScript _ONLY_.
> 
> I'll have to run CGI-generated queries against a database,
> and display the statistical results they'll return as charts.
> 
There is a JavaScript Graph generator available from Netscape but its
rather limited in scope.
With Perl and certain modules it's relatively easy to generate graphs
and pie charts from database retrieved data, though you will need to be
reasonably familiar with Perl first!!

Go to a CPAN site and look for modules such as:
GifGraph.pm and/or Chart.pm for graph plotting and
DBI.pm for database access, read the internal documentation to give
youreself an idea of what they can do.

Richard H


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

Date: Wed, 09 Jun 1999 14:03:36 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Perl "constructors"
Message-Id: <7jls7f$k9b$1@nnrp1.deja.com>

In article <7jl7rs$ds7$1@nnrp1.deja.com>,
  armchair@my-deja.com wrote:
> In article <7jjmn6$s8a$1@nnrp1.deja.com>,
>   John Porter <jdporter@min.net> wrote:
> > they're equivalent, even
> > though they're not the same.
>
> Equivalent say ye? Well, go ahead and post an assembler while, for,
and
> if/else statement for assembler,

These things take more than one line in asm, but so do most things.
Nonetheless, they're equivalent to their C counterparts.
I mean, they're different languages; it would be silly to expect
that what takes one line in one language takes exactly one in any
other language.


> > > > And you're making a mistake to be lumping C/C++ with Perl.
>
> I will believe it to be true when I see your theorem that does so.

In case you don't recall, this was in response to your assertion
that Perl's if/while/for logic was the same as in C/C++.
If you want to be enlightened as to the differences (which can be
pretty subtle, I admit), feel free to read the perl documentation.


> > 	call printf
>
> So you've proven that assembler is not on the same level as C++, or
even
> C. Thanks.

It's hard to argue that asm isn't "lower level" than C; but in
comparison to other languages (like Perl), they're both low-level
languages.  Both C and asm model the real machine.  The machine
that Perl models is not one anyone will be building in hardware
any time soon; in fact it would be much more difficult even than
a Java real machine, which of course is Not There Yet.


> > That's what C's doing under the hood, after all.
> > If I can do it in C, I can do it in asm.
>
> But you didn't do it in asm.

Yes I did -- though it was highly cpu-dependent asm code.


> You needed 4 statements to simulate one,

Apparently you don't know what "simulate" means.
I translated. The two were functionally equivalent.
And if you look at the machine code generated from the C code,
you'll find that it looks an awful lot like the asm that I coded
by hand.


> > 	call read
> > 	pop  returnCode
>
> Again you have proven Assembler to not be the equivalent of C.

No, I've shown they're equivalent, though not identical.


> I give you credit for being
> big enough to disprove you own case.

You're an asshole.


> > > C is much easier to use than assembly,
> >
> > You think I'm advocating the use of asm?!?
>
> You are calling them equivalent buckeroo. That's saying that using one
> is just as good as using the other.

No, that's not what equivalent means.  I would never suggest that
using one is as easy as using the other, nor as good, for most
definitions of "good".


> If not, do give your own definition of equivalent.

Anything you can do in one, you can do in the other.
The mappings between language constructs (or I guess we'll have
to allow idioms, in the case of asm) is clear, predictable, and
easy to automate.  Both languages model the physical machine.
That is why they are both low-level languages.

C gives the programmer no power beyond what he would have with asm.
(Keep in mind, I'm talking only about the languages proper -- not
peripheral issues like development environments and human factors.)


> At one instant you are "not advocating assembler" and on
> the next instance they are at the same level. You will need to explain
> that incongruity, if there is a way.

When a low-level language is necessary (as it often is), I recommend
a portable one with a good library and a good development environment.
Such a choice, however, should not be construed to mean that the
available low-level languages are not equivalent, because they
probably are.  Certainly C and asm are.


> Is a string complex? Is an iostream?

I think iostream is pretty complex, yes.  But that's really
beside the point, because these classes are not part of the C++
language.


> Is a class construct complex?
> Were they implemented in complex ways?

"they"?  The antecedent was singular, so I'm not quite sure what
you're asking here.  But I'll say what I said before, that
giving C++ its support for OO added an awful lot of complexity to
compiler.  And the language is harder to parse, too.  Have you
compared the grammars of C and C++?  I'll bet you have, so you
are dissimulating when you claim that C++ is not significantly
more complex than C.


> Oh, I see, C is just a portable assembler, worth very little,

What does this mean?  You seem to conclude that being an assembler
makes something worth little.  I never said that.  I don't think
value judgements are apropos here, but if you want mine, I like
C.  I think it's great.  And asm has its place.


> but
> something was salvaged from the effort by having it be the basis of
C++.

If you say so.  I never said that.


> Regarding this "portable assembler concept, would you be so kind as to
> give the assembly equivalent of the following C code:

Look at the asm output of your C compiler.

> You've already demonstrated that C is not portable assembler twice,

Quite the contrary.

> Please give the assembler equivalent to the following code.

Look at the asm output of your C compiler.


> That's six lines, and I have put braces on lines by themselves. Let's
> see if you can do it 6 lines in assembler,

The number of lines is irrelevant.


> > C++ semantics are much more complex, and the compiler has to do...
>
> Since we are not discussing compiler design, but language syntax, the
> above comments are irrelevant. As they say - Red Herring.

The complexity of the compiler is utterly dependent on the complexity
of the language semantics.  But I thought you knew that.

A language is not just syntax.  Even so, the syntax of C++ is an
awful lot more complex than C.  Compare the grammars.


> > And I think, if this discussion is to continue, it should be taken
> > to another newsgroup.
>
> let me guess: comp.lang.portable-assembly/c

comp.lang.c, comp.lang.c++.  But thanks for being an asshole.

--
John Porter
Put it on a plate, son.  You'll enjoy it more.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Wed, 09 Jun 1999 14:28:12 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Perl "constructors"
Message-Id: <7jltld$ksi$1@nnrp1.deja.com>

In article <7jl9d5$e9k$1@nnrp1.deja.com>,
  armchair@my-deja.com wrote:
> In article <7jjnr3$sn3$1@nnrp1.deja.com>,
>   John Porter <jdporter@min.net> wrote:
> > In article <7jilf3$fr5$1@nnrp1.deja.com>,
> >   armchair@my-deja.com wrote:
> > > Do elaborate on what you see as the major difference.
> >
> > I'll refer you to the standard Perl documentation.
>
> What pages of the standard Perl documentation, in your opinion,
> best demonstrate it's higher level language status versus C++?

Most of them.  It would probably be more useful for me to tell
which ones to skip.  But the point is, when you know Perl, you
know how it's qualitatively different from low-level languages
and their object-oriented derivatives.  I would encourage you
and anyone else to learn Perl and experience this enlightenment
for themselves.


> And if I speak of datatyping am I not referred to fields.pm, or to
> another module for function overloading, and to a third for operator
> overloading?

I think, if you speak of "datatyping" in relation to Perl, you're
well-advised to mention which, if any, modules you're using to
support it.  There some things which are implemented in the core,
and other things which are made possible, but not implemented except
in external modules.


> Is it me or does Perl seem to be getting lower level?

All those things are necessary in low-level languages, to compensate
for lacking the power found in high-level languages.  So, it's you.


> > Everything I've said about Perl being a HLL is still relevant,
> > even if you only take in the context of comparison to C++.
>
> But you haven't made a case for Perl being a higher level language by
> discussing features.

Sorry if what I said went over your head.  I keep forgetting that
not all my colleagues are computer science graduates.


> ... along with trying to
> downgrade C++ by claiming that you can do the same in Assembly,

Does your C++ compiler have a "generate assembly" option?
If so, then it would be possible for you to write that asm yourself
(though who would want to).  So I'm not simply "claiming"; it's fact.

> and
> trying to downgrade C by calling it merely a portable version of
> assembly language.

I'm not "downgrading" anything.  There's nothing despicable
about being a low-level language.  All these things have there
strengths and their purposes.


> If the Atlantic Ocean had that kind of depth and substance I would
> backpack over to England.

Stop, your wit is killing me.


> > Garbage Collection.
> > Not that a C/C++ programmer would know what that was about.
> >
> With pre-canned objects, C++ programmers are starting to forget what
> memory allocation is about.

Unfortunately, most C++ programmers forget about it when they
shouldn't.  Object allocation and disposition is still a concern in
C++.  This is one of the reasons so many C++ programmers are
switching to Java.

--
John Porter
Put it on a plate, son.  You'll enjoy it more.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Wed, 09 Jun 1999 14:33:48 GMT
From: Dan Pelton <dnp@ams.org>
To: dnp@ams.org
Subject: perl debugging in emacs
Message-Id: <7jlu0c$l0p$1@nnrp1.deja.com>

I am trying to use the perl debugger from inside of emacs.
When ever I redirect stdin to a file, the debugger still
reads from the keyboard.

This is what I type at the "Run perldb :" prompt
     perl test.pl < file

I am using cperl-mode, perl 5.03 and emacs 20.3.1

Any help would be appreciated.

thanks,
Dan Pelton
dnp@ams.org


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 9 Jun 1999 15:59:00 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: Re: Perl on win32
Message-Id: <7jm304$i5n$1@solti3.sdm.de>

In article <375E737E.A1B1AA5F@mail.uca.edu>, Cameron Dorey <camerond@mail.uca.edu> wrote:

> > But is there another way, apart from a "$dummy = <STDIN>;" statement at
> > the end of the script, to avoid the automatic closing of the MSDOS window
> > after the script terminated (on Windows NT 4.0)?

> If you open a DOS window and run your script from the command line,
> instead of clicking on the name in Explorer or using the Start -> Run ->
> {Insert name here} method, the DOS box will not close automatically. You
> (or at least I) absolutely HAVE to do this when you are (I am)
> writing/debugging a script for the obvious reasons.

Yes, of course you can always do that. But then you don't benefit from
the double-click on the program icon at all.

My question was, how can I avoid the automatic closing of the MSDOS window
WHEN I DOUBLE-CLICK the program icon?

Thanks for any help!

Sincerely,
-- 
    Steffen Beyer <sb@engelschall.com>
    http://www.engelschall.com/u/sb/whoami/
    http://www.engelschall.com/u/sb/download/
    http://www.perl.com/CPAN/authors/id/STBEY/
    http://www.oreilly.de/catalog/perlmodger/bnp/


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

Date: Wed, 09 Jun 1999 17:20:43 +0200
From: Michel Minsoul <mijmm@hotmail.com>
Subject: Problem Building Perl 5.005_57 ON AIX
Message-Id: <375E864B.41C6@hotmail.com>

I am trying to build Perl 5.005_57 with Thread support enabled
on AIX 4.1.5 an I get the following error during linkage:


cc_r -c -I../.. -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
-qmaxmem=8192 -DNEED_PTHREAD_INIT -I/usr/local/include -O
-DVERSION=\"0.01\" -DXS_VERSION=\"0.01\"  -I../..  ByteLoader.c
Running Mkbootstrap for ByteLoader ()
chmod 644 ByteLoader.bs
LD_RUN_PATH="" ld -o ../../lib/auto/ByteLoader/ByteLoader.so  -bhalt:4
-bM:SRE -bI:../../perl.exp -bE:ByteLoader.exp -b noentry -lpthreads
-lc_r -L/usr/local/lib ByteLoader.o     
ld: 0711-317 ERROR: Undefined symbol: optype_size
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
make[1]: *** [../../lib/auto/ByteLoader/ByteLoader.so] Error 8


Thanks for your help in advance.


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

Date: Wed, 9 Jun 1999 07:29:41 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Problems sorting.  I'm stupid and I'll die
Message-Id: <MPG.11c81a2f9256207a989b9f@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <7jlrg7$bkg$1@news.mch.sbs.de> on Wed, 09 Jun 1999 13:50:27 
GMT, Michel Dalle <michel.dalle@usa.net> says...
> In article <375e2d3a.4121716@news.demon.co.uk>, stuw@dial.pipex.com.remove.everything.after.com (Stuart Wright) wrote:
 ...
> >I have an array @record which contains about 500 records, each made up of
> >$manufacturer,$model,$rating,$date
> >I need to do a case insensitive sort by $rating.
 ...
> Assuming @records looks a bit like this :
> 
> @records = (
> [ 'man1', 'mod2', 'rat3', '1999/06/10' ],
> [ 'man2', 'mod3', 'rat4', '1999/06/09' ],
> [ 'man3', 'mod4', 'rat5', '1999/06/08' ],
> [ 'man4', 'mod5', 'rat1', '1999/06/07' ],
> [ 'man5', 'mod1', 'rat2', '1999/06/06' ],
> );

That isn't what he said the records were.  They seem to be CSV strings.
The statement above doesn't compile in Perl 4.036, in any case.

> you could try :
> @records = (sort {$$a[2] cmp $$b[2]} @records);

That doesn't compile either.  But this does:

@records = sort { ${$a}[2] cmp ${$b}[2] } @records;

> See, no '->' symbols :-)

And no case-insensitivity, either.

> The Schwartzian transform I showed you a few days ago may not
> work on (very) old Perl versions, but this one should.

I doubt it.

> Have a look at perllol to see how to access and print the resulting
> @records.

Would that really help for archaic Perl?

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 10 Jun 1999 05:59:34 GMT
From: hasant@trabas.co.id (Hasanuddin Tamir)
Subject: Re: quotemeta
Message-Id: <slrn7lt0ol.qks.hasant@borg.intern.trabas.co.id>

On Wed, 09 Jun 1999 05:53:56 GMT,
dalehend@flash.net <dalehend@flash.net> wrote:
> 	
> 
> I have quotemeta to put the backslash before a non-alphanumeric
> character. How about taking it out? Is there a function to take the
> backslash out?

Why you want to do that?


-hasan-
uhm, no more sig(h)


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

Date: 10 Jun 1999 05:59:01 GMT
From: hasant@trabas.co.id (Hasanuddin Tamir)
Subject: Re: Strip "http" from URL's
Message-Id: <slrn7lsse7.qks.hasant@borg.intern.trabas.co.id>

On Mon, 07 Jun 1999 21:17:51 GMT, Kurt Gray <grayku@my-deja.com> wrote:
> 
> 
> This is kind of restrictive matching but fits your examples:
> 
> 	if ($URL =~ /http:\/\/([\w\.]+)(\/?\S*)$/i) {
> 		$Domain = $1;
> 		$RelativePath = $2;
> 	}

Fails on www.what-ever.com, and too noise.

   $url =~ m!^http://[^/]+(/.*)$!;

-hasan-
uhm, no more sig(h)

> > I've been trying to figure out a substitution string that will do the
> > following:
> >
> > Given any URL such as:
> > http://www.whatever.com/whatever/ or
> > http://www.whatever.com/whatever or
> > http://whatever.com/whatever/ or
> > http://www.whatever.com/whatever/whatever.xxx or
> > http://www.whatever.com/
> >
> > Will strip away everything after the actual website, so the output of
> > the above examples would be:
> >
> > /whatever/
> > /whatever
> > /whatever/
> > /whatever/whatever.xxx
> > /
> >



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

Date: Wed, 9 Jun 1999 10:08:12 -0400 
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Substitution with functions
Message-Id: <x3yogipfovn.fsf@tigre.matrox.com>


Herve Foucher <Herve.Foucher___NO_SPAM@helio.org> writes:

> $a_string =~ s/\#\#[^\#.]*\#/&MyPerlFunction($&)/g;

You should be using the /e modifier. Check it out in perlre.

	$a_string =~ s/\#\#[^\#.]*\#/&MyPerlFunction($&)/eg;

HTH,
Ala



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

Date: 10 Jun 1999 06:00:01 GMT
From: hasant@trabas.co.id (Hasanuddin Tamir)
Subject: Re: Substitution with functions
Message-Id: <slrn7lt39r.qks.hasant@borg.intern.trabas.co.id>

On Wed, 09 Jun 1999 07:13:43 GMT,
Herve Foucher <Herve.Foucher___NO_SPAM@helio.org> wrote:
> Hi!
> 
> I would like to substitute a model by a function of this model.
> For example:
> 
> $a_string =~ s/\#\#[^\#.]*\#/&MyPerlFunction($&)/g;

Firstly, you don't need to escape `#'
and you need the /e switch to evaluate the subroutine
(and other statements that need to be evaluated).

   $a_string =~ s/##(\w+)#/&MyPerlFunction($1)/ge;

Now, have MyPerlFunction() routine to process
whatever $1 contains and return the corresponding
string.

Take a look at perlre manpage.

> This looks recursively for ##something# in $a_string but:

The example above assumes that `something' always
contains words chracters.

> << Hello I am ##happy# to receive some ##news# >>
> 
> becomes:
> 
> << Hello I am &MyPerlFunction(##happy#) to receive some
> &MyPerlFunction(##news#) >>

See above.

> Would you know how to force the substitution to JUMP into
> my function to produce this:
> 
> << Hello I am yppah to receive some swen >>

Eh? You just want to reverse those words?


HTH,
-hasan-
uhm, no more sig(h)


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

Date: Wed, 09 Jun 1999 17:09:31 +0200
From: Nico Wieland <nico.wieland@ubs.com>
Subject: Re: Telnet monitor
Message-Id: <375E83AB.133F8AEF@ubs.com>

you could install tcp wrappers..... 

nico


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

Date: Wed, 9 Jun 1999 08:51:53 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Using the Net::Ping Module
Message-Id: <Pine.GSO.4.02A.9906090847481.26349-100000@user2.teleport.com>

On Tue, 8 Jun 1999, Mathieu Carpentier wrote:

> I would like to use the Net::Ping module to ping hosts and retrieving
> stats of the response time. How can I get the minimu, the maximum and
> the average response time.

One way would be to use the methods from section 8 of the FAQ to measure
the time for each ping. But it might be even better to incorporate that
code into a modified Net::Ping. OTOH, it might be best in your situation
to just run your system's ping binary directly. Good luck!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 10 Jun 1999 05:59:50 GMT
From: hasant@trabas.co.id (Hasanuddin Tamir)
Subject: Re: waiting...
Message-Id: <slrn7lt203.qks.hasant@borg.intern.trabas.co.id>

On Wed, 09 Jun 1999 05:58:25 GMT,
outlaw_torn <outlaw_torn@mailexcite.com> wrote:
> Hi all
[snip] 

> Firstly i'd do a system call with an &.  The parse some ps gibberish to
> get the pid, check to see when the pid terminates (more ps parsing) and
> then go on.  If it don't terminate after a while, kill it and go on.
> 
> Thats basically it, any suggestions.

fork(), get the child's pid, exec(), send the pid some signal.
That's basically...

You might want to take a look at some modules from CPAN deal
with this, Proc::*, say Proc::Forkfunc, Proc::Simple, etc.


HTH,
-hasan-
uhm, no more sig(h)


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

Date: Wed, 09 Jun 1999 16:31:45 +0100
From: Peter Sterk <sterk@ebi.ac.uk>
Subject: Re: Why does $blabla = <STDIN> not work in VMS Perl 5?
Message-Id: <375E88E1.B9C0D6EE@ebi.ac.uk>

Thanks, this solved the problem.


> Share what you know. Learn what you don't.
                       ^^^^^^^^^^^^^^^^^^^^

I just did.
 
:Peter


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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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