[9711] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3309 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Aug 1 21:04:49 1998

Date: Sat, 1 Aug 98 18:00:24 -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           Sat, 1 Aug 1998     Volume: 8 Number: 3309

Today's topics:
    Re: 3 more questions for perl win32 officianados (Bob Trieger)
        Another newbie problem with Perl odbc and #!@!!@#% Win9 beaugard@inteport.net
    Re: Associative array of associative arrays <mpersico@erols.com>
    Re: catch a signal <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: Changes from 5.003_07 to 5.004_04 (Martien Verbruggen)
    Re: Error message -- Newbie question (Andre L.)
    Re: Error message -- Newbie question (Ronald J Kimball)
        Extentions on NT Perl.  (can't compile examples) (Eric W. Bressler)
        Gary L. Burnore (was Re: hiding user input) btdt@my-dejanews.com
    Re: Gary L. Burnore (was Re: hiding user input) (Gary L. Burnore)
    Re: hiding user input (Abigail)
    Re: hiding user input (Georg Bauer)
    Re: hiding user input (Gary L. Burnore)
    Re: hiding user input (Gary L. Burnore)
    Re: hiding user input (Gary L. Burnore)
    Re: hiding user input (Ronald J Kimball)
        How to change one field in a flat database? (Bjorn Malmberg)
    Re: How to match several octals in a row? <rick.delaney@shaw.wave.ca>
    Re: How to match several octals in a row? (Ronald J Kimball)
    Re: How to read a variable from another Perl program? <mpersico@erols.com>
    Re: Interesting Question needs Quick Answer <rra@stanford.edu>
    Re: List files by creation date? <mpersico@erols.com>
    Re: Making my own modules <bowlin@sirius.com>
    Re: Newbie Perl Problem <mpersico@erols.com>
    Re: newbie split question (Abigail)
    Re: non-perl question about linux (Bob Trieger)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Fri, 31 Jul 1998 01:10:00 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: 3 more questions for perl win32 officianados
Message-Id: <6pr5mb$gr4$1@strato.ultra.net>

[ posted and mailed ]

kheise@aol.com (KHeise) wrote:
-> i am a novice working with perl in an NT 3.51 environment. i mostly use it to
-> process large fixed-length data files. i have the following qustions:
-> 
-> 1) when i do a binary read on files with a line-feed (hex 0D) in the middle
->  of
-> a record it prints to file with a carriage-return inserted in front of it. i
-> can't have this happen because the records are no longer fixed-length. i
->  asked
-> about this at the beginning of this week and a couple of generous folks
-> recommended the binmode(HANDLE) command. i used this and, though it solved
-> several other problems, the carriage return still appears. any suggestions?

Post a snippet of your code that is causing or resulting in this problem.

-> 2) how can i print a report in perl win32 after processing a file?

perldoc -f print

-> 3) what is a spammer? this probably is a somewhat humorous question that
-> exposes my ignorance about the perl community, but i need to know.

A spammer is a jerk that posts or mails unsolicited/off topic-trash. Usually 
some kind of advertisement. Or somebody that posts the same article to many 
newsgroups instead of cross-posting even if it is on topic in all of the 
groups posted to.


HTH

Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-800-400-1972 
  Ext: 1949 and let the jerk that answers know 
  that his toll free number was sent as spam. "


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

Date: Fri, 31 Jul 1998 01:45:08 GMT
From: beaugard@inteport.net
Subject: Another newbie problem with Perl odbc and #!@!!@#% Win95
Message-Id: <35c12028.339562785@news.interport.net>


I am trying to run the following code using Perl 5.004:

use win32::odbc;
$dsn = "computername";
$db = new win32::odbc($dsn);

This works on NT but on win95 build 4.00.950a. I get the following
error:

	"Can't locate object method "new" via package "win32::odbc" at
test.pl, line 5"

This is really fustrating to say the least. I'm using the same
distribution on both machines. Anyone who has any advice can post or
perhaps e-mail me at

beaugard@interport.net

Thanks in advance,
Ed Beaugard


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

Date: Thu, 30 Jul 1998 21:58:49 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
To: h_o_t_r_o_d@my-dejanews.com
Subject: Re: Associative array of associative arrays
Message-Id: <35C124D9.7375D07E@erols.com>

Step 1: It will be better for your brain (it was for mine!) to call a
hash a hash. A hash is a collection of key, value pairs. The key must be
a string, the value is a scalar. However, a scalr can be a number, a
string or a REFERENCE TO A MORE COMPLIACTED STRUCTURE. Such as ANOTHER
HASH!

To wit:

my %sexyBabeHash = (
	name => "Laura Luft",
	chest => 38,
	waist => 24,
	hips => 36
);

$sexyBabeHash{chest} == 38

Contrast with 

my %sexyBabeHash = (
	name => "Laura Luft",
	measurements => {chest => 38,
			waist => 24,
			hips => 36}
);

"measurements" contains a reference to a hash such that

$sexyBabeHash{measurements}->{chest} == 38

or

my %sexyBabeHash = (
	name => "Laura Luft",
	measurements => [ 38, 24, 36]
);

"measurements" constains a reference to an array such that

$sexyBabeHash{measurements}->[0] == 38.

Then, we get really nuts:

my %sexyBabeHash = (
	name => "Laura Luft",
	measurements => { 
			  chest => {
				    left => 28,
				    right => 10
				   }, #Bizzare, yes, but I want to 
				      #illustrate a point!
			  waist => 24,
			  hips => 36
		        }
);

$sexyBabeHash{measurements}->{chest}->{left} == 28

A few notes:

1) I didn't hang any hashes of off arrays. You could do it. Try it.
2) If you want to build the hash piece by piece instead of initializing
it like I did, you can do that to. Just figure ot how you'd get at it to
print it and then stick the statement on the left hand side of an =
sign.
3) Get Data::Dumper from CPAN if it is not part of your distriubution.
Use it to print your hashes to see if you've got it right.

HTH


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

Date: 31 Jul 1998 15:04:49 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: catch a signal
Message-Id: <7xbtq6dvda.fsf@fidelio.vcpc.univie.ac.at>

Re: catch a signal, Cyril <matalon@jouy.inra.fr> said:

Cyril> I would like to catch a kill signal in my perl cgi

You can't catch KILL, however...

Cyril> program in order to close a data base if a user press
Cyril> the Stop button in Netscape.  Is there a solution ?

 ... the exact details may depend on which WWW server you're
using, but it's normally SIGPIPE that gets sent if the
connection to a CGI program goes away (for whatever reason).

Look at

    $ perldoc perlipc

about how to process signals.  That should get you `on the
road' at least.

A timeout may also be something to consider for such an
application.

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


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

Date: 30 Jul 1998 23:20:53 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Changes from 5.003_07 to 5.004_04
Message-Id: <6pqv4l$5gu$2@nswpull.telstra.net>

In article <Pine.LNX.3.96.980728122042.21396A-100000@info6.load-otea.hrdc-drhc.gc.ca>,
	Nathan Krislock <krislock@info6.load-otea.hrdc-drhc.gc.ca> writes:
> 
> Hi, I was wondering if anyone knows of a list of changes made from Perl
> 5.003_07 to Perl 5.004_04.  I'm interested because a program I wrote works
> great with 5.003_07, but has problems when run with 5.004_04.

You might be able to find out more by reading the perldelta
documentation (as is explained in  man perl)

# perldoc perldelta
# man perldelta

Of course, if the differences between the two versions are not just
the perl version, but for example a different machine, OS or available
system libraries, or even a different OS version, then there might be
other things in play.

Martien
-- 
Martien Verbruggen                      |
Webmaster www.tradingpost.com.au        | "In a world without fences,
Commercial Dynamics Pty. Ltd.           |  who needs Gates?"
NSW, Australia                          |


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

Date: Thu, 30 Jul 1998 20:03:25 -0500
From: alecler@cam.org (Andre L.)
Subject: Re: Error message -- Newbie question
Message-Id: <alecler-3007982003250001@dialup-817.hip.cam.org>

In article <35C0D5A4.5F4A854B@bit-net.com>, "T. Carrier"
<carriert@bit-net.com> wrote:

> Hello,
> 
> I am trying to get Perl do some form processing for me.  But I keep
> receiving the the following error message when I click on the submit
> button on the form:
> 
> 'C:\Inetpub\wwwroot\test.pl' script produced no output 
> 
> Here are some specifics:
> I'm using MicroSoft Personal Web Server with Windows 95.
> 
> The test.pl exists in the /cgi-bin directory
> 
> Here is the registry entry for the .pl extension:
> My Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet
> \Services\W3SVC\Parameters\ScriptMap\.pl   "C:\Perl\bin\PerllS.dll"
> 
> 
> Here is the code for the test.pl:
> 
> #!c:\perl\bin\perl
> 
> $temp=$ENV{'QUERY_STRING'};
> 
> @pairs=split(/&/,$temp);
> 
> foreach $item(@pairs{
>         ($key,$content)=split(/=/,$item,2);
>         $content=~tr/+/ /;
>         $content=~s/%(..)/pack("c",hex($1))/ge;
>         $fields{$key}=$content;
> }
> 
> print "Content-type: text/html\n\n";
> print "<body bgcolor=\"#FFFFFF\">\n";
> print "Hello World\n";
> print "<h2>$fields{'name'}</h2>\n";
> print "<pre>$fields{'comment'}</pre>\n";
> 

I found a spare closing parenthesis in my drawer. You can have it.

   )

Andre


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

Date: Thu, 30 Jul 1998 21:35:48 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Error message -- Newbie question
Message-Id: <1dczz4j.16bigzn1r4j0lcN@bay2-138.quincy.ziplink.net>

T. Carrier <carriert@bit-net.com> wrote:

> 'C:\Inetpub\wwwroot\test.pl' script produced no output 
> 
> foreach $item(@pairs{
               ^^^^^^^^

Next time, test your script from the command line to make sure it
compiles.

-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Thu, 30 Jul 1998 16:08:57 GMT
From: ebressler@netegrity.com (Eric W. Bressler)
Subject: Extentions on NT Perl.  (can't compile examples)
Message-Id: <35c099c1.152813859@argand.security.com>

	I loaded the make file with the examples for extentions to
Perl in MSVC5.0.  I cannot get it to make the files.  I get this error

'CPerl' : Undeclared Identifier.

I have the Precomplier Define of PERL_OBJECT and everything but it
will not declare a CPerl.  If I put in the line

class CPerl;

before these lines in nt.h, I can compile but my personal ones still
won't.  So, anyone able to help?


void NTInit(CPERLarg);
void NTLibInit(CPERLarg);
void Win32OLEInit(CPERLarg);
void* LibraryLoad(char*);





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

Date: Sun, 02 Aug 1998 00:03:26 GMT
From: btdt@my-dejanews.com
Subject: Gary L. Burnore (was Re: hiding user input)
Message-Id: <6q0acd$f2n$1@nnrp1.dejanews.com>

In article <6pt28e$dav$1@client3.news.psi.net>,
  abigail@fnx.com wrote:
> Gary L. Burnore (gburnore@databasix.com) wrote on MDCCXCV September

Deja News shows more than 40 postings in the "hiding user input"
thread, but none from Gary L. Burnore.  I guess he must have
asked them not to index his postings.  For many years now,
Gary L. Burnore has been disrupting discussions in various forums.
If you have a way to automatically ignore his postings, I suggest that
you activate it now.  If you don't, I suggest that you make
a mental note not to reply to him in any forum.


Been there, done that, tired now.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Sun, 02 Aug 1998 00:40:10 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: Gary L. Burnore (was Re: hiding user input)
Message-Id: <35c4b3b1.164889638@nntpd.databasix.com>

On Sun, 02 Aug 1998 00:03:26 GMT, in article
<6q0acd$f2n$1@nnrp1.dejanews.com>, btdt@my-dejanews.com wrote:

>In article <6pt28e$dav$1@client3.news.psi.net>,
>  abigail@fnx.com wrote:
>> Gary L. Burnore (gburnore@databasix.com) wrote on MDCCXCV September
>
>Deja News shows more than 40 postings in the "hiding user input"
>thread, but none from Gary L. Burnore.  I guess he must have
>asked them not to index his postings.  

Oh yes, I called Mr DejaNews himself and asked him not to archive my posts.
He sits there night and day just to make sure they don't get archived.

(DUH X-NO-Archive: yes>

>For many years now,
>Gary L. Burnore has been disrupting discussions in various forums.

Your opinion of course.  Perhaps you mean alt groups?  But then you've never
been to comp.unix.* or comp.security.* or comp.databases.* ... ... ...

>If you have a way to automatically ignore his postings, I suggest that
>you activate it now.  If you don't, I suggest that you make
>a mental note not to reply to him in any forum.
>

Who are you to suggest anything while hiding behind a semi-anonymous address.
(Semi-anonymous because it's easy to see you're postig from jps.net which is
located in Sacramento, CA.>.  

Besides, even I've mentioned that if someone doesn't like my post they can
killfile me.  So take your cowerdice and shove it sideways.

-- 
        for i in databasix primenet ; do ; gburnore@$i ; done
---------------------------------------------------------------------------
                  How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore                       |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH!                                  |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3 3 4 1 4 2  ]3^3 6 9 0 6 9 ][3
spamgard(tm):  zamboni                |     Official Proof of Purchase
===========================================================================


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

Date: 31 Jul 1998 00:54:28 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: hiding user input
Message-Id: <6pr4k4$2uu$2@client3.news.psi.net>

Gary L. Burnore (gburnore@databasix.com) wrote on MDCCXCIV September
MCMXCIII in <URL: news:35c8e560.14065952@nntpd.databasix.com>:
++ 
++ Besides, in this case, John is correct. If Abigail is too lazy to answer the
++ qustion, Abigail should just shut the fuck up.


I don't think so.



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


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

Date: Sat, 1 Aug 1998 18:36:30 GMT
From: gb@hugo.westfalen.de (Georg Bauer)
Subject: Re: hiding user input
Message-Id: <gb-0108982036300001@jill.westfalen.de>

In article <lt1zr14kcp.fsf@asfast.com>, Lloyd Zusman <ljz@asfast.com> wrote:

>But how do most "newbies" know that so many people have invested so
>much time?  Being "newbies" means that they are unfamiliar with the
>fact that this has occurred until *after* someone points it out
>to them.  Should this pointing out be done rudely or politely?

Huh? Almost _every_ newsgroup has a FAQ nowadays. Actually the existence
of a FAQ is quite known - so why do people always ask FAQs instead of
looking for the answer at the usual places first? And don't say that those
newbies don't know that FAQs exist - if they don't know this simple fact,
they shouldn't be on Usenet. It is ridicoulus how much people around here
refuse to read the FAQ, refuse to read the newsgroup for some time before
posting and refuse to use common sense to get answers to their questions,
before posting here. And it is really unnerving to see how many people
ignore the existence of the documentation and the copy of the FAQ that
come with Perl. Actually _do_ they look into the directory of the
installed version of Perl they just installed? It's not as if it is really
that hard to find documentation and hints for Perl - you have to be blind
to not see them. Makes me wonder how they actually were able to find Perl
at all.

No, I have no mercy for those "newbies" that refuse to use their brain.
Only difference between me and Abigail: I don't think those "newbies" are
not worth the effort and I usually plonk them or just even don't do that.
I don't flame them, because I think they are not worth it and in any case
won't have enough brain to understand. And I do filter several topics so I
don't read them, for example everything with "help" or "newbie" in the
subject. I know that I miss good questions and answers to those by this
method - you have to thank those ignorant wannabee-newbies for that.

I _do_ like real newbies - those that start programming in Perl, ask
sensible questions, try to build up their own answers, and come back when
they solved their problem and so give back what they learned by helping
others. Those newbies will most definitely read the FAQ and will read the
Perl documentation and they won't ask "hey, I lost my brain, have you
found it?"-type of questions.

BTW: the existence of the FAQ is announced weekly. So you really wouldn't
have to wait long to get knowledge of the existence of the FAQ. Even if
you really missed the fact that it is already on your harddisc after
installing Perl.

bye, Georg

-- 
"Sicher ist, das nichts sicher ist. Aber selbst das nicht."
 - Ringelnatz


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

Date: Sun, 02 Aug 1998 00:02:48 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: hiding user input
Message-Id: <35ccac64.163019802@nntpd.databasix.com>

On 1 Aug 1998 22:33:42 GMT, in article <6q0546$gf9$8@info.uah.edu>,
gbacon@cs.uah.edu (Greg Bacon) wrote:

>: YES it's time for the fucking jerkoff rude bastards who _CALL_ themselv
>: experts to get the fuck out of this group and run on over to your brand
>: spanking new moderated group.  You rude jerkoff asshole "EXPERTS" can j
>: talk amongst yourself and let the experts who AREN'T rude assholes stay
>
>I reiterate: careful what you wish for.

I do most certainly wish those such as you would move on over to your
moderated group where you can talk about how much [Pp][Ee][Rr][Ll] you know.
-- 
        for i in databasix primenet ; do ; gburnore@$i ; done
---------------------------------------------------------------------------
                  How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore                       |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH!                                  |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3 3 4 1 4 2  ]3^3 6 9 0 6 9 ][3
spamgard(tm):  zamboni                |     Official Proof of Purchase
===========================================================================


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

Date: Sun, 02 Aug 1998 00:04:08 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: hiding user input
Message-Id: <35cdacde.163142343@nntpd.databasix.com>

On 1 Aug 1998 22:39:04 GMT, in article <6q05e8$gf9$9@info.uah.edu>,
gbacon@cs.uah.edu (Greg Bacon) wrote:

>In article <lt1zr14kcp.fsf@asfast.com>,
>	Lloyd Zusman <ljz@asfast.com> writes:
>: But how do most "newbies" know that so many people have invested so
>: much time?  Being "newbies" means that they are unfamiliar with the
>: fact that this has occurred until *after* someone points it out
>: to them.  Should this pointing out be done rudely or politely?
>
>You're sadly misinformed.  The advice for new users in (surprise!)
>news.announce.newusers (have you read it?) suggests that new users
>lurk for a while before posting.  If new users would wait at most a
>week before posting, they'd see gnat's and TomP's posts about FAQs.
>
>The whole reason people compose FAQ lists is because they're tired of
>seeing the same questions over and over and over and over and over and
>over and over and over and over and over and over and over and over and


So if you're tired of answering over and over ..., shut the fuck up and go
away.
-- 
        for i in databasix primenet ; do ; gburnore@$i ; done
---------------------------------------------------------------------------
                  How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore                       |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH!                                  |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3 3 4 1 4 2  ]3^3 6 9 0 6 9 ][3
spamgard(tm):  zamboni                |     Official Proof of Purchase
===========================================================================


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

Date: Sun, 02 Aug 1998 00:04:55 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: hiding user input
Message-Id: <35cead0b.163186864@nntpd.databasix.com>

On 1 Aug 1998 22:43:03 GMT, in article <6q05ln$gf9$10@info.uah.edu>,
gbacon@cs.uah.edu (Greg Bacon) wrote:

>In article <35c91a66.60094455@nntpd.databasix.com>,
>	gburnore@databasix.com (Gary L. Burnore) writes:
>: Using truth and logic is so unfair scratchie. Why do you use such a tactic
>: with Bacon?
>
>Since when is ad hominem valid logic?
>
>Please tell us that you've stopped beating your poor wife.

Please let us know when and if you stop fucking farm animals.


-- 
        for i in databasix primenet ; do ; gburnore@$i ; done
---------------------------------------------------------------------------
                  How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore                       |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH!                                  |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3 3 4 1 4 2  ]3^3 6 9 0 6 9 ][3
spamgard(tm):  zamboni                |     Official Proof of Purchase
===========================================================================


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

Date: Thu, 30 Jul 1998 21:35:51 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: hiding user input
Message-Id: <1dd008m.zd226k39ktfaN@bay2-138.quincy.ziplink.net>

Scott Stark <sstark@informix.com> wrote:

> As a matter of fact I did check the faq and didn't find any such animal,
> except "Is there a way to hide perl's command line from programs such as
> "ps"?". That one didn't make sense to me. So either there's something
> wrong with my eyes or I'm too stupid to figure out the FAQ.

Here ya go.  It's in perlfaq8.


  How do I ask the user for a password?

        (This question has nothing to do with the web. See a different
        FAQ for that.)

        There's an example of this in the "crypt" entry in the perlfunc
        manpage). First, you put the terminal into "no echo" mode, then
        just read the password normally. You may do this with an
        old-style ioctl() function, POSIX terminal control (see the
        POSIX manpage, and Chapter 7 of the Camel), or a call to the
        stty program, with varying degrees of portability.

        You can also do this for most systems using the Term::ReadKey
        module from CPAN, which is easier to use and in theory more
        portable.



-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Thu, 30 Jul 1998 15:59:46 GMT
From: news@NOSPAM.gb-design.com (Bjorn Malmberg)
Subject: How to change one field in a flat database?
Message-Id: <35c08f18.6348164@news.algonet.se>

Hi folks!

I have a problem here. I have a flat database with about 70 lines and
about 350 fields that looks like this:

Bjvrn Malmberg&&aaaaa@aaaaa.com&&111-111 111&&222-222 222&&1111

Where the first field is name, the second email, third phone number,
fourth cellular, and last a password...

I want to search and replace the email field after checking that the
password is correct. I've come so far that it checks for the right
password, but I can't get it to change the email as it's supposed
to....

I've been struggling around with this for a lot of time now, and I
have no clue of what I can do... Can someone please help me?

TIA

Bj0rN


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

Date: Fri, 31 Jul 1998 00:46:59 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: How to match several octals in a row?
Message-Id: <35C1156C.3B4FF98C@shaw.wave.ca>

Michael Shavel wrote:
> 
> Hi
> 
> I am trying to create a regular expression that will match the 
> following character string. I have tried using  ?: but to no avail.  I 
> need to strip these characters only if they occur consecutively in 
> this order.
> $_=~s/(?:\015\040\040\040\040\031)//g;
> 

This should work fine, but why one earth would you use ?: in this case?
Check out perlre to see what it's for.

   s/\015\040\040\040\040\031//g;# would be sufficient

Perhaps you have an older version of perl (4 maybe)?  But then you would
have mentioned the syntax errors...

-- 
Rick Delaney
rick.delaney@shaw.wave.ca


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

Date: Thu, 30 Jul 1998 21:35:54 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: How to match several octals in a row?
Message-Id: <1dd00cs.yahc2rlr1xezN@bay2-138.quincy.ziplink.net>

Michael Shavel <mshavel@erols.com> wrote:

> I am trying to create a regular expression that will match the following
> character string. I have tried using  ?: but to no avail.  I need to strip
> these characters only if they occur consecutively in this order. 
> 
> $_=~s/(?:\015\040\040\040\040\031)//g; 

Works for me:

  DB<1> $_ = "\015\040\040\040\040\031"

  DB<2> x $_
0  "\cM    \cY"
  DB<3> $_=~s/(?:\015\040\040\040\040\031)//g;

  DB<4> x $_
0  ''
  DB<5> 

What does it do for you?

Note that the parentheses are unnecessary in that regex.

-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Thu, 30 Jul 1998 22:04:26 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
To: guna@my-dejanews.com
Subject: Re: How to read a variable from another Perl program?
Message-Id: <35C1262A.2A8065A9@erols.com>

Hmm. Two independent 'C' programs couldn't do it either with just an
extern because they aren't LINKED together. You'd have to do some fancy
foot work with shared memory or shared libs to produce the effect you
want.

Maybe, since the client and server are already taking to each other (or
else you don't have a client and server relationship) you caould have
one just ask the other for the value.

guna@my-dejanews.com wrote:
> 
> Hi,
>    i have two independant perl programs, say "server" and "client".
> The "server" starts something like,
> 
> #!/usr/local/bin/perl
> 
> $myname = "John Steamer";
> .
> .
> 
> Now, is there a way i can read $myname from "client" without actually parsing?
> something like an "extern" in "C" programs. If i use "require" it actually
> executes the "server" code which i don't want.
> 
> Please cc to my email (guna@remedy.com) address also.
> 
> thanks,
> Guna
> 
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 01 Aug 1998 16:46:17 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Interesting Question needs Quick Answer
Message-Id: <m3af5oclkm.fsf@windlord.Stanford.EDU>

P L Hegarty <sm8plh@csc.liv.ac.uk> writes:

> I want to write a perl script which produces as its output an exact copy
> of itself. So when you run the script you get exactly the same output to
> screen as if you used 'cat' or 'type'. You can not read anything into
> the script or use any system calls. That last bit is the heart of the
> problem.

See my sig.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Thu, 30 Jul 1998 22:11:20 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
To: curt@vphos.net
Subject: Re: List files by creation date?
Message-Id: <35C127C8.8DF23325@erols.com>

You need to read the perldocs. Try perlfunc. Check out all functions
ending in "dir"

HTH


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

Date: Thu, 30 Jul 1998 18:21:46 -0700
From: Jim Bowlin <bowlin@sirius.com>
To: Antti-Jussi.Korjonen@sonera.fi
Subject: Re: Making my own modules
Message-Id: <35C11C2A.1C4C7643@sirius.com>

Antti-Jussi Korjonen wrote:
> 
> Are there any HOWTO's or FAQ's on that subject?
> 
> I've made a module and it works just fine, except it doesn't
> return anything. It reads the values needed ok and stores
> them in a string.
> What do I need to do to return the string or the contents of
> the string to the function, which is calling it?

Check the documentation that came with Perl.  A good one
to start with is perltoot.html.

HTH -- Jim Bowlin


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

Date: Thu, 30 Jul 1998 22:13:56 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
To: "William L. Loucks" <loucksw@bright.net>
Subject: Re: Newbie Perl Problem
Message-Id: <35C12864.E59EEA86@erols.com>

It all depends.

If you are invoking your script as 

perl myScript

then your perl executable has the wrong permissions

If you are using she-bang in your script (#!/usr/local/bin/perl)

then your invokation should be

 ./myScript 

in which case either your perl executable OR myScript has the wrong
permissions.

Hppy hunting


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

Date: 31 Jul 1998 01:02:23 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: newbie split question
Message-Id: <6pr52v$2uu$3@client3.news.psi.net>

Thomas Rock (thomas@x-tekcorp.com) wrote on MDCCXCIV September MCMXCIII
in <URL: news:35C0DE69.2D4B@x-tekcorp.com>:
++ 
++ You could also do:
++ 
++ @list=split('^');

Really?

   $_ = 'aap^noot^mies';
   @list  = split '^';
   @list2 = split '\^';
   map {print "<$_>"} @list;  print "\n";
   map {print "<$_>"} @list2; print "\n";

prints

   <aap^noot^mies>
   <aap><noot><mies>


++ Have fun learning Perl!


You too!



Abigail
-- 
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")\n-> define ("foldoc", "perl")) [0] -> print'


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

Date: Fri, 31 Jul 1998 01:36:56 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: non-perl question about linux
Message-Id: <6pr78q$gr4$4@strato.ultra.net>

[Follow-Ups set]

"Brent Verner" <REPLY_TO_damonbrent@earthlink.net> wrote:
-> hey, i'm sorry if this non-perl question offends you, but i have a great
-> amount of respect for some of the regular posters, and their opinions would
-> be appreciated on this matter -- i know i'm wrong, so please don't waste any
-> more space by flaming this post.

If you knew you were wrong in doing it, why did you?

-> i'm gonna leave the perl/win32 world behind and install linux on my box.
-> i've done a fair amount of research on linux, and have no idea which
-> distribution of linux to install.  if any of you out there are running
-> linux, i'd appreciate your recommendation(s) on which linux to get.  i've
-> been to most of the linux newsgroups, but most of the people posting are the
-> people having trouble with their linux (i may end up there), so i'm wanting
-> opinions from people who aren't having problems with their OS.

Ask in a group dedicated to Linux. The POLs (prisoners of Linus) should know 
better than to follow-up to this with an answer, god forbid, somebody as a 
question about which MS OS to use here.

news:comp.os.linux
http://linux.org


Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-800-400-1972 
  Ext: 1949 and let the jerk that answers know 
  that his toll free number was sent as spam. "


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

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

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