[11927] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5527 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 30 11:07:20 1999

Date: Fri, 30 Apr 99 08:00:26 -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           Fri, 30 Apr 1999     Volume: 8 Number: 5527

Today's topics:
    Re: "Text file busy" error <newsposter@cthulhu.demon.nl>
    Re: Checkbox is not working. <camerond@mail.uca.edu>
    Re: FAQ 5.3: How do I count the number of lines in a fi <nospam.newton@gmx.net>
    Re: FAQ 5.9: How can I write() into a string? <nospam.newton@gmx.net>
        File handles in NT <matthew.evans@pa-consulting.com>
    Re: Finding the TITLE to an HTML page (Andrea L. Spinelli)
    Re: FreeBSD 3.0 pw -h <kenneth.furge@us.endress.com>
        Global Filehandle ? <Wm.Blasius@ks.sel.alcatel.de>
    Re: How to flush CGI output? (Tad McClellan)
    Re: how to use require? (Andrea L. Spinelli)
    Re: how to use require? (Tad McClellan)
    Re: importing a namespace from an arbitrary file (Tad McClellan)
        info about STDOUT t-milleville@ti.com
    Re: info about STDOUT <Wm.Blasius@ks.sel.alcatel.de>
    Re: Is this the best way to get a substring? (Randal L. Schwartz)
    Re: Is this the best way to get a substring? (bobby)
    Re: Is this the best way to get a substring? <jeromeo@atrieva.com>
    Re: Moving the Perl distribution - global @INC problem <tchrist@mox.perl.com>
        Named pipes in NT matte_8000@my-dejanews.com
        Named pipes in NT matte_8000@my-dejanews.com
    Re: Need help on "hex($1)" (Andrea L. Spinelli)
    Re: newbie in need... <nospam.newton@gmx.net>
    Re: newbie: Replace \n with <br>\n <nospam.newton@gmx.net>
    Re: PERL & Y2K <camerond@mail.uca.edu>
    Re: Perl on a 386 with 2 MB RAM??? (Benjamin Franz)
    Re: Perl on a 386 with 2 MB RAM??? (Sam Holden)
    Re: Perl on a 386 with 2 MB RAM??? (Bbirthisel)
        Processing Multiple Select info@gadnet.com
    Re: Processing Multiple Select <rhardicr@hotmail.com>
        sdbm <kris.vanbruwaene@vrt.be>
    Re: sdbm (Bbirthisel)
    Re: single quotation " erases REST OF TEXT NOSPAMcrstlblu@planet.eon.net
    Re: strict vs. Win32::Registry <haakon.alstadheim@sds.no>
    Re: unlink - why doesn't it work <nospam.newton@gmx.net>
        using perl to manage passwords? <dtbaker@bus-prod.com>
    Re: what's wrong with $x = $y or "" <nospam.newton@gmx.net>
    Re: what's wrong with $x = $y or "" <nospam.newton@gmx.net>
    Re: what's wrong with $x = $y or "" (Bart Lateur)
    Re: what's wrong with $x = $y or "" <rick.delaney@home.com>
    Re: Win95/98 file locking (Andrea L. Spinelli)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Fri, 30 Apr 1999 10:10:53 -0400
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: "Text file busy" error
Message-Id: <3729B9EE.755F6202@cthulhu.demon.nl>

Jonathan Stowe wrote:
> 
> Timothy Larson <larsot2@krypton.mankato.msus.edu> wrote:
> > Sometimes my Perl script won't run and I get a 500 error from the web
> > server.  When I try it from the command line I get the error "Text file
> > busy".
> > What the heck does that mean?  Is it in the bathroom doing some business
> > and can't be disturbed?  How can a text file be busy?
> >
> 
> You are on Unix and you are trying to overwrite the binary of a running
> program yes ?  You will have to kill the program before you can overwrite
> the file.

Or rename the executable.

Erik


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

Date: Fri, 30 Apr 1999 08:58:47 -0500
From: Cameron Dorey <camerond@mail.uca.edu>
Subject: Re: Checkbox is not working.
Message-Id: <3729B717.98712C63@mail.uca.edu>

jeffrey_f@my-dejanews.com wrote:
> 
> I have a script which saves data..and keeps it in hidden fields.  Basically,
> you press next, and puts data into hidden fields.
> 
> The problem is it only saves the last checkbox (last field in the HTML).   I
> can figure out why!!   Happens with any checkboxes...name doesnt matter, value
> doesnt...weird.
> 
> Thanks Alot.

If you are going to write to Alot, it would probably be better to send
him/her an email, rather than post these obviously private conversations
in a public newsgroup.

BTW, yes, this is weird. Where are these "hidden fields"? In Iowa? 

(It must be gettng close to the end of the semester here. I'm losing
focus.)

Cameron

-- 
Cameron Dorey
camerond@mail.uca.edu


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

Date: Fri, 30 Apr 1999 14:14:08 +0200
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: FAQ 5.3: How do I count the number of lines in a file?
Message-Id: <37299E90.C4AE9F5D@gmx.net>

Tom Christiansen wrote:
> 
>   How do I count the number of lines in a file?

How about adding Abigail's one-liner?

Cheers,
Philip


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

Date: Fri, 30 Apr 1999 14:20:31 +0200
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: FAQ 5.9: How can I write() into a string?
Message-Id: <3729A00F.F3672120@gmx.net>

Tom Christiansen wrote:
> 
>   How can I write() into a string?

Funny, my first impulse when I saw the subject line was to say "that's
covered in the docs somewhere you silly poster, why didn't you bother to
look", until I saw that it was a FAQ posting...

Cheers,
Philip


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

Date: Fri, 30 Apr 1999 13:39:38 GMT
From: Matthew Evans <matthew.evans@pa-consulting.com>
Subject: File handles in NT
Message-Id: <7gcbqp$n0i$1@nnrp1.dejanews.com>

Hi,
appologies for posting this twice, I seem to be having problems posting.

I am trying to write a script which does the following.

Web browser activates cgi-script.
Script makes pipe
script sends to stdout a "location" which points to the pipe
Web browser connects to the pipe
script opens binary file
script streams binary info to pipe.
web browser displays file (pdf)

The reason I am using pipes is so I can name the pipe, the name of the binary
file so that the pdf file has the correct file name.

Why dont I just point the browser at the pdf file?
Because the files are outside the web root, for 2 reasons.
1. security
2. dont get indexed.

OK.
The only thing is, I dont know how to use pipes on NT.
I have used them on UNIX but that was a case of mknod and system calls etc.

So my real question is:

Does anyone have any examples of named pipes for NT?
Or can you think of another way of doing what I am trying to do?

Cheers,

Matt

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


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

Date: Fri, 30 Apr 1999 12:12:24 GMT
From: aspinelli@ismes.it (Andrea L. Spinelli)
Subject: Re: Finding the TITLE to an HTML page
Message-Id: <37299b66.7717699@news.inet.it>

On Thu, 29 Apr 1999 08:35:55 GMT, Geoff Khan
<khan@prl.research.philips.com> wrote:

>Hi
>
>I'm trying to find the TITLE of a html page using v 5.001.
>How can I perl to find the proper title tag ?

use HTTP::Parser;

# read the documentation

Whenever you have to do something in Perl, you have a
50% chance it has been already done in a module

HTH,
  A.

--
Andrea Spinelli, Ismes SpA, Via Pastrengo 9, 24068 Seriate BG, Italy
e-mail: aspinelli@ismes.it Phone: +39-035-307209  Fax: +39-035-302999


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

Date: Fri, 30 Apr 1999 08:31:49 -0500
From: Kenneth Furge <kenneth.furge@us.endress.com>
Subject: Re: FreeBSD 3.0 pw -h
Message-Id: <3729B0C5.D9568C07@us.endress.com>



Fredrick DeQuan Lee wrote:
> 
> Can someone either post or email me an example of a script that uses the
> 'pw' command to set passwords or add users. The man page has thoroughly
> confused me. I've tried opening pipes to it in perl by:
> open(PW,"|pw -h");
> and
> open(PW,"pw-h|);
> with no success. Any help out there? TIA.

How about using adduser(8) and chpass(1) to do this?

- K.C.


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

Date: Fri, 30 Apr 1999 15:38:52 +0200
From: William Blasius #42722 <Wm.Blasius@ks.sel.alcatel.de>
Subject: Global Filehandle ?
Message-Id: <3729B26C.41C67EA6@ks.sel.alcatel.de>

Hello,

Maybe I am missing something here, but I am trying to do something
which should be simple but I can't figure out how to make it work.

I need to open a file with a global filehandle that is visible for
all the modules of my program. Just declaring it in main gives the
error
  'Filehandle Netmap::STDLOG never opened at Netmap.pm line 144 (#1)
or something similar for each write attempt.

There must be a way to do this, but what is it?

TIA

Wm Blasius
Stuttgart
 ...now I'm <wm.blasius@ks.sel.alcatel.de> - no matter what my mail
server says!


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

Date: Fri, 30 Apr 1999 04:32:36 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How to flush CGI output?
Message-Id: <4rpbg7.u23.ln@magna.metronet.com>

JUNYI J LIN (jlmy@orion) wrote:

: I am having problem to flush output to the screen 
: in a CGI program.  


   What happened when you searched for "flush" in the >1000 "pages" 
   of documentation that you got along with your perl?
   

: #!/usr/bin/perl


   You are missing the -w switch here.


: I tried to call flush(STDOUT) right before the


   Maybe that is because there is no flush() function in Perl?


      perl -ne 'print if /flush/i' perlvar.pod

   or

      Perl FAQ, part 5:

      "How do I flush/unbuffer an output filehandle?  Why must I do this?"


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Fri, 30 Apr 1999 12:35:35 GMT
From: aspinelli@ismes.it (Andrea L. Spinelli)
Subject: Re: how to use require?
Message-Id: <3729a2fb.9659679@news.inet.it>

On Thu, 29 Apr 1999 22:45:25 -0700, judak <judak@yahoo.com> wrote:
>and try to use it by typing "   require "html.pl"   "  and the error I
>get is
>
>"html.pl did not return a true value at test.pl line 2."

a. the last statement of html.pl should return true. I usually
accomplish this effect by ending my modules and required files with

1;

# yes, just one and a semicolon

b. read CGI.pm documentation. You seem to be re-inventing
the wheel.

HTH
  Andrea



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

Date: Fri, 30 Apr 1999 04:14:46 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: how to use require?
Message-Id: <mpobg7.u23.ln@magna.metronet.com>

judak (judak@yahoo.com) wrote:

: "html.pl did not return a true value at test.pl line 2."


   All of the messages that perl might issue are documented
   in the perldiag.pod standard perl doc that is installed
   on your hard disk somewhere.

   For your message it says:

-------------------
=item %s did not return a true value

(F) A required (or used) file must return a true value to indicate that
it compiled correctly and ran its initialization code correctly.  It's
traditional to end such a file with a "1;", though any true value would
do.  See L<perlfunc/require>.
-------------------


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Fri, 30 Apr 1999 04:41:40 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: importing a namespace from an arbitrary file
Message-Id: <4cqbg7.u23.ln@magna.metronet.com>

sstarre@my-dejanews.com wrote:
: I read Camel, permod, and perldoc for this info but I don't see this topic
: even mentioned nor any relavent examples given.


   Thanks for standing in line before posting   :-)


: How can I tell the compiler to look for modules in ../mydir or any other
: specific dir? I folled aroud with system('PATH') but


   I see that the Perl FAQs are conspicuously absent from your
   above list of resources consulted...


   Perl FAQ, part 8:

      "How do I keep my own module/library directory?"


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Fri, 30 Apr 1999 12:39:02 GMT
From: t-milleville@ti.com
Subject: info about STDOUT
Message-Id: <7gc896$jme$1@nnrp1.dejanews.com>

Hi,

I've written a script, using module Text:ANSIColor to display
the result with color.

All is right but when i pipe to a print queue,  i get control caracters.
So i would like to display via STDERR  in  color,  and if specific
SDTOUT is used  (means if a pipe is defined) then prints without color
functions.

So, how can we know if STDOUT is  redirect ?

Thanks in advance for your help

Regards
  Thierry

----- Posted via Deja.com, The People-Powered Information Exchange -----
------ http://www.deja.com/   Discussions * Ratings * Communities ------


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

Date: Fri, 30 Apr 1999 15:50:28 +0200
From: William Blasius #42722 <Wm.Blasius@ks.sel.alcatel.de>
To: t-milleville@ti.com
Subject: Re: info about STDOUT
Message-Id: <3729B524.167EB0E7@ks.sel.alcatel.de>

[ cc: to t-milleville@ti.com ]

t-milleville@ti.com wrote:
> 
> Hi,
> 
> I've written a script, using module Text:ANSIColor to display
> the result with color.
> 
> All is right but when i pipe to a print queue,  i get control caracters.
> So i would like to display via STDERR  in  color,  and if specific
> SDTOUT is used  (means if a pipe is defined) then prints without color
> functions.
> 
> So, how can we know if STDOUT is  redirect ?
> 
> Thanks in advance for your help
> 
> Regards
>   Thierry

try: $isatty = -t STDERR;

Wm Blasius
Stuttgart
-- 
 ...now I'm <wm.blasius@ks.sel.alcatel.de> - no matter what my mail
server says!


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

Date: 30 Apr 1999 07:33:20 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Is this the best way to get a substring?
Message-Id: <m1iuaejhzj.fsf@halfdome.holdit.com>

>>>>> "Ronald" == Ronald J Kimball <rjk@linguist.dartmouth.edu> writes:

Ronald> And you can bet that if this particular poster asks that
Ronald> question, it is because you provided him with code that
Ronald> exhibits that particular error.

Ronald> We already have to advise new programmers who are creating
Ronald> their own mistakes in their Perl code.  We don't need
Ronald> experienced posters giving them more mistakes by providing
Ronald> poor examples.

Ronald> Don't depend on the values of any of the special regex
Ronald> variables, unless you know that the match succeeded.

<aol>me too</aol>

But that's actually why I pointed it out.  Checking $1 without having
checked whether the match succeeded leads to general errors akin to
opening a file without checking the return of the open.  Sure, you can
write legal code that doesn't check that stuff, but more likely than
not, you'll be debugging *forever* in some other part of your code
without realizing where the true source of the error is.

And having an answerer provide bad bits of code is something I'm
always on the watch for.  We don't need to hand bad bits to newcomers.
Yes, the experts know exactly when we can get away with it, but we're
talking to non-experts here.  It's like handing someone a lightsaber
when they ask for a cutting tool, but not really telling them that
it'll pretty much cut through *everything*, or how long the blade
is. :)

Ronald> P.S.  (The other) Larry did it too.  :(

Yes, I noticed that, but had to followup to one of the two of you. :)

print "Just another Perl hacker,"

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: 30 Apr 1999 09:40:24 -0500
From: bobby@DIESPAMDIEbarnworth.com (bobby)
Subject: Re: Is this the best way to get a substring?
Message-Id: <3729c06e.140706080@news1.newscene.com>

Thanks for all the info: How about this (w/ great thanks to larry
rosler to the lead):

my $string = "123ABC456ABD"
my ($substr1, $substr2);

($substr1, $substring2) = $string =~ /(^\d+)\D+(\d+)\D+/;

# so $substr1 = 123 and $substr2 = 456


Now would it be better to do this?:

if ( ($substr1, $substring2) = $string =~ /(^\d+)\D+(\d+)\D+/ ) {
	print "yay!";
} else {
	print "too bad";
	$substr1 = $substr2 = "";
}


Thankee!


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

Date: Fri, 30 Apr 1999 07:34:15 -0700
From: Jerome O'Neil <jeromeo@atrieva.com>
Subject: Re: Is this the best way to get a substring?
Message-Id: <3729BF67.29B450E5@atrieva.com>

Ronald J Kimball wrote:
> 
> Jerome O'Neil <jeromeo@atrieva.com> wrote:
> 
> > > Never look at $1 unless you are inside a conditionally executed
> > > chunk of code dependant on the success of your match of interest.
> >
> > When that particular question is asked, I'll be sure to direct them to
> > the appropriate documentation for next and unless.

> We already have to advise new programmers who are creating their own
> mistakes in their Perl code.  We don't need experienced posters giving
> them more mistakes by providing poor examples.

I'm afraid that Randall, Tad, yourself, and I are all going to have to
agree to disagree on this particular topic.  We shouldn't be answering
questions that weren't asked, and the example was written to show
specific uses.  I'll stand by that every time.

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


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

Date: 30 Apr 1999 06:03:43 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Moving the Perl distribution - global @INC problem
Message-Id: <37299c1f@cs.colorado.edu>

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

In comp.lang.perl.misc, 
    srmorgan@my-dejanews.com writes:
:Could anyone tell me if the main @INC locations are
:compiled into perl when it is built, 

They are.

:or if there is any way of changing this
:globally without using -I in all programs? 

You can see what perlfaq8 says about keeping your own libraries,
but you won't be happy.

--tom
-- 
At MIT the server is the unit of invention.  --Rob Pike


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

Date: Fri, 30 Apr 1999 13:15:48 GMT
From: matte_8000@my-dejanews.com
Subject: Named pipes in NT
Message-Id: <7gcae0$lq4$1@nnrp1.dejanews.com>

Hi,

I am trying to write a script which does the following.

Web browser activates cgi-script.
Script makes pipe
script sends to stdout a "location" which points to the pipe
Web browser connects to the pipe
script opens binary file
script streams binary info to pipe.
web browser displays file (pdf)

The reason I am using pipes is so I can name the pipe, the name of the binary
file so that the pdf file has the correct file name.

Why dont I just point the browser at the pdf file?
Because the files are outside the web root, for 2 reasons.
1. security
2. dont get indexed.

OK.
The only thing is, I dont know how to use pipes on NT.
I have used them on UNIX but that was a case of mknod and system calls etc.

So my real question is:

Does anyone have any examples of named pipes for NT?
Or can you think of another way of doing what I am trying to do?

Cheers,

Matt

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


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

Date: Fri, 30 Apr 1999 13:30:06 GMT
From: matte_8000@my-dejanews.com
Subject: Named pipes in NT
Message-Id: <7gcb8q$meo$1@nnrp1.dejanews.com>

Hi,

I am trying to write a script which does the following.

Web browser activates cgi-script.
Script makes pipe
script sends to stdout a "location" which points to the pipe
Web browser connects to the pipe
script opens binary file
script streams binary info to pipe.
web browser displays file (pdf)

The reason I am using pipes is so I can name the pipe, the name of the binary
file so that the pdf file has the correct file name.

Why dont I just point the browser at the pdf file?
Because the files are outside the web root, for 2 reasons.
1. security
2. dont get indexed.

OK.
The only thing is, I dont know how to use pipes on NT.
I have used them on UNIX but that was a case of mknod and system calls etc.

So my real question is:

Does anyone have any examples of named pipes for NT?
Or can you think of another way of doing what I am trying to do?

Cheers,

Matt

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


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

Date: Fri, 30 Apr 1999 12:12:29 GMT
From: aspinelli@ismes.it (Andrea L. Spinelli)
Subject: Re: Need help on "hex($1)"
Message-Id: <37299c82.8002231@news.inet.it>

On Thu, 29 Apr 1999 11:48:13 +0200, engelbrecht@t-online.de (Jens
Engelbrecht) wrote:

>Hello,
>
>the following problem occurs by trying to encode an url.

use CGI;
$result = CGI::escape( $whatever );

Better...
  Andrea

--
Andrea Spinelli, Ismes SpA, Via Pastrengo 9, 24068 Seriate BG, Italy
e-mail: aspinelli@ismes.it Phone: +39-035-307209  Fax: +39-035-302999


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

Date: Fri, 30 Apr 1999 14:29:06 +0200
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: newbie in need...
Message-Id: <3729A212.82C1C248@gmx.net>

Stephen Warren wrote:
> 
> cl.exe is a C compiler. Certainly, Microsoft c provides cl.exe - I
> don't know what other vendors name their executable.

ObTrivia: I believe 'cl' stands for '_C_ompiler and _L_inker driver',
since cl.exe invokes other programs with funny names such as c1xx.exe
and link.exe etc. which do the actual dirty work.

Borland calls their C compiler tcc or bcc. FWIW.

Cheers,
Philip


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

Date: Fri, 30 Apr 1999 14:08:45 +0200
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: newbie: Replace \n with <br>\n
Message-Id: <37299D4D.16667A03@gmx.net>

Ala Qumsieh wrote:
> 
> I believe the question was whether it should be c:\bin\perl instead of
> c:\perl\bin. I guess (but I'm not sure) that it has to do with how the
> shebang line works on win32. The OS will look for perl.exe in its
> standard path (NOT in the shebang). But, if the first line starts with
> '#!' and if the word 'perl' appears in it, then the interpreter takes
> into consideration any command line flags, like '-w', that appear in
> the shebang.
> 
> Am I right?

You are AIUI. Though, for example, the Xitami web server apparently
interprets shebang lines and tries to start the program specified there,
in which case it would have to be c:\perl\bin\perl.exe or some such. But
the OS couldn't care less about the first line -- it just looks for .bat
 .com .exe in its standard path.

Cheers,
Philip


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

Date: Fri, 30 Apr 1999 07:30:35 -0500
From: Cameron Dorey <camerond@mail.uca.edu>
Subject: Re: PERL & Y2K
Message-Id: <3729A26B.B02838D6@mail.uca.edu>

Ronald J Kimball wrote:
> 
> [fantastically useful script snipped]
> # I bet we can find suckers to pay $3000 for this script!

But you'd better make it so that they have to phone or FAX in a credit
card number. Otherwise, their computer might hit the dreaded (but not
well-publicized, yet) $3K bug and crash before the payment was sent.

-- 
Cameron Dorey
camerond@mail.uca.edu


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

Date: Fri, 30 Apr 1999 12:42:20 GMT
From: snowhare@long-lake.nihongo.org (Benjamin Franz)
Subject: Re: Perl on a 386 with 2 MB RAM???
Message-Id: <MyhW2.2561$qW3.89855@typhoon-sf.snfc21.pbi.net>

In article <7gbvs0$u3$1@news.casema.net>,
Ronald van der Lingen <166959rl@student.eur.nl> wrote:
>hello I want to install a perl interpreter on a 386 laptop with 2 MB RAM. Is
>there a port that I can use on this system?

Yes. It is spelled "Linux".

-- 
Benjamin Franz


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

Date: 30 Apr 1999 12:57:59 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Perl on a 386 with 2 MB RAM???
Message-Id: <slrn7ija6n.qdm.sholden@pgrad.cs.usyd.edu.au>

 Benjamin Franz <snowhare@long-lake.nihongo.org> wrote:
>In article <7gbvs0$u3$1@news.casema.net>,
>Ronald van der Lingen <166959rl@student.eur.nl> wrote:
>>hello I want to install a perl interpreter on a 386 laptop with 2 MB RAM. Is
>>there a port that I can use on this system?
>
>Yes. It is spelled "Linux".

Perl under linux with only 2MB of RAM...

Good Luck...

-- 
Sam

We prefer English to remain a rich language, quirky, sloppy, and full
of redundancy. Same for Perl. 
	--Larry Wall


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

Date: 30 Apr 1999 14:12:45 GMT
From: bbirthisel@aol.com (Bbirthisel)
Subject: Re: Perl on a 386 with 2 MB RAM???
Message-Id: <19990430101245.26180.00000440@ng-fs1.aol.com>

Hi Ronald:

>hello I want to install a perl interpreter on a 386 laptop with 2 MB RAM. Is
>there a port that I can use on this system?

You can use one of the MS-DOS ports from
CPAN (you don't say, but I suspect that is
your OS). Expect limited module support -
but CORE functions should work. There
are a number of ports - you'll need to check
the READMEs to see what is/isn't included
in each one.

-bill
Making computers work in Manufacturing for over 25 years (inquiries welcome)


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

Date: Fri, 30 Apr 1999 18:08:33 GMT
From: info@gadnet.com
Subject: Processing Multiple Select
Message-Id: <3729f0f6.96231198@news.newsguy.com>

I'm new to this, and after extensive searching online and in my books,
I can't find anything that tells me how to process the result of a
"SELECT MULTIPLE" HTML tag. With everything else you have name=value
pairs separated by &. What does the result of a SELECT MULTIPLE look
like, and how should I split it up?

Thanks

Drummond


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

Date: Fri, 30 Apr 1999 15:20:09 +0100
From: Richard H <rhardicr@hotmail.com>
Subject: Re: Processing Multiple Select
Message-Id: <3729BC19.32325929@hotmail.com>

info@gadnet.com wrote:
> 
> I'm new to this, and after extensive searching online and in my books,
> I can't find anything that tells me how to process the result of a
> "SELECT MULTIPLE" HTML tag. With everything else you have name=value
> pairs separated by &. What does the result of a SELECT MULTIPLE look
> like, and how should I split it up?

If youve a 
<select name=wibble multiple>
<option>a
<option>b
<option>c 
it comes in as 

wibble=a&wibble=b&wibble=c etc

if youre using CGI you can read it into an array:

use CGI;
$q = CGI->new;
my @wibbles = $q->param('wibble');

Richard H


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

Date: Fri, 30 Apr 1999 15:43:47 +0200
From: Kris Van Bruwaene <kris.vanbruwaene@vrt.be>
Subject: sdbm
Message-Id: <3729B393.6295@vrt.be>

I'm running an indexing script called webcrawl from Brian Slesinsky
(http://www.webmonkey.com/code/97/16/index2a.html) that I adapted for
Win95 to index my site.  It uses the dbmopen function to tie the index
to a hash.  After 10 minutes of work it terminates with the message:
sdbm store returned -1, errno 22, key "in" at webcrawl line 104.
It makes these files:
SEARCH~1 DIR         4 096  99-04-30  15.41 search_index.dir
SEARCH~1 PAG    23 664 640  99-04-30  15.41 search_index.pag
I suspect a size problem.  Is there a limitation in the size of hashes
or sdbm files?


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

Date: 30 Apr 1999 14:05:58 GMT
From: bbirthisel@aol.com (Bbirthisel)
Subject: Re: sdbm
Message-Id: <19990430100558.26180.00000436@ng-fs1.aol.com>

Hi Kris:

>Win95 to index my site.  It uses the dbmopen function to tie the index
>to a hash.  After 10 minutes of work it terminates with the message:
>sdbm store returned -1, errno 22, key "in" at webcrawl line 104.
>It makes these files:
>SEARCH~1 DIR         4 096  99-04-30  15.41 search_index.dir
>SEARCH~1 PAG    23 664 640  99-04-30  15.41 search_index.pag
>I suspect a size problem.  Is there a limitation in the size of hashes
>or sdbm files?

Yes to both questions. You need a better DBM. Dave Roth has
ported GDBM to NT. I don't know if his port works on Win95 -
but that is one place to look.

-bill


Making computers work in Manufacturing for over 25 years (inquiries welcome)


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

Date: Fri, 30 Apr 1999 14:30:30 GMT
From: NOSPAMcrstlblu@planet.eon.net
Subject: Re: single quotation " erases REST OF TEXT
Message-Id: <371cc54b.1340315@news.planet.eon.net>

On Fri, 30 Apr 1999 05:22:52 GMT, Eric Bohlman <ebohlman@netcom.com> wrote:
>: (b) ONE script extracts this into a $variable then passes it
>:      in a hidden form field to a SECOND script
>
>"Passes it in a hidden form field" just so happens to imply "translates it
>into HTML."  If you are going to use HTML as a notation for transmitting
>data between two applications (which is what you're doing), that data is
>going to have to obey HTML's syntax rules.

	* * ? * *  are there DIFFERENT syntax rules for:
		a: <input type=\"hidden">      or
		b: <input type=\"text\">
besides the obvious that textfield gets displayed and typed into before
submission, and the hiddenfield just gets generated value=\"$thevalue\">
before submission?  NOTHING in any of the scripts is otherwise different.

>One of those rules says that you can't embed a literal double-quote inside a
>double-quoted attribute-value string; you have to escape it (though the SGML
>term, which applies because HTML is an SGML application, is "entify" it).
>Your code is trying to do what the HTML syntax rules say you can't do.  Tad and 
>others have been telling you how to modify your code so that it produces 
>HTML that follows the rules.

	then how do you explain the customer input script - a cgi generated page
that had a VISIBLE text formfield in it?  the customer simply typed in
	I am 5'10" tall
clicked the submit button, and WOILA!  the action launched another script which
simply parsed the incoming values properly, opened a dBm file and entered the
value PERFECTLY?  if you VIEW that dbm file you will see very literally:
	I am 5'10" tall
if this same script also prints it, it will do so PERFECTLY - !

apparently a VISIBLE text form field - which gets typed into - and then passes
to another script into the $ENV{'QUERY_STRING'}
	arrives, gets parsed, and displayed WITHOUT HITCH.
if this receiving script displays &/or enters into a DBM - you will see
	I am 5'10" tall
regardless if it is displayed in the browser, or VIEWED in the dbm.

but a HIDDEN form field which is supposed to be EQ to that value - 
	<input type=\"hidden\" name=\"thevariable\" value=\"$thevariable\">
on that same cgi generated page , when submitted, will LOSE the
	" tall
from its value in the receiving page, BOTH when displayed, or entered into
another dbm and then VIEWED.

so I conject that there is a DIFFERENCE between
	a: visible form text field values (once type in and submitted)
	b: hidden form field values (once generated and submitted)
either in the:
	1: ride they get through the server into the $env{'query_string'}
	2: ride they get during parseing out of the $env{'query_string'}

the precise same specifications and rules are followed in each part of each
series of scripts - same html, same PARSING, same everything - the ONLY
difference is outlined in a or b above.  :)

1-  print page with form text field 
2-  type in       I am 5'10" tall        push submit
3-parse into a $fields{'value'} so that if you code
	print "$fields{'value'}\n";
   you will see     I am 5'10" tall      on the screen
4- in the same SCRIPT code to generate a hidden form field like
	<input type=\"hidden\" value=\"$fields{'value'}\" name=\"value\">
    push submit

SEE?  after parsing in script 5 you will see that if you
	print "$fields{'value'}\n";
you will only see:
	I am 5'10      NOT        I am 5'10" tall
the parseing in 3 & 5 are identical,  the html specs in 2,3,4,5 are identical! 
I'm NOT MAKING THIS UP for crying out loud try it out for your self before you
guys flame.  if the parseing is identical, and the html is the right specs AND
identical in every series of scripts and this STILL HAPPENS - 
then you each owe me $5 ok?

thank you for your patience,
wj  remove SPAM from email to reply

>cognitive dissonance cause a programmer to deny the existence of a 
>blatantly obvious bug like this.
	exactly!  I found a bug, and everybody refuses to acknowledge it!


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

Date: 30 Apr 1999 16:05:46 +0200
From: hals <haakon.alstadheim@sds.no>
Subject: Re: strict vs. Win32::Registry
Message-Id: <upv4m430l.fsf@sds.no>

homeless <homelessinseattle@my-dejanews.com> writes:

> Thank you very much foer the help.
> 
[snip]
> Yes, I use "my" for all variables except the ones exported
> (or imported?) automatically by Win32::Registry module.
> So, I'm not using my->$HKEY_LOCAL_MACHINE.
> I'll try that though.
[snip]
You don't want my on those do something like:
use vars qw($HKEY_LOCAL_MACHINE);


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

Date: Fri, 30 Apr 1999 14:40:27 +0200
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: unlink - why doesn't it work
Message-Id: <3729A4BB.13FE2C91@gmx.net>

Tom Christiansen wrote:
> 
> The permissions of the file are unrelated to one's ability
> to delete it, except under rare circumstances.

Such as being stuck with what you affectionately like to call
"brain-dead operating systems", where a read-only attribute on a file
may stop you from deleting it.

Cheers,
Philip


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

Date: Fri, 30 Apr 1999 09:54:31 -0500
From: Dan Baker <dtbaker@bus-prod.com>
Subject: using perl to manage passwords?
Message-Id: <3729C427.F3E8EFF0@bus-prod.com>

I need to implement some password protected areas of a website... can
anyone suggest some online tutorials on the subject? I am looking for
information on what is possible, how secure it will be, whether robots
would be able to "get in" to subdirectories. etc.

If you have experience in this area, and can explain the basic options
and pros/cons of each, I'm sure the group would all learn a lot! Just a
basic overview would help.

If anyone can post links, examples, or suggest good reading....

thanx,

Dan
# If you would like to reply-to directly, remove the - from my username
* no spam please... regulated by US Code Title 47, Sec.227(a)(2)(B)  *


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

Date: Fri, 30 Apr 1999 14:06:02 +0200
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: what's wrong with $x = $y or ""
Message-Id: <37299CAA.39730D64@gmx.net>

Abigail wrote:
> 
> $$ Philip Newton <nospam.newton@gmx.net> wrote in
> $$ message news:37283552.87610075@gmx.net...
> $$ > That would appear to be a useful addition. But as Bart points out, it
> $$ > probably couldn't be called ??.
> 
> Oh. Better tell that to Larry W, as he prefers ?? as name for this
> operator. If it will ever be part of Perl.

Oh well, fair enough, I suppose. I assumed the name '??' was your
invention.

Cheers,
Philip


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

Date: Fri, 30 Apr 1999 14:06:35 +0200
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: what's wrong with $x = $y or ""
Message-Id: <37299CCB.916B42FB@gmx.net>

Ronald J Kimball wrote:
> 
> Why couldn't it be called ?? ?

Conflict with the ?...? one-time pattern match operator?

Cheers,
Philip


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

Date: Fri, 30 Apr 1999 12:40:24 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: what's wrong with $x = $y or ""
Message-Id: <3729a444.6860132@news.skynet.be>

Abigail wrote:

>Oh. Better tell that to Larry W, as he prefers ?? as name for this 
>operator. If it will ever be part of Perl.

Larry! Larry! Larry!

Urm... Isn't that supposed to be "Jerry"?

Anyway... if Larry likes it... who'd stop it then?

	Bart.


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

Date: Fri, 30 Apr 1999 14:49:46 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: what's wrong with $x = $y or ""
Message-Id: <3729C2A9.D3ED1D6E@home.com>

[posted & mailed]

Philip 'Yes, that's my address' Newton wrote:
> 
> Ronald J Kimball wrote:
> >
> > Why couldn't it be called ?? ?
> 
> Conflict with the ?...? one-time pattern match operator?

What conflict?  Do you have an example of a statement with ?? that would
make the meaning of the operator ambiguous?

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Fri, 30 Apr 1999 12:17:24 GMT
From: aspinelli@ismes.it (Andrea L. Spinelli)
Subject: Re: Win95/98 file locking
Message-Id: <37299e0d.8397332@news.inet.it>

On Thu, 29 Apr 1999 11:39:08 -0700, David Cassell
<cassell@mail.cor.epa.gov> wrote:

>Collin Starkweather wrote:
>> 
>> Testing seems to indicate that flock does not work in Win95/98.  Is
>> there a way to lock a file in Win95/98 that I am unaware of?

The best workaround I have tested is creating a Win32::Semaphore for
each file you want to lock; I think this is the best you can do with
ActiveState's Perl.  I never used any Cygnus port myself.

HTH
--
Andrea Spinelli, Ismes SpA, Via Pastrengo 9, 24068 Seriate BG, Italy
e-mail: aspinelli@ismes.it Phone: +39-035-307209  Fax: +39-035-302999


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

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

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