[9747] in Perl-Users-Digest
Perl-Users Digest, Issue: 3341 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 4 12:06:14 1998
Date: Tue, 4 Aug 98 09:01:39 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 4 Aug 1998 Volume: 8 Number: 3341
Today's topics:
Re: hiding user input birgitt@my-dejanews.com
Re: hiding user input (Greg Bacon)
Re: hiding user input (Greg Bacon)
Re: hiding user input (Patrick Timmins)
Re: hiding user input (Greg Bacon)
Re: hiding user input (Greg Bacon)
Re: hiding user input <dgris@rand.dimensional.com>
Re: how to write a script using perl to configure a CIS mchunziker@us.fortis.com
How to write a UNIX command line script which accesses <erik.kleinbussink@lmco.com>
Re: How to write a UNIX command line script which acces <jim.michael@gecm.com>
Re: Interesting Question needs Quick Answer (Kevin Reid)
Re: Interesting Question needs Quick Answer (Kevin Reid)
Re: Long filenames under Perl4 (DOS) <dparrott@ford.com>
Need to upload files to web server under NT 4.0 (Bill Morgan)
Oraperl <ccaamrg@ucl.ac.uk>
password and DOS b_redeker@hotmail.com
passwords and DOS/Win b_redeker@my-dejanews.com
Re: Pattern matching: Option "i" (Josh Kortbein)
Re: perl problem on dec machine (Henryrb)
Perl programmers needed for database projects (Register Agent for $29US)
print statement and Perl parser <djinn@tech.eurodyn.com.gr>
Problem updating $dir in module File::Find - Win32 plat venus@bom2.vsnl.net.in
Re: Question: Select (Kevin Reid)
Re: random number (Larry Rosler)
Reading in one file and writing to another <mpgromm@sandia.gov>
reading passwords b_redeker@my-dejanews.com
Re: Setting timeout? (Andrew M. Langmead)
strange results from tied hash krupicka@tellabs.com
Re: strange results from tied hash <quednauf@nortel.co.uk>
Using Perl to create a DLL <esj@harvee.billerica.ma.us>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 04 Aug 1998 14:05:00 GMT
From: birgitt@my-dejanews.com
Subject: Re: hiding user input
Message-Id: <6q74eb$9t8$1@nnrp1.dejanews.com>
In article <6q638q$esj$1@hiram.io.com>,
tigger@io.nospaam.com wrote:
> x.com> <6q5hu8$9vh$2@nswpull.telstra.net>
> Organization:
> Reply-To: tigger@io.nospaam.com
>
> Well, as one of the newest newbies (new, but *not* clueless) on this
> newsgroup, I'm going to put in my $.02 in here. I've been following this
> thread, and outside of one or two voices of reason that got drowned out
> early on, this is the most virulent, hateful, bandwidth-wasting bunch of
> postings I've ever seen! I've never seen such a car-crash
> (car-crash=something too awful to stop watching--sort of like Jerry
> Springer) in my life. The one and only saving grace of this thread is
> that it is only *one* thread, and as such is easy to skip over.
>
Don't get your hopes up. These threads repeat themselves in a
timeframe of two months round about. They don't go away, moderation
being next door or not, the only thing you can learn through them is
*how* genuinely kind expert volunteers (who do help a lot when it comes
to real questions) can't, won't or do want to deal with trouble
makers.
It's a great learning experience - make yourself a "Frequent Awful Quarrels"-
list. Then be happy - you just created the first FAQ you don't have to
read, isn't that great ? :-)
Birgitt Funk
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 4 Aug 1998 14:18:20 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: hiding user input
Message-Id: <6q757c$g4f$3@info.uah.edu>
In article <35C6CB6A.38701D12@m.block>,
"B. Oiledanimalbyproducts" <sp@m.block> writes:
: Greg Bacon wrote:
: > Bullshit. It is not an attack, but a demonstration. Do not blame me
: > for the fact that 95% of people don't know anything about arguing.
:
: Umm if 95% of the people get annoyed with you and only 5% don't, then t
: suggests the problem is yours not the 95% - have you thought that maybe
: can't be bothered trying to get you to see what the other 95% obviously
: to
I'll invoke Thoreau:
"If a man is more right than his neighbor, then that constitutes a
majority of one."
: "Chi tace non consente -vuole essere solo gentile" - those who don't sp
: are just being polite
Ahhh.. who am I to contradict such vast numbers of silent supporters?
Isn't it hypocritical to get annoyed over the wife beating question
while invoking the infinitely more annoying and fallacious silent
supporters argument?
Greg
------------------------------
Date: 4 Aug 1998 14:13:48 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: hiding user input
Message-Id: <6q74us$g4f$2@info.uah.edu>
In article <ltyat5yo3n.fsf@asfast.com>,
Lloyd Zusman <ljz@asfast.com> writes:
: Well, it's easy nowadays to connect to usenet without ever having to
: interact with a news admin, or any other human being, for that matter.
Feature? I think not. :-(
: To some new users, usenet just looks like another place on the net to
: read and post information, and to get into discussions. There's
: nothing strange or foreboding about it to these particular people, so
: some of them already feel that they have the lay of the land from the
: outset.
"No one knows so much as he who knows he knows nothing."
: gbacon@cs.uah.edu (Greg Bacon) writes:
: > When one fails to use common sense, one gets what one deserves.
:
: I believe that few people deserve condescension and rudeness. But you
: and I obviously disagree on this point.
When one ass_u_mes one knows what's going on, one is taking a risk.
People should come to the table with a solid idea of what's going on.
What is to blame for the clue shortage?
: > "But, officer, I didn't *know* the speed limit was 35! You can't give
: > me a ticket!"
[ snip irrelevant anecdote ]
: I've actually had this sort of thing happen to me more than once.
But how is it relevant? There are no `signs' that would lead anyone
to believe it's acceptable to post a question that's answered in the
FAQ.
: > [ ... ] That is nothing
: > short of a pile of bullshit. If you or anyone doesn't like Abigail's
: > response, then feel free to give what you think is a better response!
: > Nothing is holding you or anyone back.
:
: I did indeed give two examples of a what I consider to be better
: responses. Please review "Response B" and "Response C" in my previous
: post.
I meant post what you would consider to be a better answer. However,
please don't start reading FAQs to people.
: > [ ... ] Come on. Some of us have real jobs and come here because we
: > enjoy helping people. It takes most of the joy out of it for me when I
: > come in to see that so many people have pissed on our walls.
:
: I also have a job and I also enjoy helping people. And I very much
: value and appreciate the work that many people have put in to creating
: the FAQ's and other wonderful Perl resources that do indeed help
: people a lot. I just happen to also believe that it's possible to
: exercise a little maturity and self control and consideration when
: pointing new users to these resources. As I said above, you
: apparently don't agree with me.
This isn't about me. I myself probably wouldn't followup to a FAQ in
quite the same style as Abigail. However, I do feel she's justified.
Greg
------------------------------
Date: Tue, 04 Aug 1998 14:12:31 GMT
From: ptimmins@netserv.unmc.edu (Patrick Timmins)
Subject: Re: hiding user input
Message-Id: <6q74se$b4i$1@nnrp1.dejanews.com>
In article <6q6b1r$2eo$1@news.ycc.yale.edu>,
mnc@diana.law.yale.edu (Miguel Cruz) wrote:
> Gary L. Burnore <whatpartofdontemailme@dontyouunderstand> wrote:
> > The statement "Further email from you will be considered harassment and
> > will be forwarded to your provider" wouldn't quite be asking, more like a
> > warning.
>
> That doesn't quite make it so. What if I "warn" my neighbor that if he
> doesn't stop driving a blue Toyota then I will report him for harassing me?
>
> miguel
>
This is a bad example ... blue Toyotas are not considered harassment in the
northeast (U.S.), but they are in other parts of the country. *All* Toyotas,
in fact, are considered harassment in some states (Wyoming and Utah, I
think). Generally in these states, driving any make of car that ends in a
vowel is considered harassment (Toyota, Honda, Yugo, Dodge, Ferrari, etc). At
least this is what I read once on usenet.
Please don't harass me by e-mailing any follow-ups. Your message will be
forwarded to the proper authorities, and your Toyota will be impounded.
Patrick Timmins U. Nebraska Medical Center (Where we have no such
restrictions, obviously, since Nebraska ends in a vowel, and doubly so in
Omaha)
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 4 Aug 1998 14:25:17 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: hiding user input
Message-Id: <6q75kd$g4f$4@info.uah.edu>
In article <35cb3368.105610800@nntpd.databasix.com>,
gburnore@databasix.com (Gary L. Burnore) writes:
: On 3 Aug 1998 20:21:25 GMT, in article <6q5645$jki$2@info.uah.edu>,
: gbacon@cs.uah.edu (Greg Bacon) wrote:
: >I'm not trying to be clever. Whose fault is it if the point zips
: >right by someone's head? It's not as though I'm being obscure in
: >pointing out Gary's propensity toward the ad hominem.
:
: Yet you used it over and over to those who simply disagreed with you during
: the RFD for .moderated.
Over and over? Perhaps you should check your memory and DejaNews.
Perhaps your threshold for over and over is extremely low. When I
searched DejaNews for articles in news.groups from gbacon@cs.uah.edu
that contain the words beating and wife, I found one single article,
<6lon2q$ajj$2@info.uah.edu>. I don't use X-No-Archive, either.
: >Why don't you call Gary on his abuse of ad hominem?
:
: Translation:
: "Whaaah, he can do it so I can too even tough I was doing it before. Waaaah".
Ummm.. no. Why don't you crawl back into the cow's ass from which
you emerged?
Greg
--
But I'm not a diminuitive Napoleonically compensating anal dwarf either,
so it balances out.
-- Travis Hardison
------------------------------
Date: 4 Aug 1998 14:28:33 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: hiding user input
Message-Id: <6q75qh$g4f$5@info.uah.edu>
In article <m3sojd14i5.fsf@windlord.stanford.edu>,
Russ Allbery <rra@stanford.edu> writes:
: Greg Bacon <gbacon@cs.uah.edu> writes:
: > Why do you maintain this position in the face of documents that claim
: > otherwise?
:
: You do realize that Gary isn't the only person who doesn't appreciate
: courtesy copies in e-mail, don't you?
I'm not referring to just courtesy copies. Sometimes it's more
appropriate to take certain discussion to private email rather than
belabor the entire group with it. (I can't think of any examples
right now, though. :-)
Greg
------------------------------
Date: Tue, 04 Aug 1998 14:30:27 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: hiding user input
Message-Id: <6q7566$1j5$1@rand.dimensional.com>
[posted to comp.lang.perl.misc and mailed to the cited author]
In article <m3sojd14i5.fsf@windlord.Stanford.EDU>
Russ Allbery <rra@stanford.edu> wrote:
>You do realize that Gary isn't the only person who doesn't appreciate
>courtesy copies in e-mail, don't you? I had a big flamewar with a few
>people in other groups a year or two ago on this subject myself, as I
>don't particularly like them either. Over time, I've gotten less
>hard-nosed on the subject, and in fact sometimes will send courtesy e-mail
>copies myself if I have some reason to believe that it *is* a courtesy
>that the person to whom I am responding would appreciate, but I have a
>well-connected news server and no real need of extra e-mail traffic.
The problem, at least from my perspective, is one of reliability.
I know that a lot of people have well-connected news servers and
that those people don't ever miss articles. There are enough others,
though, like myself, for whom news is an extremely unreliable
medium. For those people e-mailed cc's are important, as that is
the only way to make sure that someone gets to hear all of a discussion.
And perhaps it's only me, but I feel it is important to not exclude
people simply because they are stuck with a poorly configured
news server and an unresponsive admin. An occasional extra piece
of mail seems like such a small thing :-).
>The only thing that's *really* annoying, though, as opposed to simply a
>minor waste of time hitting the delete key, is when the e-mail copy
>doesn't say at the top that it's an e-mail copy of a post. But I think
>most people here agree on that.
Well of course you should note that it's been posted and mailed.
But you shouldn't throw a fit if someone mails you a reply
in addition to posting it. Just consider it a little extra time
to think about your reply.
But none of this is the real point, or has anything at all to do
with why I got involved in this lovely little exchange. The
real point is that Mr. Burnore attacked Abigail with no provocation,
called her a bitch, and is hiding under an X-No-Archive header
while he does it.
Now, not only do we have to put up with his venom, we have no way
of determining if this is his normal behavior or an exception to
the rule. By refusing to allow his posts to be archived he
is violating the historical record of the group and trying to
set things such that he is not accountable for his actions
or his words.
This is evil. No one should have the right to come in here, attack
the regulars who form the nucleus of our community, and then hide
that they did this. Even knowing that some people have valid reasons
to not want their posts archived, I still wish that DejaNews wouldn't
honor that particular header. Dammit, if you are going to say
something you should be prepared to have a record of that kept. You
shouldn't try to hide or attempt to avoid responsibility for your
own actions.
I wrote a little bot named Mortimer last night that will monitor
clpm and automatically repost any X-No-Archive messages without
that header. Unless someone can provide a compelling reason
not to, I am going to start Mortimer monitoring this group
later today, and this will hopefully no longer be an issue.
dgris
--
Daniel Grisinger dgris@perrin.dimensional.com
"No kings, no presidents, just a rough consensus and
running code."
Dave Clark
------------------------------
Date: Tue, 04 Aug 1998 14:17:42 GMT
From: mchunziker@us.fortis.com
Subject: Re: how to write a script using perl to configure a CISCO router
Message-Id: <6q7565$bti$1@nnrp1.dejanews.com>
Your question is too vague....what part of this script are you having problems
developing? I am writing a very similar script right now that reads this
info from a file and reloads the ciscos via ciscoworks. If you have specific
questions I'd be happy to help.
In article <Ex562A.4uu@sap-ag.de>,
<iznik@rocketmail.com> wrote:
> Hello friends,
>
> I am trying to write a script using perl that would do the following:
>
> 1. take a standard text file with a standard cisco configuration.
> 2. search for certain words in this text file as I only have to
> configure a few fields.
> 3. prompt the user to end the fields: i.e. IP address of WAN, IP address
> of Ethernet, calling ISDN number, CHAP user and password etc.
> 4. save the file
> 5. upload it via TFTP into a cisco router.
>
> Can anyone who is familiar with the perl language help??
>
> Thanks and regards,
> Vernon
>
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 04 Aug 1998 10:44:43 -0400
From: Erik Kleinbussink <erik.kleinbussink@lmco.com>
Subject: How to write a UNIX command line script which accesses remote web sites.
Message-Id: <35C71E5B.50C@lmco.com>
I am looking for advice on how to write a command line web access
script.
The basic need is to automate a mobilecomm pager by using
www.mobilecomm.com's paging website without using an interactive web
browser to
send an alphanumeric page.
If anyone knows other forums which may have insight into this, then
please tell me
about them.
Currently the platforms available to me are all UNIX fileservers. I have
root
access and they run apache web servers.
If perl can't do the entire job, then ideas on how to modify web
browsers to provide
a commandline interface are appreciated.
Erik Kleinbussink
------------------------------
Date: Tue, 04 Aug 1998 11:19:26 -0400
From: Jim Michael <jim.michael@gecm.com>
Subject: Re: How to write a UNIX command line script which accesses remote web sites.
Message-Id: <35C7267E.3A5B@gecm.com>
Erik Kleinbussink wrote:
>
> I am looking for advice on how to write a command line web access
> script.
>
> The basic need is to automate a mobilecomm pager by using
> www.mobilecomm.com's paging website without using an interactive web
> browser to
> send an alphanumeric page.
Simple, just use the LWP module and send your get or post to the
mobilecomm web server. You may have to dissect their web page to see
which parameters to pass. A good reference is 'Web Client Programming
with Perl' isbn=156592214x. HTH.
Cheers,
Jim
------------------------------
Date: Tue, 4 Aug 1998 11:10:16 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Interesting Question needs Quick Answer
Message-Id: <1dd6gdj.kiskxtrk3dfN@slip166-72-108-139.ny.us.ibm.net>
Mark-Jason Dominus <mjd@op.net> wrote:
> In article <6pt8ob$ish@news-central.tiac.net>,
> Mike Stok <mike@stok.co.uk> wrote:
> >26 lines?
> >
> >#!/usr/local/bin/perl -w
> >use strict;
> >seek DATA, 0, 0;
> >print while <DATA>;
> >__END__
>
> The original problem specification prohibited `system call's, and I
> suspect that this was expressly to prevent solutions liked yours that
> explictly read the program's source file.
$string = <<'EOC';
qq{\$string = <<'EOC';\n},
$string,
qq{EOC\nprint eval \$string;\n}
EOC
print eval $string;
--
Kevin Reid. | Macintosh.
"I'm me." | Think different.
------------------------------
Date: Tue, 4 Aug 1998 11:10:21 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Interesting Question needs Quick Answer
Message-Id: <1dd7ide.u9itj4k3z11gN@slip166-72-108-139.ny.us.ibm.net>
I.J. Garlick <ijg@csc.liv.ac.uk> wrote:
> In article <m3af5oclkm.fsf@windlord.stanford.edu>,
> Russ Allbery <rra@stanford.edu> writes:
> > 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
>
> Great Russ.
>
> Now could you explain it? (I have only been learning Perl since April and
> Patrick started last Tuesday)
>
> I got as far as
>
> @!>~|
>
> I think I have got the meanings of each of these (from the camel) but when I
> try to work out what they are all doing together I get lost.
>
> I am not really that sure what the $^=q does apart from some formatting
> thingy that I was hoping would become self explanetory in this context once
> I worked out what the rest does. However I admit defeat.
The 'q' is the start of a quoted string, for which the delimiter is an
semicolon. The string therefore contains:
@!>~|{>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} >
--
Kevin Reid. | Macintosh.
"I'm me." | Think different.
------------------------------
Date: Tue, 04 Aug 1998 10:31:47 -0400
From: "Dennis M. Parrott" <dparrott@ford.com>
To: =?iso-8859-1?Q?L=FCder?= Sachse <sachse@aeb.de>
Subject: Re: Long filenames under Perl4 (DOS)
Message-Id: <35C71B53.30AD@ford.com>
L=FCder Sachse wrote:
> =
> Hi!
> =
> I know this sounds a little stupid but I am working on a perl program
> that has to run on an old Novell Netware 4.10 server that only supports=
> Perl4.
> I have to use directory listings with long filenames and that's where i=
t
> gets complicated. Is it possible to get the long filenames through an
> external program (remember, it is Perl4 AND dos!) like dir with a
> filehandle?
> Maybe one of you even got a better idea.
> Thanks in advance.
> =
> Lueder
This might be helpful.
I found that if the long filename was surrounded with quote marks ("),
DOS was able to deal with the name. You might want to play with this
at the command line prompt a bit.
I know this has worked for me and for one other person who was =
scripting something that had to work with LFN's.
HTH!
-- =
-----------------------------------------------------------------------
Dennis M. Parrott | Unix: dparrott@ford.com
PCSE Webmaster | PROFS: DPARROTT
Ford Motor Company | VAX: EEE1::PARROTT
Dearborn, Michigan USA | public Internet: dparrott@ford.com
-----------------------------------------------------------------------
Voice: 313-322-4933 Fax: 313-248-1234 Pager: 313-201-9978
------------------------------
Date: Tue, 4 Aug 1998 13:15:11 GMT
From: wmorgan@nswc.navy.mil (Bill Morgan)
Subject: Need to upload files to web server under NT 4.0
Message-Id: <1998Aug4.130803.4846@relay.nswc.navy.mil>
I'm trying to implement a simple file upload capability on our web server.
I've tried several scripts and executables that I've found on the web, but
I've run into a variety of problems. Most work fine on my platform of choice
(UNIX), but I cannot get anything to work on NT. Does anybody have a script
or program that I can beg, borrow, or buy? Here are the specifics on my
system: NT 4.0 service pack 3, Netscape Enterprise Server 3.51 (if it's a
PERL script, I have ActiveWare Build 316).
At a minimum, the program or script needs to take the data from a simple:
<FORM ENCTYPE="multipart/form-data" ACTION="some_upload_program"
METHOD="POST">
File To Upload:
<INPUT TYPE="FILE" NAME="file-to-upload" SIZE="40">
<INPUT TYPE="SUBMIT" VALUE="Upload The File">
<INPUT TYPE="RESET" VALUE="Clear Data">
</FORM>
and store it in a predefined place on the server. If it does this, then I'll
be happy.
Better: to pass a hidden field specifing where to store the file.
Best: pass a hidden field specifing a top level directory where the user can
list a directory, create a subdirectory, change directory and store the file.
thanks for any help. Commercial products also welcome. Please email any
replies as well as posting to this group. Many thanks!
---------------------------------------------------------------------------
William E. Morgan NAVAL SURFACE WARFARE CENTER
Code N84 email: wmorgan@nswc.navy.mil
17320 Dahlgren Rd. phone: (540)653-8446,(540)653-7151
Dahlgren, VA 22448 fax: (540)653-1810
------------------------------
Date: Tue, 4 Aug 1998 14:56:21 GMT
From: Mike Gahan <ccaamrg@ucl.ac.uk>
Subject: Oraperl
Message-Id: <35C72115.1738@ucl.ac.uk>
We have been using Oraperl for DB scripting, but now we are
upgrading our Oracle server to 7.3.3, which does not support
SQL*Net V1 any more.
I have been looking for a recent version of oraperl which we can
use (Platforms: AIX, Solaris).
Is anyone using Oraperl for remote connection to Oracle using
SQL*Net V2? Is such a version of oraperl available?
If not, we will have to switch over to TCL, whose oratcl extension
works very well.
Please copy replies to email.
--
Mike Gahan
Education and Information Support Division
University College London
http://www.ucl.ac.uk/~ccaamrg/
------------------------------
Date: Tue, 04 Aug 1998 13:56:19 GMT
From: b_redeker@hotmail.com
Subject: password and DOS
Message-Id: <6q73u3$9bo$1@nnrp1.dejanews.com>
Does anyone know how to solve this?
if you read from STDIN, whatever the user types is shown on the screen.
But if you wanted to read a password you don't want that; you'd want * or just
blank.
with UNIX, you can redirect the output with system('stty -echo');
but under DOS, system('@echo off') doesnt solve it.
Is there a trick? anyone?
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 04 Aug 1998 13:50:07 GMT
From: b_redeker@my-dejanews.com
Subject: passwords and DOS/Win
Message-Id: <6q73if$8cs$1@nnrp1.dejanews.com>
does anyone know how you can read a password from STDIN and not show that
password on screen?
with UNIX you would use
system ('stty -echo');
but under DOS/Win
system ('@echo off');
doesnt work
thanx if you have the answer
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 4 Aug 1998 15:07:24 GMT
From: kortbein@iastate.edu (Josh Kortbein)
Subject: Re: Pattern matching: Option "i"
Message-Id: <6q783c$9e0$1@news.iastate.edu>
David Gallone (dgl@offis.lu) wrote:
: Is it possible that the option "i" can slow down search in the pattern
: matching on great data (2 MB)?
: $string = ~ s/<A HREF\s*=\s*("?[^>]*?>)/&process_HREF($1)/segi;
perldoc -m Benchmark
Try it out yourself, and see if you notice a difference.
Josh
--
I am the author of all tucks & damask piping
I am the Chrome Dinette
I am the Chrome Dinette
I am the eggs of all persuasion
------------------------------
Date: 4 Aug 1998 15:27:30 GMT
From: henryrb@aol.com (Henryrb)
Subject: Re: perl problem on dec machine
Message-Id: <1998080415273100.LAA19105@ladder01.news.aol.com>
>Dec machine's kinda vague. What OS is it running? Unix? VMS? RSTS/E? (and
>I wanna know who did the perl port if it is) RSX? TOPS?
>
It's a unix. How do i find out who "did the perl port"?
------------------------------
Date: Tue, 04 Aug 1998 15:27:41 GMT
From: j@w.com (Register Agent for $29US)
Subject: Perl programmers needed for database projects
Message-Id: <35c727a6.96955135@news.mindspring.com>
Atlanta web developer is seeking perl programmers with strong
databasing skills. Will work from home on a freelance basis either
hourly or by the project.
Send mail with resume to jeff@digitalglue.com
See our site and great client list at www.digitalglue.com
------------------------------
Date: Tue, 04 Aug 1998 18:33:21 +0300
From: Jean-Michel Hemstedt <djinn@tech.eurodyn.com.gr>
Subject: print statement and Perl parser
Message-Id: <35C729C1.5FB6042D@tech.eurodyn.com.gr>
Hi,
Is it possible to extract automatically from a script all the PRINT
statements (including the text, or objects to be printed) ?
This should work on all syntaxes and quoted text like :
print FILEHANDLE LIST; #with q/, qq//, "", '' , multiline , variables ,
CGI objects ...
or
print <<EOF
.....
EOF
We don't want to reinvent the wheel, and since the "perl -c" allready
does a syntax parsing, would it be possible to use it, or something
similar, to return and locate all kinds of print statements ? (Debug is
not appropriated I think)
The goal of it is to somehow modify all the static text and variables
that are printed, to support multilingual versions. (hundred of
scripts).
Any tips or help would be highly appreciated.
Thanks,
Jean-Michel Hemstedt.
------------------------------
Date: Tue, 04 Aug 1998 14:30:36 GMT
From: venus@bom2.vsnl.net.in
Subject: Problem updating $dir in module File::Find - Win32 platform
Message-Id: <6q75uf$e0p$1@nnrp1.dejanews.com>
Hello,
Being new to Perl, I have a simlple question
regarding the
File::Find module. We are using the following script to traverse a directory
recursively.
-------------- traverse.pl -------------------
use
File::Find;
sub wanted
{
print "Dir = $dir\n";
print "Name = $name\n";
print "File = $_\n\n";}
find(\&wanted, ".");
-----------------------------------------------
Upon running the script
the following outputis generated.
----------------- Output
---------------------Dir =
Name =
File = .
Dir =
Name =
File = 1.txt
Dir = Name =
File = 1
Dir =
Name =
File = DMPD.BAT
.....
-----------------------------------------------
Looking from the output it
seems that the variables $dir and $name updated in the module
File::Find
are not passed back to the main module.
Is there any special way to call the
subroutine find ? or are there any prerequisite steps that
I'm overlooking.
Any help, feedback, tip etc. is highly appreciated.
I've looked at the
FAQ for Win32 Perl andit mentioned the problem of File::Find, however,
it
also mentioned that the problems were fixedafter Build 110. Has anybody
faced such a situationwith Build 316.
Thanks a lot in advance,
--
Yashesh
venus@bom2.vsnl.net.in
The version of perl is
Win32 port
Copyright (c) 1995-1996 Microsoft Corporation. All rights reserved.
Developed by ActiveWare Internet Corp., http://www.ActiveWare.com
Perl for
Win32 Build 316 - Built 09:44:44 Mar 13 1998
This is perl, version 5.003_07
Copyright 1987-1996, Larry Wall
+ suidperl security patch
Perl may
be copied only under the terms of either the Artistic License or theGNU
General Public License, which may be found in the Perl 5.0 source kit.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 4 Aug 1998 11:10:19 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Question: Select
Message-Id: <1dd6h48.4x1zs7qbqfl8N@slip166-72-108-139.ny.us.ibm.net>
Tom Rainey <trainey@cs.utexas.edu> wrote:
> Hello, I've been trying to get alittle deeper into perl lately and have
> been dabbling with sockets (which i have a grasp on from before) ... I've
> been reading and looking at example code and I can't get the hang of the
> select command...
>
> For example:
> select((select(S), $| = 1)[0]);
>
> Where S is a Socket (already bound and connected) ...
>
> From my previous experience (C) ... select provides asynchronous I/O by
> allowing a process to wait for the first file descriptor in a certain set
> to be ready... but I don't quite understand it in perl... From what i've
> read.. the code above selects the socket for input/output -> select(S) ..
> which we then make unbuffered i/o with $| = 1 .... but i don't get the
> recursion of
> it.. and the [0] ...
That's another way to write:
$old = select S;
$| = 1;
select $old;
--
Kevin Reid. | Macintosh.
"I'm me." | Think different.
------------------------------
Date: Tue, 4 Aug 1998 07:17:21 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: random number
Message-Id: <MPG.1030b7c7c062e5ea9897b9@nntp.hpl.hp.com>
In article <35c60a82.79428722@news2.cais.com> on Mon, 03 Aug 1998
19:08:27 GMT, root.noharvest.\@not_even\here.com (-)
<root.noharvest.\@not_even\here.com (-)> says...
> Peter Richmond <peter@richmd.demon.co.DELETE.uk> Said this:
...
> >Could sell me tell me how I could create a random number - between 1
> >and 1,000,000
>
> $number = int(rand(1000000));
>
> Though you could have found that out pretty easily, RTFM
Your result will be between 0 and 999999, as you could have found that
out pretty easily, RTFM. But the post by Mike Guy seems definitive.
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 04 Aug 1998 09:20:52 -0600
From: Matt Grommes <mpgromm@sandia.gov>
Subject: Reading in one file and writing to another
Message-Id: <35C726D4.DF7797DA@sandia.gov>
Hi, I thought this was the best place to ask this question. I have a
CGI script I'm writing that is supposed to take input from a web form,
read in a file and write whatever was written in the form into the file
when the script sees a certain string. If you've not been turned away by
that horrible run-on sentence, here's my code fragment:
## $message is the form input - $month and day are also form input ##
open(PAGE,">$PageLocation") || die "Error $! opening file";
$line = "<table border=1 cellpadding=0 cellspacing=0
width=100%>\n<tr><td bgcolor=\"000080\" align=left><b><font
color=\"white\"> $month $day</font></b></
td></tr></table><ul><li>$message</ul>\n";
if (-T $MainLocation)
{
open(HEAD, "+<$MainLocation") || die "Error $! opening file.";
while (<HEAD>)
{
if(s/<!--NewsText-->/$line/x)
{
print HEAD;
}
if(!(print PAGE))
{
print " Cannot print to file.\n$!\n";
exit(1);
}
}
}
The script reads in $message then adds $message to the text in $line. It
then goes through the external file until it finds <--NewsText--> and it
is supposed to insert $line into that space. It does that fine except
that is overwrites the next text in the file. I need to make it so it
doesn't overwrite the text following the <--NewsText--> string. Any help
that anyone can offer would be greatly appreciated. Thanks in advance.
-- Matt Grommes
-- Target Fabrication
-- www.targetfab.sandia.gov
------------------------------
Date: Tue, 04 Aug 1998 13:50:06 GMT
From: b_redeker@my-dejanews.com
Subject: reading passwords
Message-Id: <6q73ie$8cr$1@nnrp1.dejanews.com>
hi,
does anyone know how in DOS/Win you can read a password from STDIN without
showing it to the user (and, more importantly, everyone looking over his
shoulder?)
under UNIX you would use
system("stty -echo");
but under DOS
system ("@echo off");
doesnt work.
thanks
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 4 Aug 1998 14:59:21 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Setting timeout?
Message-Id: <Ex66yx.1Ep@world.std.com>
pat@uni.de (Patrick Clauberg) writes:
>something like @result =`smbclient -L server`;
[stuff deleted]
>So, my question is if I can set some kind of timeout.
>if the next step after the @result= is not being done within n
>seconds, the @result thing should be canceled.
If you open smbclient with a piped filehandle, you should be able to
use the four argument select() (or the IO::Select module) to determine
whether it has input available within a certain amount of time.
The big drawback is that you need to use sysread() and not the line
buffered read operator (the <> operator).
use IO::Select;
open SAMBA, '/usr/local/samba/bin/smbclient -L gold |' or die;
$ready = new IO::Select(*SAMBA);
--
Andrew Langmead
------------------------------
Date: Tue, 04 Aug 1998 14:37:38 GMT
From: krupicka@tellabs.com
To: krupicka@tellabs.com
Subject: strange results from tied hash
Message-Id: <6q76bi$ets$1@nnrp1.dejanews.com>
I have implemented a module for my own use which allows
a database (such as GDBM) with to handle each datum as a hash.
(This is implemented with FreezeThaw)
Anyway. I get different results from the sample code below:
use HashDb;
# The last arguments are the names of the fields for the database
$userobj = tie %user, HashDb, "db/user.db", RO, qw( passwd email admin);
$someone = $user{'krupicka};
print $someone->{'admin'}, "\n";
print $userobj->FETCH('krupicka')->{'admin'}, "\n";
print $user{'krupicka'}->{'admin'}, "\n";
All three of these should produce the same results,
but the for the last one I get
Can't use an undefined value as a HASH reference at t2 line 46.
I have tried writing sample cases with a simpler module
with not a whole lot of luck (they all pass the test), thus the rest of
this message contains more detailed code in my module. While all parts are
not included, hopefully it should be enough to reproduce the problem.
As I my company does not maintain a NNTP server, I have to use DejaNews
to read news. If possible, please copy any responses to krupicka@tellabs.com.
I can provide more information if someone is able to dig into this problem.
Obviously there's a work around, but I'm not sure why I am seeing the problem
I am.
Oh yeah: This is perl, version 5.004_04 built for sun4-sunos
package HashDb;
use FreezeThaw qw( freeze thaw);
use vars qw( $AUTOLOAD);
my $EffUID = $>;
my $RealUID = $<;
my @FIELDS;
sub import
{
my $class = shift;
@FIELDS = @_;
}
sub TIEHASH
{
return new(@_);
}
sub new
{
my $class = shift;
my $file = shift;
my $access = shift;
my $self = { };
$self->{FIELDS} = [ @FIELDS, @_];
bless $self, $class;
$self->_init( $file, $access);
return $self;
}
sub _init
{
my $self = shift;
my $fname = shift;
my $access = shift;
my $result;
my $initretry = 30;
my $retry;
my ($now, $host, $user);
$self->{DB} = {};
for ($access)
{
/RO/ and $access = \&main::GDBM_READER, last;
/RW/ and $access = \&main::GDBM_WRCREAT, last;
die "Invalid Access parm for Branch DataBase: $access\n";
}
$retry = $initretry;
while ($retry)
{
$> = $EffUID;
$result = tie (%{$self->{DB}} , 'GDBM_File', $fname, &$access, 0644);
$> = $RealUID;
last if ($result);
sleep 1;
$retry--;
}
unless ($result) { $> = $EffUID; open ERROR, ">>$fname.err"; unless
($?) { $now = scalar localtime; $user = getpwuid( $RealUID); $host =
`/bin/uname -n`; chomp $host; print ERROR "Retry TO;$host;$user;$now\n";
close ERROR; } else { warn "Could not open $fname.err\n"; } $> =
$RealUID; die "Cannot open gdm file $fname\nTry again shortly. Things may be
busy\ n"; }
}
sub FETCH
{
my $self = shift;
my $key = shift;
my $DB = $self->{DB};
my $ret_hash;
my $field_index;
unless ( defined $DB->{$key} )
{
return undef;
}
$field_index = 0;
$ret_hash = { map { $self->{FIELDS}->[$field_index++] => $_ }
thaw($DB->{$key}) };
return $ret_hash;
}
sub STORE
{
my $self = shift;
my $key = shift;
my $hashref = shift;
my $prev_hash;
my $DB = $self->{DB};
my $data;
my $field_index;
if (exists $DB->{$key})
{
$field_index = 0;
$prev_hash = { map { $self->{FIELDS}->[$field_index++] => $_ }
thaw($DB->{$key}) };
}
foreach (keys %{$hashref})
{
$prev_hash->{$_} = $hashref->{$_};
}
$data = freeze ( map $prev_hash->{$_}, @{$self->{FIELDS}} );
$> = $EffUID;
$DB->{$key} = $data;
$> = $RealUID;
return $prev_hash;
}
1;
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 04 Aug 1998 16:09:37 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: strange results from tied hash
Message-Id: <35C72431.AF7A4626@nortel.co.uk>
krupicka@tellabs.com wrote:
> $userobj = tie %user, HashDb, "db/user.db", RO, qw( passwd email admin);
> $someone = $user{'krupicka};
^^^^^^
You saw that, did you?
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Tue, 04 Aug 1998 09:47:53 -0400
From: Eric Johansson <esj@harvee.billerica.ma.us>
Subject: Using Perl to create a DLL
Message-Id: <35C71109.C4E39E3C@harvee.billerica.ma.us>
is it possible to create a Perl based DLL. I don't mean compiling a
chunk of sea code with Perl embedded. I would like to create DLLs
without the traditional compile link crash cycle and I would like to do
it all in Perl.
--- eric
------------------------------
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 3341
**************************************