[11246] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4846 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Feb 8 13:27:31 1999

Date: Mon, 8 Feb 99 10:00:23 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 8 Feb 1999     Volume: 8 Number: 4846

Today's topics:
        8-bit input (or, "Perl attacks on non-English language  <cmcurtin@interhack.net>
    Re: 8-bit input (or, "Perl attacks on non-English langu <uri@home.sysarch.com>
        Accessing ASP Data from PERL - not PerlScript johnsteele@my-dejanews.com
    Re: ActivePerl on NT- HELP! jorg_heymans@hotmail.com
        address of a webpage that links to a perl cgi script aonghus.onia@ucg.ie
        building DBI/DBD::Oracle on HP-UX 11 dynamically <jdcotter@execpc.com>
    Re: Catching undefined symbols in subs yong@shell.com
    Re: CREATING TEXT TABLE (Andrew M. Langmead)
    Re: DBI <chad@vcn.net>
    Re: DBM Help <chad@vcn.net>
        File::Path rmtree and tainting dturley@pobox.com
    Re: Get current URL <chad@vcn.net>
    Re: how do I get a date in perl? <stevenhenderson@prodigy.net>
        How fo have non blocking STDIN gurdeeps@qualcomm.com
        I Need Help On Forms & CGI. willie888@my-dejanews.com
    Re: I Need Help On Forms & CGI. (Joe McMahon)
    Re: Installing a Module: Can't find Perl - Followup <michael@datahost.com>
    Re: Installing a Module: Can't find Perl <michael@datahost.com>
    Re: installing cgi.pm win32/98?!? dturley@pobox.com
    Re: installing cgi.pm win32/98?!? dave@mag-sol.com
        Mnaip.pm Not Supported <winstons@mindspring.com>
        Multithread in Perl <ple@mitra.com>
    Re: No such file or directory <chad@vcn.net>
        Parsing output from a program called within perl kalikste@uiuc.edu
    Re: Perl Criticism topmind@technologist.com
        Perl, PHP, Python, ColdFusion, MS Frontpage, which one  ghill@n2.net
    Re: Program needs compactification <jonesy@rmi.nospam.net>
    Re: Programming with Style <keithmur@mindspring.com>
    Re: Question: Arrays of associative arrays <stevesc@synopsys.com>
        Serial Port in WinNT and OS/2 <peter.prinz@siemens.at>
    Re: Server Push in IE3/4 <Allan@due.net>
        String splitting. om7@cyberdude.com
    Re: String splitting. <upsetter@ziplink.net>
        swap space <ralph@inlink.com>
    Re: Viewing remote Perl script before executing droby@copyright.com
    Re: Viewing remote Perl script before executing brackett@pobox.com
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 08 Feb 1999 12:21:32 -0500
From: Matt Curtin <cmcurtin@interhack.net>
Subject: 8-bit input (or, "Perl attacks on non-English language communities!")
Message-Id: <xlxiudcizfn.fsf@gold.cis.ohio-state.edu>
Keywords: Emacs vs. vi, Perl vs. Lisp, Holy Wars, Let's see what I can start


[Please honor followups.  I don't *really* want to start a flamewar.
But this should be entertaining for the readers of these groups...]

I've been thinking a lot about languages lately.  Languages are cool.
Lest you get the impression that I mean programming languages, which
can also be cool, I'm talking about natural languages.  English,
German, Russian ... that sort of thing.

Given that Perl was started by a linguist, namely Larry, and has also
been under the influence of another, namely Tom, it seemed to me that
if any language would be friendly to languages other than boring
English (and Esperanto!) with non-accented, 7-bit ASCII characters, it
would be Perl.

Trying to feed things like character code (such as, for example,
0x81), to parsers has been known to produce results that one might
generously classify as "suboptimal".  But if there's any parser that
can handle such things, thought I, it would be written by Larry,
Mr. Weird Parsing himself.  And if there is a language anywhere for
which a parser to handle such things has been written, it would be
Perl.

Since we have an English module that allows one to use the English
equivalent of such bizarre things that we might classify as "native
Perl", it seemed only fair that we would have other modules that would
allow one to use keywords and whatnot based on languages other than
English, in their native writing systems.  (I recognize the difficulty 
of multibyte encoding schemes, so let's pretend for the time being
that this isn't a problem.)

I mean, really, wouldn't it be cool to be able to do something like

    #!/usr/bin/perl

    use Frangais; # minor bootstrapping problem. :-)

    icrivez "Bonjour, monde!\n";

I certainly think so.

We might write a small program to see if it can be done:

    #!/usr/local/bin/perl

    icrivez "Bonjour, monde!\n";

    sub icrivez ($) {
      my $m = shift;
      print $m;
    }

In so doing, we're likely to make this discovery:

    $ ./foo.pl
    Unrecognized character \351 at ./foo.pl line 3.

Well, that's no fun.

How about Python?

    #!/usr/local/bin/python 

    def icrivez (m):
        print m;

    icrivez("Bonjour, monde!");

hmm...

    $ ./foo.py 
      File "./foo.py", line 5
        def icrivez (m):
        ^
    SyntaxError: invalid syntax

What a bore!

Let's see ... what other (programming) languages might support this
sort of thing?  How about Lisp?  XEmacs Lisp, at that?

    (defun icrivez (m)
      "Icrivez un message."
      (message m))

Sure enough, evaluating the expression `(icrivez "Bonjour, monde!")'
will write `Bonjour, monde!' in the minibuffer completely sans
complaint.

This is too much.  The implications are astounding.  Newfangled vi
implementations that use Perl as their customization language are
actually less functional than XEmacs Lisp!  Lisp can do something that 
Perl can't!

Pray, what do we do?  Larry, will you start using Lisp?  Tom, will you
start hacking Lisp to customize your Emacs sessions?  Is this the
beginning of the end?

Gleefully yours,
Just Another (Lisp|Perl|Java|Unix|.*)+ Hacker

-- 
Matt Curtin cmcurtin@interhack.net http://www.interhack.net/people/cmcurtin/


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

Date: 08 Feb 1999 12:54:59 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: 8-bit input (or, "Perl attacks on non-English language communities!")
Message-Id: <x7yam8pyq4.fsf@home.sysarch.com>

>>>>> "MC" == Matt Curtin <cmcurtin@interhack.net> writes:

  MC> Pray, what do we do?  Larry, will you start using Lisp?  Tom, will
  MC> you start hacking Lisp to customize your Emacs sessions?  Is this
                                               ^^^^^

boy, you must be new here or you would know that statement is likely to
get your head ripped off by tom c. he is a well know vi user (vs. an iv
user :-)

and AFAIK perl can handle 8bit input fine for data but not for code. and
there may be ways around that that i don't know about.

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire  ----------------------  Perl, Internet, UNIX Consulting
uri@sysarch.com  ------------------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: Mon, 08 Feb 1999 16:53:39 GMT
From: johnsteele@my-dejanews.com
Subject: Accessing ASP Data from PERL - not PerlScript
Message-Id: <79n4qe$7lt$1@nnrp1.dejanews.com>

I don't THINK this is off-topic so here goes

We are builing an web application system that consists mostly of PERL modules
(actually PERLIS) created with ActivePerl. Right now we are using "hidden"
fields to pass persistent data (username, account number, etc) back and forth
between the modules via the browser.

The app works just fine this way, but we'd like to keep this in Session
variables on the server if we can. However, we haven't found a way to
store/retrieve Session data in the PERLIS modules. We've tried the obvious:

   $Session->{'variable}' = $variable;

but nothing happens. The initial logon is via an ASP page and we are able to
use PerlScript in this page to initialize the session and fire the Session
events. We can retrieve the variable(s) with another PerlScript ASP page so I
know that the event is firing and data is being stored.

I've searched just about every PERL, ActivePerl, ASP, etc., refenece site
that I can find until my fingers are numb. We've also tried all the possible
syntax alternatives for this. We've tried using WIN32::OLE on the chance that
we could access it that way but to no avail.

I can't believe that it isn't possible to access this data from PERLIS
somehow, clearly we just haven't stumbled over the method or syntax as yet.
Can anyone point us in the right direction?

John

jsteele AT insyte DOT com


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 08 Feb 1999 14:24:57 GMT
From: jorg_heymans@hotmail.com
Subject: Re: ActivePerl on NT- HELP!
Message-Id: <79ms3g$66$1@nnrp1.dejanews.com>

In article <79g20j$h4j$1@news4.muc.eurocyber.net>,
  "sugus" <sigi@rueckenwind.org> wrote:
> Hi!
> That was two days ago. Doing the same now, I get the alert:
> Dynamic Link Library PerlCRT.dll was not found in the path
> D:\perl\bin;.;D:\WINNT\Sytem32;.......

I have encountered the same problem twice. I couldn't figure out on why NT
decides to rename that dll.
In my case, NT renamed the dll to perlcrt.bak. Just do a find on perlcrt.* and
rename that file back to its orignal name, all probs should be fixed then.

Jorg Heymans

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 08 Feb 1999 09:05:56 GMT
From: aonghus.onia@ucg.ie
Subject: address of a webpage that links to a perl cgi script
Message-Id: <79m9dg$i7g$1@nnrp1.dejanews.com>

Is it possible to find address of a webpage that links to a perl cgi script in
your script.

Any help would be appreciated
Aonghus O Nia

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 08 Feb 1999 16:46:51 GMT
From: John Cotter <jdcotter@execpc.com>
Subject: building DBI/DBD::Oracle on HP-UX 11 dynamically
Message-Id: <79n4do$79c$1@nnrp1.dejanews.com>

>From reading various postings I get the (possibly incorrect) notion that I
should now be able to build the DBI/DBD::Oracle on HP-UX 11 dynamically. So
far I've been unable to do this.  Has anyone out there been successful doing
this? If so, any special tricks I need to know?

DBD-Oracle-0.59
DBI-1.06
perl5.005_02
Oracle 7.3.4
HP-UX 11.0

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 08 Feb 1999 16:01:44 GMT
From: yong@shell.com
Subject: Re: Catching undefined symbols in subs
Message-Id: <79n1p1$56d$1@nnrp1.dejanews.com>

In article <Ev5u2.66$_E3.4792@nsw.nnrp.telstra.net>,
  mgjv@comdyn.com.au (Martien Verbruggen) wrote:

> You can't at compile time, because a subroutine can be defined at run
> time. Witness:
>
> # perl
> print STDOUT boo, "\n";
> __END__
> Undefined subroutine &main::boo called at - line 1.

My perl behaves a little differently in your test. Can you explain? Here's my
screen dump:
proteus% perl
print STDOUT boo, "\n";
__END__
boo
proteus% perl
eval {sub boo {'boo'}};
print STDOUT boo(), "\n"
__END__
boo
proteus% perl -v

This is perl, version 5.004_04 built for sun4-solaris

Copyright 1987-1997, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5.0 source kit.

proteus% uname -a
SunOS proteus 5.5.1 Generic_103640-24 sun4u sparc SUNW,Ultra-5_10

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 8 Feb 1999 15:01:17 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: CREATING TEXT TABLE
Message-Id: <F6uCE5.Lrr@world.std.com>

phenix@interpath.com (John Moreno) writes:

>Abigail <abigail@fnx.com> wrote:

>> -- 
>> perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
>>              "\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
>>              "\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'

>What's this supposed to do?  with the -we in it gives a error message,
>without it doesn't seem to have any effect.

Its not terribly obfuscated. It just loads up $@ with a string and
runs it through backticks. An ASCII table or a well placed print
statement will decode it for you. 

I don't see where perl would complain, although using a csh derivative
will give a error from the shell. Also, anything with an odd idea of
its controlling tty may not run it correctly. (Running it from the
shell-command-on-region function in emacs makes an error message
"/dev/tty: Cannot create")
-- 
Andrew Langmead


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

Date: Mon, 08 Feb 1999 04:42:48 GMT
From: Chad M. Townsend <chad@vcn.net>
Subject: Re: DBI
Message-Id: <79lq06$5vj$1@nnrp1.dejanews.com>

Well, I would suggest installing it and doing a 'perldoc DBI' for starters,
I'm sure all your questions will be answered.

-chad


In article <36BCE025.D31E0A3D@pentrel.com>,
  Nathan Feger <nathan@pentrel.com> wrote:
> hi,
>
> Where can I find a descent bit of information on DBI.  I cannot seem to
> find a good listing of the capabilities of what is possible with DBI,
> the site where you download it doesn't have a good reference.
>
> Perhaps someone could point me to another.
>
> thanks
>
> -nathan
>
> --
> Nathan Feger			e-mail:nathan@pentrel.com
> Pentrel Internet		whois NF1024
> http://www.pentrel.com		phone: 877.pentrel
>


--------------------------------------------------------
Chad M. Townsend         Virtual Community Network, Inc.
Chief Technical Officer  Your Local Community Online!

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 08 Feb 1999 04:41:07 GMT
From: Chad M. Townsend <chad@vcn.net>
Subject: Re: DBM Help
Message-Id: <79lpt1$5u3$1@nnrp1.dejanews.com>

I think the best is 'DB_File', I'm not sure but I'm pretty sure, guru's step
in.

-chad



In article <36BD352B.438274DE@ecpi.com>,
  webmaster@wondertek.com wrote:
> Alright, I finally got a book, got perl installed on my win machine so I
> can see the docs (even though work on a Unix over the net)....
>
> Thanks to ORA's Perl Cookbook - and Tom Christiensen - I know I can use
> NDBM, ODBM, and SDBM.
>
> Which should I use for a few thousand line database with 50 fields? Do
> they offer security or encryption? And should use a different one for a
> little database (like passwords)?
>
> I ___know____ I should be using Msql or better, but can't install on
> this server.
>
> TIA,
> John
>
>


--------------------------------------------------------
Chad M. Townsend         Virtual Community Network, Inc.
Chief Technical Officer  Your Local Community Online!

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 08 Feb 1999 17:08:00 GMT
From: dturley@pobox.com
Subject: File::Path rmtree and tainting
Message-Id: <79n5l7$8br$1@nnrp1.dejanews.com>

I was trying out the rmtree2 example in the Perl Cookbook (section 9.8
Removing a directory and its contents). Th example uses the rmtree() function
from File::Path. When tainting is turned on I get an insecure error on unlink
within file.pm. The only user input I send is the directory name, which I
untaint. Since the directory name is untainted, shouldn't the file names
derived from it be also? How can I this function when running with the -T
flag?

What obvious point I am missing. I won't be the first time. :-)
--

____________________________________
David Turley

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 08 Feb 1999 04:50:21 GMT
From: Chad M. Townsend <chad@vcn.net>
Subject: Re: Get current URL
Message-Id: <79lqea$6ao$1@nnrp1.dejanews.com>

I thought about that once too.	It would work on the first request to the
index page, but the second request would be something like
http://www.mysite.com/another/dir/, now how would you handle that?, the only
way I can think of would be a 'perl' script waiting at www.domain.com/script
, now of course this dir would have to be a 'cgi-bin' and this script would
parse the 'path_info' and 'request_uri' env and determine the correct file to
display.

good luck,

-chad


In article <79k97j$oqu$1@newsgate.elender.hu>,
  lezli@lezlisoft.com wrote:
> Hello,
>
> I would like to point more than domain names to one IP number. After I would
> like to separate them to several starting pages. Is this possible by Perl?
> SERVER_NAME environent variabe will get correctly different domain names?
> Please help, and copy the answers to my e-mail address. PHP and Phyton
> availabe, but I would like to use Perl is possible.
>
> thanks,
> Leslie
>
> -------------------
> Message from:
> Leslie Perjes (Hungary)
> E-mail: lezli@lezlisoft.com
> URL: http://www.lezlisoft.com
>


--------------------------------------------------------
Chad M. Townsend         Virtual Community Network, Inc.
Chief Technical Officer  Your Local Community Online!

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 8 Feb 1999 07:28:07 -0600
From: "Steven T. Henderson" <stevenhenderson@prodigy.net>
Subject: Re: how do I get a date in perl?
Message-Id: <WnDv2.51418$641.42691@news.san.rr.com>

yup, i had the same problem so i wrote a cool little library. check out:
http://www.stevenhenderson.com and select Perl Dates button.

Its a single file with lib routines located at the top and testing code at
the end of the file. search for 'if(0)' and change to TRUE to see the
important routines in action. enjoy!


Duc Le wrote in message <36BE41A8.66878025@best.com>...
>Hi!
>
>I don't know if Perl has any function for date manipulation besides
>localtime().  I just want to do a simple task like getting the week date
>from any given day of the month.  For example, given "02/12/1999", I
>would like to know what date of the week this day falls on.
>
>Any helps will be really appreciated.  Thanks in advance,
>
>DL.
>




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

Date: Mon, 08 Feb 1999 01:04:54 GMT
From: gurdeeps@qualcomm.com
Subject: How fo have non blocking STDIN
Message-Id: <79ld7h$s2f$1@nnrp1.dejanews.com>

I want to check a keystroke in perl. When I use getch () function, it blocks
input
till one or more character is entered followed by carriage return.

In C there is a function kbhit() which do the desired job. How can be
implement, same kind of functionality in perl.

Gurdeep Singh

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 08 Feb 1999 04:12:00 GMT
From: willie888@my-dejanews.com
Subject: I Need Help On Forms & CGI.
Message-Id: <79lo6b$4lt$1@nnrp1.dejanews.com>

Hi,
I made a Form on my Web Page.
But when I try to fill-in the Form, where the Data send to?
And how am I able to see the Data Filled by my customers?
Is it from Email or Web Site???

Can someone please Help.

Thanks

Willie

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 08 Feb 1999 11:13:40 -0500
From: joe.mcmahon@gsfc.nasa.gov (Joe McMahon)
Subject: Re: I Need Help On Forms & CGI.
Message-Id: <joe.mcmahon-0802991113400001@prtims.stx.com>

In article <79lo6b$4lt$1@nnrp1.dejanews.com>, willie888@my-dejanews.com wrote:

>Hi,
>I made a Form on my Web Page.
>But when I try to fill-in the Form, where the Data send to?
>And how am I able to see the Data Filled by my customers?
>Is it from Email or Web Site???
>
>Can someone please Help.

The ACTION= tag tells your form what program on your web server should be run
to accept the data. The data will be on standard input for POST. Your program
will determine what to do with the data. YOu have to write the program yourself
or find one on the Net.

 --- Joe M.


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

Date: Mon, 08 Feb 1999 07:25:55 -0800
From: Michael Stearns <michael@datahost.com>
Subject: Re: Installing a Module: Can't find Perl - Followup
Message-Id: <36BF0203.2CFF@datahost.com>

One additional piece of info

When I look in /vs3/vs3/usr/bin/, I see:

lrwxrwxrwx   1 vroot    vroot           9 Jan 23 05:02 perl -> /bin/perl

which I assume means that this is just a link.

When I look in usr/bin, I see both of the following:

-rwxr-xr-x   2 root     root       496647 Apr  7  1998 perl
-rwxr-xr-x   2 root     root       496647 Apr  7  1998 perl5.00404

Also, I am neither user "root" or "vroot" on this system.

Thanks,
Michael





Jonathan Feinberg wrote:
> 
> Michael Stearns <michael@datahost.com> writes:
> 
> > Unable to find a perl 5 (by these names: perl miniperl perl perl5
>                    ^^^^^^
> > Any ideas why the installer can't find perl?
> 
> The installer can't find perl *5*.  You have an older version of
> perl.
> 
> --
> Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
> http://pobox.com/~jdf

-- 
---------------------------------------------------------
Michael Stearns        		                 Datahost
michael@datahost.com               37540 Wallace Creek Rd
phone: 541-746-6418		    Springfield, OR 97478
fax: 541-746-7176  
pager: 541-718-2752
---------------------------------------------------------


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

Date: Mon, 08 Feb 1999 07:14:41 -0800
From: Michael Stearns <michael@datahost.com>
Subject: Re: Installing a Module: Can't find Perl
Message-Id: <36BEFF61.1086@datahost.com>

Jonathan Feinberg wrote:
> 
> Michael Stearns <michael@datahost.com> writes:
> 
> > Unable to find a perl 5 (by these names: perl miniperl perl perl5
>                    ^^^^^^
> > Any ideas why the installer can't find perl?
> 
> The installer can't find perl *5*.  You have an older version of
> perl.
> 

I am sure that Perl 5 is running on this system, and I am pretty sure it
is 5.004. I will check to confirm this. 

Are there any other possibilities why I would get this message.

Thanks,
-- Michael
---------------------------------------------------------
Michael Stearns        		                 Datahost
michael@datahost.com               37540 Wallace Creek Rd
phone: 541-746-6418		    Springfield, OR 97478
fax: 541-746-7176  
pager: 541-718-2752
---------------------------------------------------------


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

Date: Mon, 08 Feb 1999 13:20:28 GMT
From: dturley@pobox.com
Subject: Re: installing cgi.pm win32/98?!?
Message-Id: <79moam$t15$1@nnrp1.dejanews.com>

In article <79met2$m29$1@nnrp1.dejanews.com>,
  dave@mag-sol.com wrote:

> (Actually, I suppose you might want to install a newer version of CGI.pm, but
> in that case I don't think ppm.pl will help as ActiveState don't have CGI.pm
> in their repository of modules.)

Well, no. They certainly do have it. It's not the most current, but there's no
XS parts anyway, so no reason to use ppm.

--

____________________________________
David Turley

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 08 Feb 1999 10:39:30 GMT
From: dave@mag-sol.com
Subject: Re: installing cgi.pm win32/98?!?
Message-Id: <79met2$m29$1@nnrp1.dejanews.com>

In article <79k1lo$384$1@gellyfish.btinternet.com>,
  Jonathan Stowe <gellyfish@btinternet.com> wrote:
> On Sun, 7 Feb 1999 01:39:19 -0000 el_pollo_diablo wrote:
> > I'm using active perl and perl builder. I've just tried to install the
> > cgi.pm file but I receive this error:
> >
> > Can't locate CGI.pm in @INC at script line 48.
> > BEGIN failed--compilation aborted at script line 48.
> >
>
> If you are using ActivePerl then you should be able to use the PPM
> (Perl Package Manager) to install it - this is is documented in the
> ActivePerl distribution somewhere (I couldnt tell you right now because
> this is a Linux machine).

If he's using ActivePerl then there's no reason to install CGI.pm as it is
installed as part of ActivePerl.

(Actually, I suppose you might want to install a newer version of CGI.pm, but
in that case I don't think ppm.pl will help as ActiveState don't have CGI.pm
in their repository of modules.)

Dave...

--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 8 Feb 1999 10:36:16 -0500
From: "MindSpring User" <winstons@mindspring.com>
Subject: Mnaip.pm Not Supported
Message-Id: <79n0fd$5gk$1@camel18.mindspring.com>

    I am developing my first application in Perl and wish to use functions
from the manip.pm module.  However, this module is not loaded on the Apache
server at charweb.org.  In attempting to get the module to run from my
cgi-bin I noticed that it refers to a bunch of Perl configuration files
which I do not have access to.  Is there a work around to this or am I at
the mercy of the sysop?

Thank you for your advice!

Mark Winston




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

Date: Mon, 08 Feb 1999 10:47:49 -0500
From: Phuong Le <ple@mitra.com>
Subject: Multithread in Perl
Message-Id: <36BF0725.57728F5B@mitra.com>

I am overexcited when I heard that the lastest version of Perl support
multithread, but to my dismay I found that the main thread cannot run 
in parallel with new thread.  If what I found is true then multithread
in Perl is very useless( I hope that I am wrong ).Take a look at the 
following perl code for example

------------------------------------
use Thread;

my $t1 = new Thread \&start_sub;
my $t2 = new Thread \&start_sub;

#
# Start these two threads
#
$t1->join;
$t2->join;

#
# The following never get execute until thread t1 and t2 terminate
#
while ( 1 )
{
    print "I am the main thread\n";
    sleep 1;
}

sub start_sub
{
    my $tid = Thread->self->tid;
    while ( 1 )
    {
	print "I am thread $tid\n";
	sleep 1;
    }
}
------------------------------------

Here is the program output:

I am thread 1
I am thread 2
I am thread 1
I am thread 2
   .
   .
   .

I expect the the while loop of the main thread to be execute in parallel
but it not.


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

Date: Mon, 08 Feb 1999 04:39:22 GMT
From: Chad M. Townsend <chad@vcn.net>
Subject: Re: No such file or directory
Message-Id: <79lppp$5sb$1@nnrp1.dejanews.com>



Well if you know perl go into this script and try to determine exactly where
it's die'n and create several debug test and play with it, I'm sure you'll
figure it out.

-chad


In article <79j503$avu2@iac7.navix.net>,
  "Glen Lee Edwards" <GLEdwards@christianfamilies.net> wrote:
> I'm trying to install a Perl script on a Linux system and on three of the
> cgi scripts I keep getting a "no such file or directory" error.  But when I
> look through the script it appears that the syntax referencing the files are
> correct, and all the respective folders are in place.  Any suggestion?
>
> Thanks,
>
> Glen
>
>


--------------------------------------------------------
Chad M. Townsend         Virtual Community Network, Inc.
Chief Technical Officer  Your Local Community Online!

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 08 Feb 1999 15:47:27 GMT
From: kalikste@uiuc.edu
Subject: Parsing output from a program called within perl
Message-Id: <79n0ub$49e$1@nnrp1.dejanews.com>

How can I parse input from a program called from system() as if it were
comming from <STDIN>?  I don't think it should matter, but I am on a win32
system (NT).

For example: I would like to treat the output from system (dir), as if I was
reading the output from a file.  I can't pipe the information to a file first
without some hassles, becase there may be more than one instance on the
script running at a time.  Logically, it seems to me this should be relaivly
easy with perl.  I thank you in advance for your input.  I would appreciate
replies via email.

Thanks,
jeff

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 08 Feb 1999 09:22:51 GMT
From: topmind@technologist.com
Subject: Re: Perl Criticism
Message-Id: <79mad5$j0n$1@nnrp1.dejanews.com>

In article <36ba0315.5165893@news.demon.co.uk>,
  eric@deptj.demon.co.uk (Eric Junkermann) wrote:
> On Mon, 25 Jan 1999 03:36:07 GMT, topmind@technologist.com wrote:
>
> <snip>
>
> >But, at least you are focusing on ideas instead of
> >witchhunts and background checks. Kudos to you for that.
>
> I don't like witch hunts either but I can't see any here.


Well, you missed all the fun then.


>
> However, I think that background is important.



I prefer to judge people on the merit of the ideas
or suggestions they present. I guess I am an idealist
for concepts such as merit of ideas. Not clubs.



> Here is someone who gives
> themselves a self-congratulatory nickname


"Top" in "Topmind" stands for "Table-Oriented-Programming".
If you took it for something else, I apologize.


> and argues with, according to the
> many detractors, a noticeable lack of hard evidence.


My primary claim is that much of the odder parts of
Perl are to get around deficiencies in Perl, or
are archaic carry-overs, and
that they are probably not necessary for RAD.

Regarding the first part of this claim, I have presented
many alternative language constructs.

Regarding the second part, I have asked for examples
where these are needed for RAD or conciseness, and
nobody met the challenge. We can get into a debate
about who had the "burden of proof", but it is still
odd that nobody can defend Perl with examples.
I guess they are too busy building cryptic signatures.


> Opinions without much
> evidence only carry weight if they are backed by a suitable depth of
> experience.
> So, topmind, what relevant experience do you have?


I have worked with languages that most of you have not
or in ways that you have not tried.
That may not make me smarter, but it does give me
an alternative perspective. You guys need a break
from re-enforced groupthink. It is good for you.
Like-minded re-enforcement is a common problem
in newsgroups IMO. It is like cults that only
listen to people who think like themselves.


>
> I could ask specific questions, but I think we are already far enough off
> topic.
>
> If you want to convince people here, you need to promote your credibility -
> how about it?


I am a thinker, not a politician.


>
> Regards,
>
> Eric
> --
> Just Another Perl Newbie
>

-tmind-
http://www.geocities.com/SiliconValley/Lab/6888/langopts.htm

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 08 Feb 1999 09:01:23 GMT
From: ghill@n2.net
Subject: Perl, PHP, Python, ColdFusion, MS Frontpage, which one for beginner
Message-Id: <79m950$i4c$1@nnrp1.dejanews.com>

I've been doing alot of reading and a little testing trying to decide what
language I should commit to.
I need to interact with all the popular databases without re-inventing the
wheel (so to speak).
I'm new to Web Development although I do have lots of xBase programming
experience, I'm trying to decide from one of the following:

- Cold Fusion  (real high, Windows only)
- MS FrontPage  (real high, Windows only)
- PHP (med high, multiplatform)
- Python (med high, multiplatform)
- Perl (high/low, multiplatform)

I do want to end up with a multiplatform product and I know that Perl will run
on all the popular OS's, it seems like that is the way I should go.
I've have Perl on my system, and I'm delving into it with the help of
O'reilly's "Learning Perl".  It seems like the learning curve is satisfactory,
but I'm still very green to it, I just know I like what I see so far.
BUT do I really need to know Perl to get the jog done efficiently?
Please e-mail me at ghill@n2.net
Thanks in advance.
Greg Hill

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 8 Feb 1999 16:20:49 GMT
From: Jonesy <jonesy@rmi.nospam.net>
Subject: Re: Program needs compactification
Message-Id: <79n2t1$82u$1@news1.rmi.net>

Abigail <abigail@fnx.com> wrote:
: Uri Guttman (uri@home.sysarch.com) wrote on MCMLXXXVI September MCMXCIII
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Maybe in a parallel universe...

Jonesy

-- 
326 days to go until the Year 2000
691 days to go until the 3rd Millennium of the C.E.


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

Date: Mon, 08 Feb 1999 11:34:30 -0600
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Programming with Style
Message-Id: <36BF2026.4165F254@mindspring.com>

chad@vcn.net wrote:
> 
> I wasn't going to post this question in fear of
> being picked on, but here goes.  I have been a perl
> programmer for about 6 years, I know my way around
> it pretty well and always try to stay current on new
> Modules from CPAN, latest news, developments, etc.
> I've read *all* the books on perl front to back, so
> I'm not a complete idiot.  So where I want some help
> or advice (from older programmers or maybe new ones too)
> is how to get more efficient on program design.  From
> the planning stages of a project to coding, etc.  What
> books are there or resources out there, that will help me
> become a better programmer?  An example of what I'm looking
> for would be like "Efficiency, p.537" and "Programming with
> Style, p.546" in the camel book #2.  I'm sure I'll get
> better with more and more experience and practice, just
> wondering if anyone ran across a good book.  I heard of one
> called "The Pearls of Programming", but have never been able
> to find it in a store.
> 
Check out 'Effective Perl Programming' by Joseph N. Hall and Randal L.
Schwarz.  Not everything you want, but *lots* of good info on how to
write idiomatic Perl (good style, IOW).  Nothing on the project
management level, though.


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

Date: Mon, 08 Feb 1999 12:29:51 -0500
From: Steve Chen <stevesc@synopsys.com>
Subject: Re: Question: Arrays of associative arrays
Message-Id: <36BF1F0F.BB522351@synopsys.com>

Hey thanks guys for all the tips.  My inexperience probably showed but
then I'm working with a half-baked perl installation (no perldoc available,
e.g.)
trying to get some work done.  Going to try to install the perl package
myself
after this round.

Steve


Steve Chen wrote:

> Hello,
>
> Are "arrays of associative arrays" useful in Perl?  I seem to be able to
> construct it, but the problem
> is, how do I access the values of the associative arrays?  Let's say I
> have an array:
>
> @Array = (%comp1, %comp2, ..., %compn);
>
> where
>
> %compn = (keys, values)
>
> To print all the values of the associative arrays, I tried
>
> (loop over $i)
> foreach $key (sort keys($Array[$i])) {
>     print ....
> }
>
> But this won't fly with the compiler.  The function "keys" doesn't seem
> to like things that begin
> with a "$".  Any ideas?
>
> Thanks.
>
> Steve



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

Date: Mon, 08 Feb 1999 18:29:47 +0100
From: Peter Prinz <peter.prinz@siemens.at>
Subject: Serial Port in WinNT and OS/2
Message-Id: <36BF1F0B.FCCDF171@siemens.at>

Hi, 

Im trying to open the serial ports for read and 
write access in WinNT and OS/2. I have read the 
Perl FAQ (Part 8), but it was of little help.
(The link for the sysopen command was wrong!)

1.) Up to now I tried the following program

 open (PORT, "+<com2")  || die("Could not open com2 \n");
 for(;;) {
   $line = <PORT>;
   print $line;
 }
 close(PORT);

WinNT: OK 
OS/2:  About 1-2 minutes (!!!) after sending a files to the com2  I got
the output on the screen !! 
(I also use +>com)


2.) Then I tried this:

  open (PORT, "+<com2") || die(" ");
  print PORT "hello";

Ok for both Operating Systems.


3.) Then I merged both read and write:
  
  NT: Could not read anymore after writing once !!
 
  

Any suggestions ??


Peter Prinz
_____

peter.prinz@siemens.at


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

Date: Mon, 8 Feb 1999 12:42:39 -0500
From: "Allan M. Due" <Allan@due.net>
Subject: Re: Server Push in IE3/4
Message-Id: <79n7b6$j1o$1@camel15.mindspring.com>

Allan M. Due wrote in message ...
:Justin M. Silver wrote in message <79flt2$j3m@netaxs.com>...
::Does anyone know if it is possible to do server push in IE. I know how to
do
::it in Netscape, and have found documentation on how to do it with IE 2 for
::Mac and Win 3.1 (could anything be more useless?). If anyone knows, please
::tell me. also if you have a sample script it would be greatly appreciated.
::
::Thanks in advance,
::Justin
:
:
:a) Yes this can be done
:b)  Have you tested your script to see if it works with IE 3/4?  Empericism
is
:highly valued here.
:c) I don't see anything Perlish about your question, that is generally
:depreicated here.
:d) See the documentation that comes with CGI.pm  for an example that uses
:push.


Well, my memory is faulty,  I went back and looked at my script from last
year and sure enough I had to pull the info in order to IE to work.  Sorry
about that.

AmD






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

Date: Mon, 08 Feb 1999 16:50:26 GMT
From: om7@cyberdude.com
Subject: String splitting.
Message-Id: <79n4kd$7dm$1@nnrp1.dejanews.com>

I've got a string, something like $string = abcd.efg, say. Can someone remind
me how I would get the part of of the string before the full stop.

Thanks.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 08 Feb 1999 17:35:45 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: String splitting.
Message-Id: <RfFv2.657$wD5.117692@news.shore.net>


om7@cyberdude.com wrote:
: I've got a string, something like $string = abcd.efg, say. Can someone remind
: me how I would get the part of of the string before the full stop.

perldoc -f split
perldoc -f index
perldoc perlre

Depending on what you want to do with it.

--Art

-- 
--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
                  http://www.agitators.com/calendar/
--------------------------------------------------------------------------


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

Date: Mon, 08 Feb 1999 10:46:52 -0600
From: Ralph N <ralph@inlink.com>
Subject: swap space
Message-Id: <36BF14FC.BECD0A76@inlink.com>

anyone know how to make perl allow child processes to use swapspace ?

any info would be cool,

Ralph N.
webralph@inlink.com



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

Date: Mon, 08 Feb 1999 16:13:41 GMT
From: droby@copyright.com
Subject: Re: Viewing remote Perl script before executing
Message-Id: <79n2fb$5nh$1@nnrp1.dejanews.com>

In article <79jia1$en3$1@nnrp1.dejanews.com>,
  brackett@pobox.com wrote:
> Hi --
>
> Is there an easy way to view a remote Perl script before executing it? For
> example, if I know clicking "OK" will trip a Perl script at
> http:///111.111.111.11/cgi-bin/script.pl, how can I see the script before
> letting it do whatever it does?
>

No.

In fact, not only is there no easy way, there is no way at all.

--
Don Roby

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 08 Feb 1999 17:44:27 GMT
From: brackett@pobox.com
Subject: Re: Viewing remote Perl script before executing
Message-Id: <79n7po$a4e$1@nnrp1.dejanews.com>

In article <79n2fb$5nh$1@nnrp1.dejanews.com>,
  droby@copyright.com wrote:

> No.
>
> In fact, not only is there no easy way, there is no way at all.

Oh, I thought there was a way to do it. For some reason I thought that was the
one of the reasons why so many people always wanted to be able to compile Perl
code (to make it less readable).

B.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

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

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