[10323] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3915 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 7 12:07:54 1998

Date: Wed, 7 Oct 98 09:00:28 -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, 7 Oct 1998     Volume: 8 Number: 3915

Today's topics:
    Re: "Many Jars" Mystery (Joergen W. Lang)
    Re: "Many Jars" Mystery <john.b.hagen@boeing.com>
    Re: "Many Jars" Mystery <john.b.hagen@boeing.com>
        *quick q:* how to escape a query string? <mblase@ncsa.uiuc.edu>
    Re: *quick q:* how to escape a query string? <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: *quick q:* how to escape a query string? (Sean McAfee)
    Re: *quick q:* how to escape a query string? <mblase@ncsa.uiuc.edu>
    Re: *quick q:* how to escape a query string? (Doran L. Barton)
    Re: *quick q:* how to escape a query string? (Sean McAfee)
    Re: =?iso-8859-1?Q?Portugu=EAs?= <evonzee@tritechnet.com>
    Re: Are there any "perl.newbie" group or forum? (Shambo Pfaff)
    Re: Are there any "perl.newbie" group or forum? (John Moreno)
    Re: Bug in open(FH,"| script") ? <r28629@email.sps.mot.com>
    Re: Can Perl Change Current Drive? (Dermot McKay)
    Re: Can Perl Change Current Drive? (Jeffrey Drumm)
        Compiling 5.005_2 <weitz@goya.informatik.rwth-aachen.de>
        Extracting n-grams and words that contain them (William P Shaw)
    Re: ftp within a perl program (Jeffrey Drumm)
        HELP! CAN'T GET PERL SCRIPTS TO RUN ON NT SERVER 4!!! <adrian@pearl.demon.co.uk>
    Re: HELP! CAN'T GET PERL SCRIPTS TO RUN ON NT SERVER 4! (Larry Rosler)
    Re: HELP! CAN'T GET PERL SCRIPTS TO RUN ON NT SERVER 4! pfeilgm@jmu.edu
    Re: How to pass an array in AND out of a subroutine? <tchrist@mox.perl.com>
    Re: How to write a MS Excel file pramsey@iname.com
    Re: I have installed Linux. Now what? (Thomas Weeks)
    Re: IDE for Perl <tchrist@mox.perl.com>
        Metasearch engine and Compare (Bill)
    Re: Optmizing regex search in a large array (from a has <tringali@ed.ray.com>
    Re: Perl as a dumb terminal (Robert Bell)
    Re: Perl Cookbook, does anyone have it? <erich@orator.usma.edu>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Wed, 7 Oct 1998 15:03:11 +0100
From: jwl@_munged_worldmusic.de (Joergen W. Lang)
Subject: Re: "Many Jars" Mystery
Message-Id: <1dgj95r.wjpl31bfhveoN@host035-210.seicom.net>

Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> wrote:

> Paul Makepeace wrote:
> 
> > I _knew_ someone would say that. IMO/E, that interpretation is only in
> > common parlance among, er, geeks.
> 
> Probably true. 
> 
> > Nah, that's country talk.
> 
> I ain't never heard no hillbilly sidle up to the bar and ask fer a yard.
> ;)
> 
Huh ? There are quite some pubs in Germany where you can order a "meter"
of beer. Many jars (I think 21) served on a wooden board, one metre in
length. Still better than drinking straight from the bitbucket...(or
what's the name ?) ;-)

For that I like the metric system.
 

Joergen
-- 
  To reply by email please remove _munged_ from address Thanks !
-------------------------------------------------------------------
   "Everything is possible - even sometimes the impossible"
             HOELDERLIN EXPRESS - "Touch the void"


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

Date: Wed, 7 Oct 1998 14:24:36 GMT
From: John Hagen <john.b.hagen@boeing.com>
Subject: Re: "Many Jars" Mystery
Message-Id: <361B79A3.7A5602DF@boeing.com>

George C. Hetrick wrote:
> 
> >In article <6vdm5d$a9l$1@nnrp1.dejanews.com>, ptimmins@netserv.unmc.edu
> >(Patrick Timmins) wrote:
> >
> >+ Could this explain the "Many Jars" mystery?
> >
> 
> John Many Jars was one of the lectroids in _Buckaroo_Banzai_, yes?
> 
> (Along with John Yaya and John Smallberries...)

Yes! And John Bigbooty...

Cheers,
-- 
john "Largemouth" hagen - john.b.hagen@boeing.com
====================================


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

Date: Wed, 7 Oct 1998 14:27:20 GMT
From: John Hagen <john.b.hagen@boeing.com>
Subject: Re: "Many Jars" Mystery
Message-Id: <361B7A48.CFA8146A@boeing.com>

Joergen W. Lang wrote:
> 
> Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> wrote:
> 
> > Paul Makepeace wrote:
> >
> > > I _knew_ someone would say that. IMO/E, that interpretation is only in
> > > common parlance among, er, geeks.
> >
> > Probably true.
> >
> > > Nah, that's country talk.
> >
> > I ain't never heard no hillbilly sidle up to the bar and ask fer a yard.
> > ;)
> >
> Huh ? There are quite some pubs in Germany where you can order a "meter"
> of beer. Many jars (I think 21) served on a wooden board, one metre in
> length. Still better than drinking straight from the bitbucket...(or
> what's the name ?) ;-)
> 
> For that I like the metric system.

In England, they have a very tall, thin-stemmed glass (resembles a vase)
called a yard. Tradition holds that one must drink the yard all at once.
It takes a lot of stamina, breath control and capacity.

Obviously, England has not caught up to the metric system... :-)

Cheers,
-- 
john hagen - john.b.hagen@boeing.com
====================================


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

Date: Wed, 07 Oct 1998 09:28:34 -0500
From: Marty Blase <mblase@ncsa.uiuc.edu>
Subject: *quick q:* how to escape a query string?
Message-Id: <361B7A92.7AA296E4@ncsa.uiuc.edu>

Stupid question time, but I'm stumped: what's the easiest way to escape the
characters of a string in perl so that they can be placed in a URL query
string?


- Marty Blase


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

Date: 07 Oct 1998 16:44:25 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: *quick q:* how to escape a query string?
Message-Id: <83soh0ig8m.fsf@vcpc.univie.ac.at>

Re: *quick q:* how to escape a query string?, Marty
<mblase@ncsa.uiuc.edu> said:

Marty> Stupid question time, but I'm stumped: what's the
Marty> easiest way to escape the characters of a string in
Marty> perl so that they can be placed in a URL query
Marty> string?

perldoc URI::URL
perldoc URI::Escape

hth
tony
-- 
Tony Curtis, Systems Manager, VCPC,    | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien,  | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!  | private email:
    Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>


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

Date: Wed, 07 Oct 1998 14:56:30 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: *quick q:* how to escape a query string?
Message-Id: <yiLS1.575$fS.1380704@news.itd.umich.edu>

In article <361B7A92.7AA296E4@ncsa.uiuc.edu>,
Marty Blase  <mblase@yahoo.com> wrote:
>Stupid question time, but I'm stumped: what's the easiest way to escape the
>characters of a string in perl so that they can be placed in a URL query
>string?

Use the URI::Escape module, part of the libwww distribution, found at a
fine CPAN site near you.

Or, do it yourself:

$data =~ s/ ([^\x20-\x7e]) / sprintf "%%%02X", $1 /gsx;

(URI::Escape should be faster than this.)

-- 
Sean McAfee | GS d->-- s+++: a26 C++ US+++$ P+++ L++ E- W+ N++ |
            | K w--- O? M V-- PS+ PE Y+ PGP?>++ t+() 5++ X+ R+ | mcafee@
            | tv+ b++ DI++ D+ G e++>++++ h- r y+>++**          | umich.edu


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

Date: Wed, 07 Oct 1998 10:02:47 -0500
From: Marty Blase <mblase@ncsa.uiuc.edu>
Subject: Re: *quick q:* how to escape a query string?
Message-Id: <361B8297.EF3C6CE4@ncsa.uiuc.edu>

I'm afraid my Perl5 literacy is still rather lacking... is this the right
syntax?

use URI::Escape;
$refer = Escape($refer);

- Marty




Sean McAfee wrote:
> 
> In article <361B7A92.7AA296E4@ncsa.uiuc.edu>,
> Marty Blase  <mblase@yahoo.com> wrote:
> >Stupid question time, but I'm stumped: what's the easiest way to escape the
> >characters of a string in perl so that they can be placed in a URL query
> >string?
> 
> Use the URI::Escape module, part of the libwww distribution, found at a
> fine CPAN site near you.
> 
> Or, do it yourself:
> 
> $data =~ s/ ([^\x20-\x7e]) / sprintf "%%%02X", $1 /gsx;
> 
> (URI::Escape should be faster than this.)
> 
> --
> Sean McAfee | GS d->-- s+++: a26 C++ US+++$ P+++ L++ E- W+ N++ |
>             | K w--- O? M V-- PS+ PE Y+ PGP?>++ t+() 5++ X+ R+ | mcafee@
>             | tv+ b++ DI++ D+ G e++>++++ h- r y+>++**          | umich.edu


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

Date: 7 Oct 1998 09:45:12 -0600
From: fozz@xmission.xmission.com (Doran L. Barton)
Subject: Re: *quick q:* how to escape a query string?
Message-Id: <6vg2a8$a5v$1@xmission.xmission.com>

Marty Blase <mblase@ncsa.uiuc.edu> writes:

>I'm afraid my Perl5 literacy is still rather lacking... is this the right
>syntax?

>use URI::Escape;
>$refer = Escape($refer);

*sighs* RTFM, Marty.

  SYNOPSIS
        use URI::Escape;
        $safe = uri_escape("10% is enough\n");
        $verysafe = uri_escape("foo", "\0-\377");
        $str  = uri_unescape($safe);

So, as you can see from this excerpt from the URI::Escape pod/man-page, the
correct syntax is:

  $refer = uri_escape($refer);

-=Fozz

-- 
Doran L. Barton = fozz@xmission.com && http://www.xmission.com/~fozz/;
"Where do you want Microsoft to go today?" --Ron Barry <ronb@cc.usu.edu>
"This may seem a bit weird, but that's okay, because it is weird."
  -- Larry Wall <lwall@sems.com> in the Perl v5 man page


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

Date: Wed, 07 Oct 1998 15:31:43 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: *quick q:* how to escape a query string?
Message-Id: <zPLS1.580$fS.1395901@news.itd.umich.edu>

In article <361B8297.EF3C6CE4@ncsa.uiuc.edu>,
Marty Blase  <mblase@yahoo.com> wrote:
>I'm afraid my Perl5 literacy is still rather lacking... is this the right
>syntax?

>use URI::Escape;
>$refer = Escape($refer);

The syntax will vary by module.  Once installed, you can read the module's
documentation with the "perldoc" command (eg, "perldoc URI::Escape").
In the case of URI::Escape, do this:

use URI::Escape;
$refer = uri_escape($refer);

-- 
Sean McAfee | GS d->-- s+++: a26 C++ US+++$ P+++ L++ E- W+ N++ |
            | K w--- O? M V-- PS+ PE Y+ PGP?>++ t+() 5++ X+ R+ | mcafee@
            | tv+ b++ DI++ D+ G e++>++++ h- r y+>++**          | umich.edu


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

Date: Wed, 07 Oct 1998 09:35:00 -0500
From: Eric Von Zee <evonzee@tritechnet.com>
Subject: Re: =?iso-8859-1?Q?Portugu=EAs?=
Message-Id: <361B7C14.412A372B@tritechnet.com>

Commitman wrote:

> Quem fala portugujs por aqui, favor dar um reply nesta mensagem, ss pra
> gente saber !!! Obrigado !

Nenhum Portugujs. Eu falo ingljs e o alemco somente.


--
Best Regards,     | Psychotics are consistently
Tritech Marketing | inconsistent. The essence of
                  | sanity is to be inconsistently
Eric Von Zee      | inconsistent.
Webmaster         | -- Larry Wall




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

Date: Wed, 07 Oct 1998 10:38:36 -0400
From: shambop@bacon-and-spam.timeoutny.com (Shambo Pfaff)
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <shambop-0710981038370001@www.timeoutny.com>

That's the best analogy yet for a newbie in a newsgroup. However, the
movie to which you refer is late 70's, not mid-80's.

May the Schwartz be with you.
> 
> Take my advice:  Be Obi-Wan.  Be Han Solo, or Chewie, or Greedo.
> Heck, you can even be a member of the band.  Just don't be Luke.
> He's a dork.
> 
> -- 
> Mike Gebis  gebis@ecn.purdue.edu  mgebis@eternal.net


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

Date: Wed, 7 Oct 1998 11:02:17 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <1dgiyd9.1t8xje3zl6ahyN@roxboro0-005.dyn.interpath.net>

madame philosophe <mp@mkt2mkt.com> wrote:

> Abigail wrote:
> 
> > madame philosophe (mp@mkt2mkt.com) wrote
> > ++
> > ++ If the people at this group are tired of hearing the same questions..
> > ++ why doesn't someone start a newbie perl newsgroup? Or why don't you
> > ++ "professionals" migrate to another more stylin' hangout? As the web
> > ++ grows there will be more newbies. GET USED TO IT. And don't shoot me
> > ++ for saying so.
> >
> > *PLONK*
> >
> > Start a newsgroup yourself.
> >
> 
> Am I qualified to do so?  Time will tell....

Anybody using a newsreader that is able to create the right headers is
"qualified" to do so - you aren't using such a newsreader but several
are available for you to do so (actually I guess it'd be possible to do
it without a newsreader that can create the headers, but that'd be a bit
more difficult).

The problem is that there is no demand for a newsgroup where people go
to not get perl help.

"Hey I don't know how to split on white space using perl, how do I not
find out how to do that?", "Go to alt.lang.per.newbie - they won't be
able to tell you how to do that, and if they try the answer will be
wrong", "Sounds great, just what I was looking for".

-- 
John Moreno


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

Date: Wed, 07 Oct 1998 09:09:33 -0500
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: Bug in open(FH,"| script") ?
Message-Id: <361B761D.9FB205EE@email.sps.mot.com>

Mattias Petersson EHS/SKA 62067 wrote:
> #!/usr/bin/perl
> 
> open( FH1,"| prgX") or die("prgX not found\n");
> select FH1; $|=1;
> (print FH1 "OK\n") or die("filehandle not ready\n");
> 
> The fact is that if the script prgX doesn't exist, perl anyway
> continues the execution.
> When it comes to the  last line, it tries to print to a nonexisting
> filehandle resulting in that the perl prg dies before the dying message.
> 
> This must be a bug in Perl, right?
> 
> /Mattias Petersson
> 
> PS I've seen that open( FH1,"| prgX") always returns the process id of
> prgX - even though it's non-existing.

This is the Pipe 'bug', not a Perl bug. Please read 'Camel
Book::Chapter-16(Social Engineering)::Pipes' for detail explanation.


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

Date: Wed, 07 Oct 1998 14:30:19 GMT
From: MCKAYD@aplbt1.agw.bt.co.uk (Dermot McKay)
Subject: Re: Can Perl Change Current Drive?
Message-Id: <6vfu9f$12q$1@pheidippides.axion.bt.co.uk>



works ok for me....
$dir="C:/";
chdir($dir);
open(F,"autoexec.bat");
print <F>;
close F;
chdir("M:/");
open(F,"signature");
print <F>;
close F;

Dermot

>I can't believe I've never run into this before.  I can't seem to make Perl
>change the current drive on Windows NT.  System and backticks seem to have
>no effect.  In fact the basic chdir() doesn't work either, I had to use
>Cwd::chdir(). Has anyone dealt with this before?
>
>Mark Harris
>Staff Engineer
>Standard Register
>
>


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

Date: Wed, 07 Oct 1998 15:02:24 GMT
From: drummj@mail.mmc.org (Jeffrey Drumm)
Subject: Re: Can Perl Change Current Drive?
Message-Id: <361b6f4d.347252945@news.mmc.org>

[posted and mailed]

On Tue, 6 Oct 1998 22:08:19 -0400, "Mark W. Harris" <mharris@donet.com>
wrote:

>I can't believe I've never run into this before.  I can't seem to make Perl
>change the current drive on Windows NT.  System and backticks seem to have
>no effect.  In fact the basic chdir() doesn't work either, I had to use
>Cwd::chdir(). Has anyone dealt with this before?

Works fine for me. The following prints the list of files in the root
directory on each of the drives in @dirs, regardless of the currently
logged drive. You weren't expecting the logged drive to stay changed after
the termination of the script, were you? Doesn't work that way . . .

#!perl -w

my @dirs = qw(C:/ D:/ E:/ F:/);
foreach (@dirs)
{
	chdir $_ or die "Couldn't change dir: $!\n";
	print "\nCurrent directory: $_\n";
	opendir DIR, "." or die "Couldn't open dir: $!\n";
	while ( defined( $entry = readdir DIR ) )
	{
    		print "$entry\n";
	}
	closedir DIR;
}

-- 
                           Jeffrey R. Drumm, Systems Integration Specialist
                                  Maine Medical Center Information Services
                                     420 Cumberland Ave, Portland, ME 04101
                                                        drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented." -me


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

Date: Wed, 07 Oct 1998 15:56:47 +0200
From: Detlef Weitz <weitz@goya.informatik.rwth-aachen.de>
Subject: Compiling 5.005_2
Message-Id: <361B731F.C6F92C94@goya.informatik.rwth-aachen.de>

Hi !

What can be wrong in following: (while running 'make')


cc  -L/usr/local/lib -L/opt/local/lib -L/opt/gnu/lib -o miniperl
miniperlmain.o libperl.a
Undefined   first referenced
 symbol         in file
pthread_getspecific                 libperl.a(perl.o)
log                                 libperl.a(pp.o)
pthread_self                        libperl.a(perl.o)
pow                                 libperl.a(pp.o)
pthread_detach                      libperl.a(perl.o)
sqrt                                libperl.a(pp.o)
floor                               libperl.a(pp.o)
atan2                               libperl.a(pp.o)
exp                                 libperl.a(pp.o)
pthread_key_create                  libperl.a(perl.o)
pthread_setspecific                 libperl.a(perl.o)
pthread_join                        libperl.a(perl.o)
sin                                 libperl.a(pp.o)
cos                                 libperl.a(pp.o)
ld: fatal: Symbol referencing errors. No output written to miniperl
make: *** [miniperl] Error 1


--
+=================================================================+
|  Detlef Weitz  : (Lehrstuhl fuer Informatik V                   |
|                   RWTH Aachen / BSCW - Serverbetreuung)         |
|                                                                 |
|  email         : weitz@i5.informatik.rwth-aachen.de             |
|  phone         : +49-241-80-21512 ( ONLY if important )         |
|                : +49-241-80-21501 ( Sekr. )                     |
|  office        : R 6241 (Rechnerraum)                           |
|  postal address: RWTH Aachen                                    |
|                  Lehrstuhl Informatik V                         |
|                  Ahornstr.55                                    |
|                  52072 Aachen (Germany)                         |
+=================================================================+





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

Date: 7 Oct 1998 14:07:00 GMT
From: wpsst2+@pitt.edu (William P Shaw)
Subject: Extracting n-grams and words that contain them
Message-Id: <6vfsi4$1vl$1@usenet01.srv.cis.pitt.edu>

Hello --
 
The problem I would like to solve is as follows:
 
INPUT : A string of words, separated by spaces.
 
OUTPUT: A hash of <n-gram> => frequency in string, AND a list of the
	words that contained each n-gram.
 
The string is contained in $result.  I am extracting the n-grams of
size $n as follows:

for ($i = 0; $i < length $result; $i++) {
    $gram = substr $result, $i, $n;
    $n_grams{$gram}++;
}

Suppose I extract the 5-gram "he qu" from "The quick".  How can I
retain the information that this 5-gram came from the words "The
quick"?

I'm relatively new at Perl; is there a more efficient, "Perl-like" way
of extracting the n-grams?  And how could I retain the word
information?

Thanks in advance -- Bill.


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

Date: Wed, 07 Oct 1998 15:02:25 GMT
From: drummj@mail.mmc.org (Jeffrey Drumm)
Subject: Re: ftp within a perl program
Message-Id: <361c73e2.348426342@news.mmc.org>

On Wed, 07 Oct 1998 15:39:57 +1000, g.hammond@garvan.unsw.edu.au (Gerard
Hammond) wrote:

>try this
>
>print (`\/usr\/ucb\/ftp -i -n localhost \<\<\!\nuser $user_loginid $user_pa
>ssword\nput thefile.txt\nquit\n`);
>
>
>Dr Gerard Hammond

Doesn't work so hot when the system on which the script needs to run
happens to be NT, and I suspect that's the case in this particular problem.

Graham Barr's Net::FTP module is by far the more robust (and portable)
solution, and is included in the current distributions of Perl.
-- 
                           Jeffrey R. Drumm, Systems Integration Specialist
                                  Maine Medical Center Information Services
                                     420 Cumberland Ave, Portland, ME 04101
                                                        drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented." -me


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

Date: Wed, 7 Oct 1998 14:25:26 +0100
From: Adrian Albin-Clark <adrian@pearl.demon.co.uk>
Subject: HELP! CAN'T GET PERL SCRIPTS TO RUN ON NT SERVER 4!!!
Message-Id: <3VXuMCAGv2G2EwX3@pearl.demon.co.uk>

It must be something simple that I am not doing.

I want to use PERL scripts with NT Server 4 but have had no luck at all.

This is what I have tried.

0) Initially I tried all of the following on a FAT16 installation, but
thought that maybe it needed to be NTFS, so then tried using that, but
still no joy.

1) Downloaded (from the net) and installed perl5_00402-bindist04-bc.zip.
This claims to have been tested extensively under Windows NT.

2) Downloaded (from the net) various sample scripts including 'Flexbook'
a simple form that acts as a guestbook, allowing the user to add some
comments to an evergrowing list (effectively modifying the source HTML
of the page being viewed).

3) Put the path to the perl binary in the path variable e.g. g:\perl\bin

4) Made sure IUSR.. (the www user) has read/write access on the
gbook.html file.

5) Looked in all docs with perl but could find nothing of any help.

6) Found a helpful tip on the net which suggested setting up an
association in registry thus:

H_KEY_LOCAL_MACHINE/SYSTEM/CURRENT_CONTROL_SET/SERVICES/W3SVC/PARAMETERS
/SCRIPT_MAP/

If you don't have anything in there for a .pl or .cgi extension, add it
with the path to your perl.exe and %s %s

So I did this. STILL NO JOY!

*****************************************************

Have I omitted some crucial things?

By the way, what is the correct syntax for the whizbang line in a Perl
script under NT?
For the following file (g:\perl\bin\perl.exe) I have tried:
#!/perl/bin/perl.exe
/perl/bin/perl.exe
/perl/bin/perl
/e|/perl/bin/perl.exe
#!/e|/perl/bin/perl.exe

******************************************************
The most I have managed to get is the flexbook.pl file loaded in the
browser as a text file, which is obviously not what is required!!


PLEASE HELP!!!!
-- 
Adrian Albin-Clark


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

Date: Wed, 7 Oct 1998 08:43:16 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: HELP! CAN'T GET PERL SCRIPTS TO RUN ON NT SERVER 4!!!
Message-Id: <MPG.10852bea7e1793899898a4@nntp.hpl.hp.com>

In article <6vftb3$qtk$1@lark.jmu.edu> on 7 Oct 1998 14:20:19 GMT, 
pfeilgm@jmu.edu <pfeilgm@jmu.edu> says...
> Adrian Albin-Clark wrote:
 ...
> > By the way, what is the correct syntax for the whizbang line in a Perl
> > script under NT?
 ...
> You don't need one.  Windows doesn't use it.  Just have .pl associated
> with perl.

That is where switches such as the "essential" '-w' are set.  In that 
sense, you *do* need one.  The filename part is ignored.  As my programs 
have to execute on either Unix or Windows/DOS, the same line works in 
both. 

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


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

Date: 7 Oct 1998 14:20:19 GMT
From: pfeilgm@jmu.edu
Subject: Re: HELP! CAN'T GET PERL SCRIPTS TO RUN ON NT SERVER 4!!!
Message-Id: <6vftb3$qtk$1@lark.jmu.edu>

Adrian Albin-Clark wrote:
> 
> 1) Downloaded (from the net) and installed perl5_00402-bindist04-bc.zip.
> This claims to have been tested extensively under Windows NT.

Try the ActiveState "port".  It's now compiled from the same code as
the Un*x version.  Has an InstallShield thing, so everything should be
cool.  I forget the URL, but you can get there from
http://www.perl.com/.

> By the way, what is the correct syntax for the whizbang line in a Perl
> script under NT?
> For the following file (g:\perl\bin\perl.exe) I have tried:
> #!/perl/bin/perl.exe
> /perl/bin/perl.exe
> /perl/bin/perl
> /e|/perl/bin/perl.exe
> #!/e|/perl/bin/perl.exe

You don't need one.  Windows doesn't use it.  Just have .pl associated
with perl.

-- 
Greg Pfeil --- Software Engineer --- (pfeilgm@|http://)technomadic.org
"The computer can't tell you the emotional story.  It can give you the
 exact mathematical design, but what's missing is the eyebrows."
                                                         --Frank Zappa



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

Date: 7 Oct 1998 14:49:56 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to pass an array in AND out of a subroutine?
Message-Id: <6vfv2k$mfi$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, lr@hpl.hp.com (Larry Rosler) writes:
:> &read_data (\$file1, \$num_items, \@items);
:There is no point whatever to passing references to scalars, as they are 
:already passed by reference.
:   read_data ($file1, $num_items, \@items);

Oh, I don't know I'd say no point *whatsoever*.  How about more obvious
self-documentation?  I never liked having to remember in Pascal whether
something were a VAR parameter or not in its call without looking at
the definition.  Of course, $ob could be a reference already in Perl,
so as in passing arrays in C, you can still modify it from the function.
But at least it's something.  I think "whatever" is a bit strongly worded.

--tom
-- 
"The number of UNIX installations has grown to 10, with more expected."
    - _The UNIX Programmer's Manual_, Second Edition, June, 1972.


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

Date: Wed, 07 Oct 1998 14:34:35 GMT
From: pramsey@iname.com
Subject: Re: How to write a MS Excel file
Message-Id: <361b7b31.581659512@news>

On Tue, 06 Oct 1998 20:01:54 +0200, Nico <info@edoc.co.za> wrote:

>Hans Xie wrote:
>
>I do not know exactly your application, but why not write a fixed width
>text file (or delimited file) and import that?

>> Are there tools/packages can help me to output a file into MS Excel format?

Again, we might be totally off track, but that's how I convert the
output of multi-megabyte, '60s era fortran programs into Excel files.
I find that tab delimited files are the best compromise between 
human- and excel-readability.  I have used the csv module to
make comma delimited files, and it worked, too.


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

Date: 7 Oct 1998 14:47:17 GMT
From: Thomas.Weeks@N-O-S-P-A-Mmirage.brooks.af.mil (Thomas Weeks)
Subject: Re: I have installed Linux. Now what?
Message-Id: <6vfutl$ddf$2@leo.brooks.af.mil>

In article <36148F5B.7440D3CE@mindspring.com>, dan.bialek@mindspring.com 
says...
 >
 >Dear Clever Linux People,
 >
 >I have installed Red Hat onto my PC, and now I am unable to get it do
 >anything useful. How do I use
 >the various editors, so that I can write basic Perl programs from my new
 >example book and run them?
 >I am at complete loss. I fired up the emacs in X windows, but I really
 >have no idea what I am doing. I apologize for my ignorance, but if
 >anyone can shine flashlight of help this way, I would be ever thankful.
 >Please respond via email.
 >
 >Thanks again,
 >Dan
 >

For productivity packages on Linux.. there are TWO VERY POWERFUL and cool 
"Office Suites"...  BOTH of which import/xport MS-Office docs!

Check the LJ comparison out!
http://www.linuxjournal.com/previous/3080.html

I ended up buying the Applixware package and LOVE it!  Load a Word doc, save it 
as PURE HTML!  It's a hoot!

Tom D Tek

 >--
 >** Insert clever signature here **
 >
 >



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

Date: 7 Oct 1998 15:05:39 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: IDE for Perl
Message-Id: <6vg003$mfi$2@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, 
    Anthony Clark <anthony.clark@adv.sonybpe.com> writes:
:Sorry for the sense of humour failure, but I have great trouble convincing C++/MS
:advocates of the benefits of perl and OO helpers could only help

Why bother?  Windows was created to keep the stoopid people away from Unix,
you know.  An "MS advocate" is already beneath contempt.

--tom

PS: Check out the documentation for the perl debugger.  In particular,
    the m command may be of service.
-- 
/* Force them to make up their mind on "@foo". */
    --Larry Wall, from toke.c in the v5.0 perl distribution


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

Date: Wed, 07 Oct 1998 15:17:07 GMT
From: fay@com2000.net (Bill)
Subject: Metasearch engine and Compare
Message-Id: <fay-ya02408000R0710981115150001@news.com2000.net>

Can anybody point me to a site that offers a perl-based Metasearch engine
and a Comparison Price search engine that searches several book retailing
sites such as Amazon, Barnes & Noble for the lowest price on a particular
book/title?

Thanks,

Bill
fay@nospam.com2000.net


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

Date: Wed, 07 Oct 1998 10:42:25 -0400
From: "Scott J. Tringali" <tringali@ed.ray.com>
Subject: Re: Optmizing regex search in a large array (from a hash)
Message-Id: <361B7DD1.3F54@ed.ray.com>

> Unless your pattern is utterly hairy, the slow bit here is probably the keys
> %w. The reason for this is that it's scanning the DBM file on disk rather
> than (as it would normally) pulling the keys out of memory. Thus you're
> suffering from disk access v. memory access rather than grep.

You are right; plus, the file is shared over NFS, adding to the delay.

> You might like to keep a copy of the keys in another part of %w so you can
> just grab them quickly with
> 
> get:
>     @{ $w{_KEYS} }
> set:
>     $w{_KEYS} = [ keys %w ];    # the slow bit

My box's ndm must be poor; it won't serialize the refs, and it dies on:

  $vv{"__KEYS"} = join($;, keys %vv)

 ...because it's just too big.
 
But, I've been able make it much faster by storing a sorted keyfile in
parallel to to the hash. The extra 275K of disk space is well worth it:

    # ... build hash
    open (KEYS, "> $home/vv_keys") || die "Can't open key cache file:
$!";
    print KEYS join($;, sort keys %vv);
    close (KEYS);

Then, slurp it back in quickly:

    open (KEYCACHE, "$home/vv_keys")
       || die "Cannot open key cache file: $!";
    undef $/;
    @key_cache = split($;, <KEYCACHE>);
    close (KEYCACHE) || warn;

Then, grep @key_cache to my heart's content:

    @matches = grep(/^pattern/i, @key_cache);

I guess forcing the OS to do a single big read, instead of possibly a
few thousand seeks, does the trick.


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

Date: Wed, 07 Oct 1998 14:25:10 GMT
From: rbell@hcdemocrat.com (Robert Bell)
Subject: Re: Perl as a dumb terminal
Message-Id: <361b799e.4887829@news.eclipse.net>

On Wed, 7 Oct 1998 19:47:27 +0800, "Xu Hongwei"
<howel88@cyberway.com.sg> wrote:

>Why insist on perl? Why not C?
>
>Buxx wrote in message <361AC55E.4468@buxx.com>...
>>I'm needing to interface a pc thru a serial port to a Meridian phone
>>system to moniter and issue commands. All ascii text and emulating a
>>dumb terminal.

Or, better still, download a copy of Kermit.


Robert Bell
rbell@hcdemocrat.com



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

Date: Wed, 07 Oct 1998 11:52:13 -0400
From: "Erich L. Markert" <erich@orator.usma.edu>
Subject: Re: Perl Cookbook, does anyone have it?
Message-Id: <361B8E2D.711FAB5E@orator.usma.edu>

Very good is an understatement.  This book is awesome.
Can't wait for Perl Data Structures book.

bj wrote:
> 
> echao@interaccess.com (Eisen Chao) writes:
> 
> > I got examples from Web site and put on a floppy to take home.
> >
> > Some goooood stuff there...
> >
> > John Call (johnc@interactive.ibm.com) wrote:
> > : Has anyone gotten a copy of this yet? I'm dying to get it and it doesn't
> > : seem to have reached Georgia yet.
> > :
> > : If you do have it, do you like it? From what I've seen on the ORA site it
> > : looks good.
> 
> Tis very good! I would not recomend trying to learn Perl from it, but
> as a reference book for a beginner (thats me), it is a great book for
> getting ideas and starting points. The Panther book still hurts my
> head in places.
> 
> Currently in the middle of reading it cover to cover, whilst jumping
> around as I use the recipes to solve day to day crap. I would say it
> is a must have for the bookcase unless you are a serious Perl hacker.
> Why go through the pain of writing crap code, when you can start with
> good code, and then break it... :-)
> 
> bj

--
__________________________________________________________
Mr. Erich L. Markert                 erich@orator.usma.edu
USMA Webmaster                           TEL (914)938-6463
Directorate of Information Management    FAX (914)938-7308
United States Military Academy
West Point, NY 10996

"If you put three drops of poison into a 100 percent pure Java, 
you get ... Windows. If you put a few drops of Java into Windows, 
you still have Windows."
		-- Sun Microsystems CEO, Scott McNealy


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

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

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