[10194] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3787 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 22 14:07:32 1998

Date: Tue, 22 Sep 98 11:00:19 -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           Tue, 22 Sep 1998     Volume: 8 Number: 3787

Today's topics:
    Re: already made binaries for DEC_ALPHA? (Steffen Beyer)
    Re: any way to encrypt my script? <tchrist@mox.perl.com>
    Re: any way to encrypt my script? (Abigail)
        Beginners Problem - Printing to a file <smadams@ozemail.com.au>
    Re: Beginners Problem - Printing to a file <evonzee@tritechnet.com>
        Beginners Problem - Running Shell commands in perl <smadams@ozemail.com.au>
    Re: can MSWord and Adobe PDF docs be read for indexing? <JKRY3025@comenius.ms.mff.cuni.cz>
    Re: cat reese > /dev/null (was Re: Perl & Java - differ <borg@imaginary.com>
    Re: Change chars in STDOUT? <Christopher.Marquis@fairchildsemi.com>
    Re: Change chars in STDOUT? <eashton@bbnplanet.com>
    Re: dbi dbd::ORACLE insert questions <eashton@bbnplanet.com>
    Re: even/odd numbers (Steffen Beyer)
    Re: Hidden field??? <mcgrew@alumni.stanford.org>
    Re: I need a script writen, can someone help me please (brian d foy)
    Re: JAPH: how does this .sig work? (Matt Knecht)
    Re: Perl & Java - differences and uses <jdporter@min.net>
    Re: Perl & Java - differences and uses <borg@imaginary.com>
        Q: how to search/replace (s/...) extended ascii charact (Serge G)
        Query WINS (or other NBNS) from NT? <charleskerekes@hotmail.com>
    Re: Shell/System scripts (David A. Black)
        speed of subroutine call vs. call by function reference (John Klassa)
    Re: What happened to perl.moderated? (David A. Black)
    Re: where is Date::Parse? (Abigail)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 22 Sep 1998 15:32:10 GMT
From: sb@engelschall.com (Steffen Beyer)
Subject: Re: already made binaries for DEC_ALPHA?
Message-Id: <6u8ftq$a6n$1@en1.engelschall.com>

In comp.lang.perl.misc Kurt Lange <milkman@dave-world.net> wrote:

> My company is looking for the binaries that are already made for DBI and the
> DEC_ALPHA running vms 7.1.  My company does not want to buy a C Compliler.

Poor company... ;-)

How did you compile Perl in the first place?

> They are not cheap, we are just selling a product in which we don't want to
> require the customer to buy a C Compliler, just to run Perl DBI.  If there
> is someone out there willing to give or sell it to us(depending on the
> price), we would greatly appreciate.  Or maybe there is a free C Compliler
> for the DEC_ALPHA that we don't know about.  If anyone knows of a free or
> cheap C Compliler, we would appreciate knowing about it.

Doesn't the GNU C Compiler (gcc) work on Alpha's, too?!?!

Yours,
-- 
    Steffen Beyer <sb@engelschall.com>
    Free Perl and C Software for Download: www.engelschall.com/u/sb/download/


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

Date: 22 Sep 1998 16:48:14 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: any way to encrypt my script?
Message-Id: <6u8kce$40c$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    pdf@morgan.ucs.mun.ca (Paul David Fardy) writes:
:From FreeBSD manual page on execve(2):
:
:  An interpreter file begins with a line of the form:
:
:  #! interpreter [arg]
:
:  When an interpreter file is execve'd, the system actually execve's the
:  specified interpreter. ...

#!/usr/bin/perl
use Filter::Bytecode;
__END__
M-8M-@^GM-^NM-XM-8^@M-^PM-^NM-@M-9^@^A)M-v)M-^?M-|M-sM-%M-j
M-XM-^NM-PM-^IM-|M-^NM-aM-;x^@^^dM-E7M-1^FM-|WM-sM-%_^_M-FE
0M-RM-M^S1M-RM-1^BM-;^@^BM-4^BM- M-q^AM-M^Ss^LPM-hW^AM-^IM-
AM-,M-^XM-#M-[^AM-^AM-~M-a^As^TM-^Q1M-R0M-[M-^J>M-q^AM-~M-G
 ...

That could esily be compiled bytecode there.  Just because
I have my own virtual machine instead of your firmware's 
virtual machine doesn't change the fact that this too 
is compiled code interpreted by a virtual machine.

--tom
-- 
Lazy people never bother to actually read the manual.  Instead they (like
kids) pick something with big, colorful buttons.
	-- Eugene Tyurin <gene@insti.physics.sunysb.edu> 


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

Date: 22 Sep 1998 17:17:06 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: any way to encrypt my script?
Message-Id: <6u8m2i$5n8$1@client3.news.psi.net>

Paul David Fardy (pdf@morgan.ucs.mun.ca) wrote on MDCCCXLVIII September
MCMXCIII in <URL: news:6u8f3h$7qf$1@coranto.ucs.mun.ca>:
++ Re: compiler vs interpreter
++ 
++ I think several in the "Perl is a compiler" camp are missing the
++ point here.  In terms of this debate, it's the OS's understanding
++ of "interpreter" that counts here.  From Digital UNIX's manual
++ page on execve(2):
++ 
++   An executable text file is one that contains a header line with the
++   following syntax:
++ 
++   #! interpreter_name [ optional_string ]
++ 
++   The #! identifies the file as an executable text file.  The new process
++   image is constructed from the process image file named by the
++   interpreter_name string.  ...

Perl programs certainly do not need #! as first line of the file.
Neither do shell scripts, or awk programs.

++ Still, though, the technical issue is interesting:  While it's true
++ that the */bin/perl we all know--and most here love--does compile the
++ code, is that a requirement of the language?  How hard would be for
++ some random perl programmer--say Larry Wall, for example--to write
++ a perl program that interprets perl programs?

It's already there. It's called "eval".



Abigail
-- 
perl -e '$a = q 94a75737420616e6f74686572205065726c204861636b65720a9 and
         ${qq$\x5F$} = q 97265646f9 and s g..g;
         qq e\x63\x68\x72\x20\x30\x78$&eggee;
         {eval if $a =~ s e..eqq qprint chr 0x$& and \x71\x20\x71\x71qeexcess}'


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

Date: Wed, 23 Sep 1998 03:28:24 +1000
From: "Steve Adams" <smadams@ozemail.com.au>
Subject: Beginners Problem - Printing to a file
Message-Id: <6u8mhc$etm$1@reader1.reader.news.ozemail.net>

Dear All,

Please help me. I just need to know how to redirect the output of a print
statement to a file. Nothing fancy just need to do the following. Obviously
the syntax below doesn't work or I wouldn't be asking.

print "wods and stuff" > filename

It's perl 4.0 that it has to work on.

Any answers would be greatly appreciated.

Thanks
Steve




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

Date: Tue, 22 Sep 1998 12:37:40 -0500
From: Eric Von Zee <evonzee@tritechnet.com>
To: Steve Adams <smadams@ozemail.com.au>
Subject: Re: Beginners Problem - Printing to a file
Message-Id: <3607E064.98C62788@tritechnet.com>

Hi Steve,

This should be what you want....

open (FILE_HANDLE, ">>$filename");  #to append
-OR-
open (FILE_HANDLE, ">$filename"); #to create / overwrite

print FILE_HANDLE "this is the text, and these are the variables $var1 $var2";
close(FILE_HANDLE);

HTH,

Cheers,

-eric

Steve Adams wrote:

> Dear All,
>
> Please help me. I just need to know how to redirect the output of a print
> statement to a file. Nothing fancy just need to do the following. Obviously
> the syntax below doesn't work or I wouldn't be asking.
>
> print "wods and stuff" > filename
>
> It's perl 4.0 that it has to work on.
>
> Any answers would be greatly appreciated.
>
> Thanks
> Steve

--
Best Regards,
Tritech Marketing Inc.

Eric Von Zee
Webmaster




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

Date: Wed, 23 Sep 1998 03:55:27 +1000
From: "Steve Adams" <smadams@ozemail.com.au>
Subject: Beginners Problem - Running Shell commands in perl
Message-Id: <6u8o41$aeh$1@reader1.reader.news.ozemail.net>

I need to be able to run a normal shell command in my perl script. How do I
do this? The command I need to run in the perl script is

ftp -n ftp.ozemail.com.au <script.ftp

Thanks very much for your help

Steve





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

Date: Tue, 22 Sep 1998 19:29:35 -0700
From: Jan Krynicky <JKRY3025@comenius.ms.mff.cuni.cz>
Subject: Re: can MSWord and Adobe PDF docs be read for indexing?
Message-Id: <36085D0F.214E@comenius.ms.mff.cuni.cz>

> On 22 Sep 1998 12:56:44 GMT,
>   scott@softbase.com enlightened us thusly:
> 
> >James T. Vradelis (jvradelis@mediaone.net) wrote:
> >> Pat Trainor wrote:
> >> > They will be residing on a unix box and at my mercy.
> >> You can write msword and excel files using the Win32::OLE module.
> >
> >Not on UNIX!

Agreed.


Are you sure it MUST be a MS Word document? What about RTF?
I am working on a Template::RTF module that would allow you 
to write templates (say in MSWord) including some perl code and some 
other commands in it and then process the template anywhere you like. It
is NOT Win32
only (though some of the predefined commands use Win32::ODBC and
therefore 
templates using them would be Win32 specific.)

You may see a tiny example of the templates at

http://jenda.krynicky.cz/Template.rtf_?sdfg=345456&sdf=234&jenda=dfgdfgdfgh
  (the parameters are only an example !!! Try your own ;-)
and a downloadable copy of the template is at :
 http://jenda.krynicky.cz/Template.rtf

If anyone interested in the beta (but already used in production
environment!)
code, ask me at mailto:Jenda@Krynicky.cz

I do not have anything similar for Excel.

Later, Jenda


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

Date: Tue, 22 Sep 1998 17:43:17 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: cat reese > /dev/null (was Re: Perl & Java - differences and uses)
Message-Id: <VkRN1.1403$Ge.4351102@ptah.visi.com>

In comp.lang.java.programmer Uri Guttman <uri@camel.fastserv.com> wrote:
: tho it is nice to hear that someone has seen his OO code and it is as
: logical as he is.

Abigail is blowing smoke.  At no time has Abigail seen anything
representative of my work.

-- 
George Reese (borg@imaginary.com)       http://www.imaginary.com/~borg
PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
   "Keep Ted Turner and his goddamned Crayolas away from my movie."
			    -Orson Welles


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

Date: Tue, 22 Sep 1998 13:19:54 -0400
From: Christopher Marquis <Christopher.Marquis@fairchildsemi.com>
Subject: Re: Change chars in STDOUT?
Message-Id: <3607DC3A.4BEAF9B6@fairchildsemi.com>

So spawning of stty and changing it outside of the program is the only way of
doing this. There isn't a native Perl way of doing this I take it?

Elaine -HappyFunBall- Ashton wrote:

> Christopher Marquis wrote:
>
> > I'm trying to do a cute little password routine. But I can't think of a
> > way of replacing everything typed to echo back a "*" or something like
> > it instead of what is really being typed.
>
> print "Password: ";
> system ( '/usr/bin/stty -echo -isig' );
> $password = <STDIN>;
> system ( '/usr/bin/stty echo isig' );
> print ( "\n" );
>
> An example that would work on Solaris. man stty.
>
> e.
>
> "All of us, all of us, all of us trying to save our immortal souls, some
> ways seemingly more round-about and mysterious than others. We're having
> a good time here. But hope all will be revealed soon."  R. Carver





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

Date: Tue, 22 Sep 1998 17:37:52 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Change chars in STDOUT?
Message-Id: <3607DE06.18108A51@bbnplanet.com>

Christopher Marquis wrote:

> So spawning of stty and changing it outside of the program is the only way of
> doing this. There isn't a native Perl way of doing this I take it?

It was an example from an old program I had laying around. You could
also use the POSIX module.

e.

"All of us, all of us, all of us trying to save our immortal souls, some
ways seemingly more round-about and mysterious than others. We're having
a good time here. But hope all will be revealed soon."  R. Carver


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

Date: Tue, 22 Sep 1998 17:10:15 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: dbi dbd::ORACLE insert questions
Message-Id: <3607D78D.D6CF111F@bbnplanet.com>

John W. Hamill wrote:

> I have dbi dbd::ORACLE set up with PERL.   I can do
> a select fine.
> I haven't been able to get and INSERT to work.

Try looking a these URLS which are in the DBI.pm.

The dbi-users mailing list is the primary means of communication among
uses of the DBI and its related modules. Subscribe and unsubscribe via:

 http://www.fugue.com/dbi

Mailing list archives are held at:

 http://www.rosat.mpe-garching.mpg.de/mailing-lists/PerlDB-Interest/
 http://outside.organic.com/mail-archives/dbi-users/
 http://www.coe.missouri.edu/~faq/lists/dbi.html

The DBI 'Home Page' (not maintained by me):

 http://www.hermetica.com/technologia/DBI

Other related links:

 http://www-ccs.cs.umass.edu/db.html
 http://www.odmg.org/odmg93/updates_dbarry.html
 http://www.jcc.com/sql_stnd.html
 ftp://alpha.gnu.ai.mit.edu/gnu/gnusql-0.7b3.tar.gz

e.

"All of us, all of us, all of us trying to save our immortal souls, some
ways seemingly more round-about and mysterious than others. We're having
a good time here. But hope all will be revealed soon."  R. Carver


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

Date: 22 Sep 1998 15:27:32 GMT
From: sb@engelschall.com (Steffen Beyer)
Subject: Re: even/odd numbers
Message-Id: <6u8fl4$955$1@en1.engelschall.com>

Someone wrote:

>> >>>"modulus" is of course the easiest and most straightforward way of
>> >>>finding out, but it's hardly the only (although the most obvious way
>> >>>would much simplier if perl had a div command like pascal).

Someone else wrote:

>> >>No, no...
>> >> printf "Number $n is %s\n", $n & 1 ? "odd":"even" ;
>> >>is much easier and more straightforward, not to mention obvious.

>> >Only if you know that numbers are stored in binary. And no what & does which
>> >is a lot less straightforward then the % and / solutions. In fact my
>> >favourite was Tom Christiansen's $r=$n/2;$r=~/\.5$/... or words to that
>> >effect.

>> The mind boggles at someone writing a computer program without
>> knowing that it works in binary or what the most basic binary
>> operations are.  Times change, I guess.

Still someone else wrote:

> Oh, but of course we want portability to ternary machines.

You mean quantum computers, don't you?! ;-)

(Couldn't resist!)

Yours,
-- 
    Steffen Beyer <sb@engelschall.com>
    Free Perl and C Software for Download: www.engelschall.com/u/sb/download/


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

Date: 22 Sep 1998 17:43:39 GMT
From: Darin McGrew <mcgrew@alumni.stanford.org>
Subject: Re: Hidden field???
Message-Id: <6u8nkb$nb3$1@samba.rahul.net>

Eric Von Zee  <evonzee@tritechnet.com> wrote:
>>> 1) Write the user's IP address to a file (or make a file called
>>> "$userip.ip") Have the program create/write this file when a
>>> valid password is entered, and delete it after timelimit or on
>>> logout button

Randal Schwartz wrote:
>> No.  "user" != "ip address".  Any solution with "IP address" as part
>> of it is doomed to fail.

Eric Von Zee  <evonzee@tritechnet.com> wrote:
> How about if we create a file called "$random_number.user".  Pass the
> random number as
> a hidden (and use no-cache to prevens unscrupulous co-worker from
> snooping on the back
> button).  Then, on log out or time out, delete it.  Would that be more
> secure?

Why go through all these contortions?  Why not just use HTTP authentication
and be done with it?
-- 
Darin McGrew, mcgrew@alumni.stanford.org, http://www.rahul.net/mcgrew/

"The man who never makes mistakes never makes much of anything."
                                                     -- Waite Phillips


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

Date: Tue, 22 Sep 1998 13:15:06 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: I need a script writen, can someone help me please
Message-Id: <comdog-ya02408000R2209981315060001@news.panix.com>
Keywords: from just another new york perl hacker

In article <IMDN1.51$q76.212885@nsw.nnrp.telstra.net>, mgjv@comdyn.com.au (Martien Verbruggen) posted:

>In article <36072233.11357840@news.bigpond.com>,
>        guruchoc@bigpond.com (Gareth Hall) writes:
>> It was just a freebie, no great brain power in this one, it's about 1k
>> when finished, I have 90% of it done, just needs tweaking. 

>Advertising that there is 'no great brain power in this one' will most
>likely not exactly get you the best programmers out here running to
>your doorstep, beggin to have a go at it. More likely these people
>will tell you to go away and try it yourself.

brain power can also be measured in clock-cycles - not a feature of
many people that could help in sort a thing ;)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>


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

Date: Tue, 22 Sep 1998 17:33:16 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: JAPH: how does this .sig work?
Message-Id: <wbRN1.559$XP2.4423258@news3.voicenet.com>

Abigail <abigail@fnx.com> wrote:
>++ >perl  -e '$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
>++ >          for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
>++ >          print chr 0x$& and q
>++ >          qq}*excess********}'
>
>++ Using $* is very tricky, especially when combined with the *= operator
>++ and the noise of ****** which could be any string.
>
>No, it cannot.

s/any string/any expression that evaluates to 1/

I glossed over ****** far too quickly.  It dawned on me last night
that this was *main::* ** *main::*.

It's interesting that the parser can't understand *main::*, but has no
problems with **.  The closest I could come (without using **) was 
*main::{'*'}.

>There is more going on that you seem to be aware of.

I'll assume that this is just a typo, and you really meant to say that
I'm not aware of everything going on.

At any rate, I think I'm pretty close.  Here's a slightly modified
version of my first attempt.

$_ = '4a75737420616e6f74686572205065726c204861636b65720a';

for ($x = 1; $x *= 1; $x *= 1) {
    $x *= 1 * s/../"print chr 0x$& and ''"/ee ** 1; 
}

What I also missed the first time around is that this is destructive on
$_, and you need the eval'd string to return a blank string so you don't
accidently add anything back into where the substitution took place.
Without that, the succesful print statement returns a 1, and that gets
substituted in where the match occured (At /^../).  It won't print
because hex 1{anything} isn't printable ASCII.

Of course, I'm probably still wrong...

-- 
Matt Knecht - <hex@voicenet.com>


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

Date: Tue, 22 Sep 1998 13:13:27 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Perl & Java - differences and uses
Message-Id: <3607DAB7.156A9A3B@min.net>

George Reese wrote:
> 
> I have
> not at all engaged in argument based on authority, ad hominem, or circular
> logic. 

You have an amazingly short memory.  Fortunately, Deja News has a very
long memory.


> I may have made some claims that were initially unsubstantiated, but
> I have in turn always followed those up with substantiation.  

ONLY IFF you think repeating a claim constitutes substantiation.
I have not seen one citation to a well-respected authority -- or
to anything else, for that matter -- nor have you proffered one
single snippet of code.   You have not provided any statistical
data, or hard evidence of any kind.  Even your hearsay sounds
highly suspect.


> >The fact that you contradict yourself implies that you're irrational,
> 
> *Supported argument, but invalid*
> 
> Actually, it does not.

"Supported but invalid"?
Time for a remedial rhetoric course, George.


> You can keep your head in the sand, but you cannot change the fact I have
> explained why failing to use established design patterns is voodoo.

"The fact", as you call it, is not.
You have NOT explained why failing to use established design patterns
is voodoo.  You have merely repeated the bald assertion, without
any solid explanation of any kind.


> >  You've made a number of
> > authoritative and objective statements about how OO is mandatory.
> 
> *Unsupported argument*
> 
> No, I have not.

Yes, you have.  Most of this thread has consisted of you preaching
the OO Gospel, and others rebutting it.
Well, except for the more recents posts, which have devolved into
meta-argumentation.


> I have provided arguments to support everything.  

Arguments, yes.  Evidence, no.  Rationale, no.


[Talking about Python being a subset of Perl--]
> Felix Gallo wrote:
> >George Reese wrote:
> > > You are the only person I have ever
> > > heard make this ridiculous claim. 
> > > Even in this thread, no one has tried
> > > that line of argumentation.
> >
> >Mmm, proof by quantity.  You say you studied argumentation where?
> 
> *Argument by implied insult*

(Usually called ad hominem.  But of course, claiming that you're
arguing a proof by quantity is not ad hominem.)

> It is called a preponderance of the evidence.

You have totally missed Felix' point.
You said, "You are the only person I have ever heard..."
And that is a bogus argument -- call it argument by quantity,
or whatever -- because:
a. What you personally have heard or not heard is irrelevant; and
b. Non-existence of evidence is not evidence of non-existence.

So we weren't talking about preponderance at all, oaf.


> You just boldly put forth this
> mini-argument that ignores everything I have stated before.

Since nothing you have stated before is worth anything more
than that.  Provide hard evidence, citations to published works,
something...


> >Please explain who is recognizing you as an expert.  I've never heard
> >of you, and the only person I know who has thinks that you program
> >for MUDs.
> 
> *Question, not an argument*

You are so logic-impaired, George.
Sure, there's a question, but either you answer it, and enlighten
everyone honestly, or it's a rhetorical question, from which you
lose.  Take your pick.

His real argument here is just like the kind you have used:
"I've never heard of..."  -- which, of course, is not an 
effective argument.


> And if I provide
> credentials of my expertise, are you gonna attack me as arguing from
> authority?

Hardly.  I for one would be very glad to see you arguing from a solid,
coherent position.  Credentials count for something.

OTOH, the credential value of having written a popular "FooBar for
Dummies" book should not be overestimated.


>[excessive blather snipped]

-- 
John "Many Jars" Porter


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

Date: Tue, 22 Sep 1998 17:46:06 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <ynRN1.1404$Ge.4351102@ptah.visi.com>

In comp.lang.java.programmer John Porter <jdporter@min.net> wrote:
: George Reese wrote:
:> 
:> Your wonderfully misinterpret these quotes and you leave out the
:> Amazon ranking.  I believe it gets 4 out of 5 stars?

: Actually, the Amazon ranking is almost totally meaningless,
: for the simple reason that readers are far more likely to review
: a book they liked than one they didn't.

You cannot have it both ways.  Either the reviews mean something or
they do not.  You cannot use comments taken out of context of a review
where I got 4 out of 5 stars as evidence of how much a book sucks and
then say well, the good parts of the review don't count.

-- 
George Reese (borg@imaginary.com)       http://www.imaginary.com/~borg
PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
   "Keep Ted Turner and his goddamned Crayolas away from my movie."
			    -Orson Welles


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

Date: Tue, 22 Sep 1998 17:35:52 GMT
From: sergeg@odyssee.net (Serge G)
Subject: Q: how to search/replace (s/...) extended ascii characters?
Message-Id: <3607de98.5368148@192.168.0.1>

Hi, y'all,

Anybody out there kind enough to explain / illustrate how does one
search and replace (Perl Win32, v5.02, methinks) extended ascii
characters? Only hint I got in this NG was how to search and replace
some "owithumlautoverit", using it's hex value, which was not of much
use to me, not knowing the hex values of french extended asciis... :(

Or (wishful thinking mode engaged), any routine out there for
translating extended asciis to their HTML equivalent?

TIA,



/sergeg ;(


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

Date: Tue, 22 Sep 1998 12:49:45 -0500
From: "Charles Kerekes" <charleskerekes@hotmail.com>
Subject: Query WINS (or other NBNS) from NT?
Message-Id: <6u8ns0$1bo$1@supernews.com>

Does anyone know of a way to query a WINS server (or other NetBIOS Name
Server) from a PERL script on NT? I am looking for a quick way to see if a
machine name exists, before mapping drives to it. If I map to a non-existent
server, it takes too long to error out and delays our logon script.

Charlie




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

Date: Tue, 22 Sep 1998 13:30:39 EDT
From: dblack@saturn.superlink.net (David A. Black)
Subject: Re: Shell/System scripts
Message-Id: <6u8mrv$rii$1@earth.superlink.net>

"Bill Jones, FCCJ Webmaster" <webmaster@fccjmail.fccj.cc.fl.us> writes:

>Hi all :]

>I have been working on a perl script that writes shell scripts.
>I am having trouble getting the output to look like:

>flexanlg  -F -n www.fccj.org -x -i \
>access.22Sep-12AM -o \
>Reports/Report.22Sep-12AM.html -c \
>hnrfeuok -t s5m5h10u10a20r10x10 -l c100h500 -p ctl  2>&1

>As you may see, outputting a '\' is not working as expected.

I don't see.  How do you expect it to work?  

Actually, to get your script to output anything like the above,
I had to chomp $source.  But then it did look like the above.
Is that what you meant?


David Black
dblack@saturn.superlink.net


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

Date: 22 Sep 1998 17:30:57 GMT
From: klassa@aur.alcatel.com (John Klassa)
Subject: speed of subroutine call vs. call by function reference
Message-Id: <6u8msh$rp6$1@aurwww.aur.alcatel.com>

I was benchmarking the time it takes to call a subroutine the normal way
vs. the time it takes to use a reference to a function (I was expecting the
former to be faster).  The results were a bit surprising.

Under 5.004_04, I get:

  Benchmark: timing 1000000 iterations of function pointer, subroutine call...
  function pointer:  7 secs ( 7.95 usr  0.00 sys =  7.95 cpu)
  subroutine call:  8 secs ( 8.23 usr  0.00 sys =  8.23 cpu)

Under 5.005_01, I get:

  Benchmark: timing 1000000 iterations of function pointer, subroutine call...
  function pointer: 20 secs (18.92 usr  0.00 sys = 18.92 cpu)
  subroutine call: 18 secs (17.59 usr  0.00 sys = 17.59 cpu)

Both versions of perl were compiled with -O, FWIW.

I am perplexed by two things:

	1.  Why is calling a function via a function reference *faster*
	    than a straight subroutine call in 5.004_04?  Seems like there
	    ought to be an extra level of indirection, and hence a
	    slowdown.

	2.  Why is 5.005_01 so much slower?  In the discussions I'd
	    seen here, the slowdown associated with having threading
	    available (even if not used) was on the order of a few
	    percent -- not 100%!

Can the perl-internals-savvy among us elaborate?

Thanks,
John

For reference, my benchmark code was:

   #!/usr/bin/perl -w

   use strict;
   use Benchmark;

   my $fp = sub { return };
   sub sc { return }

   timethese(1000000, { 'function pointer' => sub { $fp->() },
		        'subroutine call'  => sub { &sc() } });

-- 
John Klassa / Alcatel Telecom / Raleigh, NC, USA <><


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

Date: Tue, 22 Sep 1998 13:03:31 EDT
From: dblack@saturn.superlink.net (David A. Black)
Subject: Re: What happened to perl.moderated?
Message-Id: <6u8l93$o45$1@earth.superlink.net>

Randal Schwartz <merlyn@stonehenge.com> writes:

>>>>>> "Doran" == Doran L Barton <fozz@xmission.xmission.com> writes:

>Doran> sb@engelschall.com (Steffen Beyer) writes:
>>> I was away from mail and news for 3 months; what happened to the RFV
>>> for comp.lang.perl.moderated?

>Doran> comp.lang.perl.misc is moderated now- to an extent. So an additional
>Doran> .moderated newsgroup really isn't necessary.

>Well, you got me on this one.  In what way is comp.lang.perl.misc
>"moderated"?  Certainly not in any way I recognize as moderated. :)

Yeah.  It's not even moderate, let alone moderated.  


David Black
dblack@saturn.superlink.net


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

Date: 22 Sep 1998 17:27:42 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: where is Date::Parse?
Message-Id: <6u8mme$5n8$2@client3.news.psi.net>

Leslie Mikesell (les@MCS.COM) wrote on MDCCCXLVIII September MCMXCIII in
<URL: news:6u73rv$cdj$1@Venus.mcs.net>:
++ In article <6u6lsi$7dg$1@client3.news.psi.net>,
++ Abigail <abigail@fnx.com> wrote:
++ >
++ >*ponder*
++ >
++ >What functionality is in CPAN you can't get with "ftp", "tar", "zcat",
++ >"less", "make", and basic reading skills?
++ 
++ About umpteen thousand less keystrokes to install a reasonable set

That's just keystrokes, not functionality.

++ of modules...  And I don't see any other way to find what CPAN's 
++ 'r' command tells you unless you really like exercising those
++ reading skills by checking all your version numbers against the
++ CPAN directory yourself.

Why? CPAN.pm doesn't go out to a CPAN site and check the version
number of a module. It uses the 02packages.details.txt file.
So can I. I don't need a module to interpret the line
Apache                             1.22  DOUGM/mod_perl-1.15.tar.gz
for me.

++ I had many of the same problems you did with the initial setup, but
++ only on systems behind a filewall where ftp either needed a proxy
++ or passive mode.  Did you perhaps have ftp/lynx/ncftp configured
++ to work under your own user id, but switch to root to run CPAN?

Switching to root to run CPAN? Are you insane? Of course not. I don't
need root to install anything for Perl - it's installed using a
separate uid. And both ftp and lynx work fine for that user.



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


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

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


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 3787
**************************************

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