[9748] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3342 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 4 14:06:31 1998

Date: Tue, 4 Aug 98 11:00:36 -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: 3342

Today's topics:
    Re: [Q] Namespace collisions <kj0@mailcity.com>
        And sometimes the FAQ's suck <sysop97@nospam.callisto.si.usherb.ca>
    Re: And sometimes the FAQ's suck (Steve Linberg)
    Re: CGI scripts executing other Perl scripts without ha salvador@my-dejanews.com
    Re: Cheapest Win32 5.005 build <perlguy@inlink.com>
    Re: Client side functions <perlguy@inlink.com>
    Re: comp.lang.perl.announce redux (Abigail)
    Re: comp.lang.perl.announce redux (Steve Linberg)
    Re: comp.lang.perl.announce redux <tchrist@mox.perl.com>
    Re: Contributions to Perl (was Re: hiding user input) <rra@stanford.edu>
    Re: File already opened by another process? <rra@stanford.edu>
    Re: File Upload with Perl <perlguy@inlink.com>
    Re: get path of working directory? huntersean@hotmail.com
    Re: Help! Stuck with an array assignment problem <murrayb@vansel.alcatel.com>
    Re: Help! Stuck with an array assignment problem huntersean@hotmail.com
    Re: Help! Stuck with an array assignment problem <jack.chastain@attws.com>
    Re: hiding user input b_redeker@hotmail.com
    Re: hiding user input <jdporter@min.net>
    Re: hiding user input <rra@stanford.edu>
    Re: hiding user input <jdporter@min.net>
    Re: hiding user input (Chris Russo)
    Re: How to write a UNIX command line script which acces huntersean@hotmail.com
    Re: Long filenames under Perl4 (DOS) scott@softbase.com
        parsing of here-docs justin_lloyd@my-dejanews.com
    Re: passwords and DOS/Win scott@softbase.com
    Re: Perl "system" command and Informix (Mark-Jason Dominus)
    Re: Piping mail to a script that splits off attachments <aperrin@mcmahon.qal.berkeley.edu>
    Re: Problem updating $dir in module File::Find - Win32  <bowlin@sirius.com>
    Re: Problem updating $dir in module File::Find - Win32  <JKRY3025@comenius.ms.mff.cuni.cz>
        Reading from and writing to the serial port <tlvann@raleigh.ibm.com>
    Re: Reading in one file and writing to another <filmguy@bellsouth.net>
    Re: strange results from tied hash <jdporter@min.net>
    Re: Uploading Large Files with Perl <ed@h.com>
    Re: Using Perl to create a DLL scott@softbase.com
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 4 Aug 1998 16:02:14 GMT
From: k y n n <kj0@mailcity.com>
Subject: Re: [Q] Namespace collisions
Message-Id: <6q7ba7$72v@news1.panix.com>
Keywords: objects, scope

In <Ex5Fpz.8yr@world.std.com> aml@world.std.com (Andrew M. Langmead) writes:
>k y n n <kj0@mailcity.com> writes:

>When the import function of a package is implemented by the Exporter
>module, it gives you great flexibility in what gets imported. If you
>say "use foo '!quux'", it imports everything in the @EXPORT list but
>items named "quux". You can still refer to this subroutine by giving
>it an explicit package name "foo::quux()" (But if you do import it,
>there is no way to retrieve the old frobozz::quux) You can also tell
>Exporter.pm not to import anything by giving it an empty import list
>("use foo ();")

This is very instructive.  Thank you very much!

Just to make sure I was following you, I removed the "use foo"
statement, and tried a call to &foo::quux() in the method
nother_method; the interpreted barfed, saying it couldn't find a
definition for &foo::quux.  Is this as it's supposed to be, or am I
doing something wrong?  If the former, then the "referring" you allude
to above, to &foo::quux in the absence of an import, is somewhat
academic since under these circumstances one can't actually do
anything with &foo::quux.  In other words, if I got this right, there
is no way to avail oneself of a subroutine defined in another module
(not even by giving the full name, i.e. with the appropriate prefix)
as long as that subroutine has the same name as some symbol in the
current package.  Ouch!  That sure is restrictive, and quite
uncharacteristic of Perl.  I sure hope I've misunderstood something!
If not, is there a kluge around this constraint?

K.



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

Date: Tue, 04 Aug 1998 12:29:55 -0400
From: Jay Taylor <sysop97@nospam.callisto.si.usherb.ca>
Subject: And sometimes the FAQ's suck
Message-Id: <35C73703.5B16@nospam.callisto.si.usherb.ca>

>You could always try the documentation... the first page of perldoc
>perlre will tell you the answer.... In other words RTFM.

	Not really!

And sometimes the FAQs suck or aren't tuned to non-guru users and become
long, boring and unreadable. I prefer this forum.

Jay


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

Date: Tue, 04 Aug 1998 13:35:10 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: And sometimes the FAQ's suck
Message-Id: <linberg-0408981335100001@projdirc.literacy.upenn.edu>

In article <35C73703.5B16@nospam.callisto.si.usherb.ca>,
sysop97@nospam.callisto.si.usherb.ca wrote:

> >You could always try the documentation... the first page of perldoc
> >perlre will tell you the answer.... In other words RTFM.
> 
>         Not really!
> 
> And sometimes the FAQs suck or aren't tuned to non-guru users and become
> long, boring and unreadable. I prefer this forum.

As Russ and Tom will undoubtedly say, patches welcome!  Perhaps you could
list some specific examples to clarify instead of making general, blanket
complaints.
_____________________________________________________________________
Steve Linberg                       National Center on Adult Literacy
Systems Programmer &c.                     University of Pennsylvania
linberg@literacy.upenn.edu              http://www.literacyonline.org


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

Date: Tue, 04 Aug 1998 17:29:57 GMT
From: salvador@my-dejanews.com
Subject: Re: CGI scripts executing other Perl scripts without hanging?
Message-Id: <6q7gel$2nb$1@nnrp1.dejanews.com>

In article <35c65e01.283130625@news.keyway.net>,
  tom@netoutfit.com (Tom O'Neil) wrote:

> The code prints out the display page, but the HTTP connection remains
> open until make_dbm.pl finishes execution. Any ideas as to how to
> eliminate this problem?

try redirecting the script stdin and stdout (maybe stderr):

 ...
 		system ("./make_dbm.pl >/dev/null </dev/null &");
 ...

bye!

  - Salva.

-----== 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 15:44:36 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: Cheapest Win32 5.005 build
Message-Id: <35C72C64.253C185C@inlink.com>

Jonkers wrote:
> 
> Brent Michalski wrote in message <35C6F516.1BE83DA8@inlink.com>...
> >I may be missing something, but do you realize that you can get Perl
> >5.005 already compiled for FREE!
> >
> >Just go to http://www.perl.com and click on "latest version", from
> >there, choose one of the Win32 ports...
> 
> The ActiveState version http://www.activestate.com/ActivePerl/download.htm
> looks indeed like Perl 5.005: "Perl for Win32 based on Perl 5.005". (I could
> not install therefore not check this version).
> 
> But the "Gurusamy Sarathy's binary version of Perl" (=bindist) is still
> perl5.00402-bindist04-bc.zip (at least on my mirror
> ftp://ftp.cs.ruu.nl/pub/PERL/CPAN/ports/win32/Standard/x86 )
> 
> Sander


My CPAN
mirror,(http://www.perl.com/CPAN-local/ports/win32/Standard/x86/), has
the following links:

 perl5.005-beta1-VMS-1..16-Jul-98 14:52     1k  
    perl5.005-beta1-dec_o..16-Jul-98 14:52     4k  
    perl5.005-beta1.annou..16-Jul-98 16:37     7k  
    perl5.005-beta1.patch..15-Jul-98 09:18    53k  
    perl5.005-beta1.readme 14-May-98 19:57     5k  
    perl5.005-beta1.tar.gz 15-Jul-98 09:29   3.2M  
    perl5.005-beta2.patch..21-Jul-98 09:24   359k  
    perl5.005-beta2.readme 14-May-98 19:57     5k  
    perl5.005-beta2.tar.gz 21-Jul-98 09:36   3.2M  
    perl5.005-from-beta2...22-Jul-98 23:55    87k  
    perl5.005.announce     27-Jul-98 00:18     8k  
    perl5.005.tar.gz       22-Jul-98 23:55   3.3M  
    perl5.005_01.patch.gz  26-Jul-98 23:07    11k  
    perl5.005_01.tar.gz    26-Jul-98 23:16   3.3M  
    perl5.005_02-TRIAL1.p..02-Aug-98 09:05   114k  
    perl5.005_02-TRIAL1.t..02-Aug-98 09:32   3.3M  
    perl5.005_50.patch.gz  26-Jul-98 05:12   337k  
    perl5.005_50.tar.gz    26-Jul-98 05:20   3.6M  

Brent


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

Date: Tue, 4 Aug 1998 15:37:08 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: Client side functions
Message-Id: <35C72AA4.7D3DA9DE@inlink.com>

AFAIK, the only way you will be able to do something as [i|u]nsecure as
searching AND running a program on a users machine - is to use
Active-x.  Which is EXACLTY the reason we have banned it from our
intranet.

HTH,

Brent


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

Date: 4 Aug 1998 15:58:57 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6q7b41$u0$1@client3.news.psi.net>

Jim Brewer (jimbo@soundimages.co.uk) wrote on MDCCXCIX September MCMXCIII
in <URL: news:u4svt6ukj.fsf@jimbosntserver.soundimages.co.uk>:
++ abigail@fnx.com (Abigail) writes:
++ > Randal Schwartz (merlyn@stonehenge.com) wrote on MDCCXCVIII September
++ > MCMXCIII in <URL: news:8cpveikmvo.fsf@gadget.cscaper.com>:
++ > ++ The "worldwide" language of technology is English.  It happens to be the
++ > ++ only human language I speak, so I lucked out there.  There are regional
++ > ++ non-English Perl groups that can properly hold announcements in other
++ > ++ languages.  I'd like to restrict CLPA to articles I can read.
++ 
++ Randall made the point clearly. The "worldwide" language of technology
++ is English.

Just because English is the most used language in fields of technology
doesn't mean it is the *only* one. People do speak in German about Perl,
and many people programming Perl don't have English as their native
language.

++ is English. He wasn't discussing the issues of language in
++ general. Only the issue of language with respect to technology put
++ within the global context. Perl is a technology, a technology which is
++ worldwide; and technology, worldwide, is dominated by English. In
++ truth, requires English.

Really? So, you'd think the announcement of the Italian translation
of the Camel should also be done in English? I guess the only reason
O'Reilly translated the Camel to Italian was because Tim O'Reilly has
some friends which were English-Italian translators. Why would a book
like 'The Art of Computer Programming' be translated into 7 languages?
Why will Perl 5.006 have Unicode support? Surely English is all we need?

++                          Thus, there are no language restrictions,
++ only the continuance of the current state of affairs, with respect to
++ language, with respect to technology, worldwide.

"English only" surely sounds like a language restriction to me.

++ > So, a Perl Mongers announcement for the middle of the Yukon would be fine
++ > because it's in English, but the announcement for Lingua::FR::Inflect,
++ > written in French, is too regional for clpa? That's plain silly. I wouldn't
++ > call French or Spanish "regional" languages. 
++ 
++ There was never the assertion that any of the other widely used
++ languages of the world are "regional".

Then what does "regional non-English Perl groups" mean to you? Or do
you know some "universal non-English Perl groups"?

++                                        Only that technology is spoken
++ with English as a first language. Seems very reasonable to limit
++ postings to only the "first" language of a particualr
++ discipline. Including Perl. Including c.l.p.a.

Seem totally unreasonable to me. First doesn't mean only.



Abigail
-- 
perl -we '$_ = q ;4a75737420616e6f74686572205065726c204861636b65720as;;
          for (s;s;s;s;s;s;s;s;s;s;s;s)
              {s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'


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

Date: Tue, 04 Aug 1998 13:33:37 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <linberg-0408981333370001@projdirc.literacy.upenn.edu>

In article <6q7a04$fm$1@client3.news.psi.net>, abigail@fnx.com wrote:

> People, if you can't read French, German, Italian, or Polish, that's
> your loss. Don't punish others by forcing them to translate due to
> your own shortcomings.

Right on.  Quality translating is very hard work, anyway.  And knowing
other languages is a Good Thing (tm) that Expands Your Mind (tm).  It's
always good to see incentive to learn more.

I'm not fluent in any of these, but I have gotten lots of very useful
information off dejanews in French, Spanish, Norwegian, Swedish, German,
Dutch, and even Indonesian.  Probably others too.  A little background in
a smattering of languages can serve one in uminaginable ways.  Very worth
the effort!
_____________________________________________________________________
Steve Linberg                       National Center on Adult Literacy
Systems Programmer &c.                     University of Pennsylvania
linberg@literacy.upenn.edu              http://www.literacyonline.org


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

Date: 4 Aug 1998 11:17:08 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6q6qjk$cfp$1@csnews.cs.colorado.edu>

In comp.lang.perl.misc, Randal Schwartz <merlyn@stonehenge.com> writes:
:And yet, TPJ is not a non-profit organization.  Although the contest
:is run for free, and the results are available freely on the net, it's
:still substantially sponsored by TPJ, and therefore enhances TPJ's
:public image and therefore profitability in the long run.

Randal Schwartz is not a non-profit organization.   Everyone knows how
important his business is to him.  Therefore, he should resign from the
moderatorship, since this is merely a tool for him to subtly advertise
is for-profit organization by keeping in the public eye as moderator.
He realized this and consented to it several weeks ago, but has since
reneged.  I think he should be held to it, because he was right then,
and it still holds true.  He is immorally using the moderatorship to
advertise his own for-profit venture.

No?

Then stop bitching about the contest, etc.  Take your pick.  You can't
have your cake and eat it, too.

--tom
-- 
You have made an excellent hit on the UNIX.--More--


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

Date: 04 Aug 1998 09:39:05 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Contributions to Perl (was Re: hiding user input)
Message-Id: <m3hfzswvkm.fsf@windlord.Stanford.EDU>

Daniel Grisinger <dgris@rand.dimensional.com> writes:

> Now we are being asked to admit people to our community who have done
> nothing to help it.  We are being asked to be tolerant of those who have
> no tolerance for us.

Giving to those who have done nothing to deserve it and being tolerant of
those who have no tolerance are, to me, qualities to be treasured and
encouraged, not traits to be stamped out.  Generosity, forgiveness, and
politeness even when politeness is difficult are virtues.

> We are being asked to mold our cultural and social ideals to the lowest
> common denominator of idiocy just so that we can make sure that we don't
> accidentally scare away someone who may one day become a valuable member
> of the community.

No, that's not what I'm asking.  If I were asking that, I would be asking
you to start flaming people randomly.  That's not what I'm saying.  What
I'm saying is that a kind word turns away wrath, and that flaming *back*
just makes the situation worse.  I have never seen a flamewar on Usenet
ended by someone returning fire, only by someone being willing to stop.

There is more to a community than fighting aggressors.  I would rather
defend my community by contributing new parts to it and ignoring those who
aren't contributing than to waste time and energy arguing with them.

> One of the best things about open source in general, and perl in
> particular, is that it is possible for anyone to contribute.  The only
> determining factor is the quality of the contribution.  It doesn't
> matter if you are personally extremely abusive and abrasive, it doesn't
> matter if you are Mother Teresa reincarnated and always have a kind word
> for everyone.  Everybody is judged solely on the technical merit of
> their contributions.

Yes.  And I wholeheartedly agree with this.  That doesn't imply that one
has to attack those who don't contribute; ignoring them and moving on to
other things is, in my mind, much closer to the hacker ideal.  On Usenet,
you *can* effectively just ignore someone.  It's a nice feature.  People
should use it.

-- 
#!/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: 04 Aug 1998 09:40:42 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: File already opened by another process?
Message-Id: <m3emuwwvhx.fsf@windlord.Stanford.EDU>

JJ Good <address@in.sig> writes:

> Is there a way in perl to check if a file is already opened by another
> process running on the system?

Not unless you use locking.  For most applications where that question is
important, you should be using locking.  (See the entry for flock in man
perlfunc or use perldoc -f flock.)

-- 
#!/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: Tue, 4 Aug 1998 15:39:33 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: File Upload with Perl
Message-Id: <35C72B35.C8F46566@inlink.com>

Try CGI.pm

It is at:
http://stein.cshl.org/WWW/software/CGI/cgi_docs.html

It has built-in subroutines for file uploads.

HTH,

Brent


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

Date: Tue, 04 Aug 1998 16:17:00 GMT
From: huntersean@hotmail.com
Subject: Re: get path of working directory?
Message-Id: <6q7c5s$q2l$1@nnrp1.dejanews.com>

In article <35C64CF8.6E43@flash.net>,
  dtbaker_@flash.net wrote:
> I might just be missing the obvious, but what is the best way to get the
> full path of the current working directory? I have no problem SETTING
> the working directory with chdir(), but can't find a funtion that tells
> me where I am for verification purposes.
>
> It may also make a difference... I'm running in windows95 environment,
> so I'd hope for a return value like c:\somedir\somesub\etc
>
> --
> Thanx, Dan
>
use Cwd;

my $curr_dir = cwd();

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


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

Date: 04 Aug 1998 08:48:42 -0700
From: Brad Murray <murrayb@vansel.alcatel.com>
Subject: Re: Help! Stuck with an array assignment problem
Message-Id: <ug1fchhnp.fsf@vansel.alcatel.com>

bolesbr1@memorialmed.com writes:

> I've been having a hard time trying to grasp the concept of arrays in perl by
> trying to read the faqs and previous news posts.  What I would like to do is
> this:  I want to assign a whole array to one element of another array and be
> able to print out the one element.  I know I need to do something like this:
> 
> $a[0]=@b;

This evaluates the array @b in scalar context, which does not do what you
want.  You want to assign the reference to @b to the array entry $a[0].

  $a[0] = \@b;

Read perlref for details on references.  Most good Perl books cover the
topic of complex data structures well, but I recommend Nigel Chapman's
_Perl: The Programmer's Companion_ for exceptional treatment.  Camel and
Panther give good coverage as well, but I found Chapman's the most fun
to read as an experienced programmer in other languages.

-- 
Brad Murray      "This is one of the reasons you're such big hits at
Software Analyst  your parents' parties: being a good conversationalist
Alcatel Canada    is really what a liberal arts education is all about."


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

Date: Tue, 04 Aug 1998 16:53:07 GMT
From: huntersean@hotmail.com
Subject: Re: Help! Stuck with an array assignment problem
Message-Id: <6q7e9j$tov$1@nnrp1.dejanews.com>

In article <6q77ee$h56$1@nnrp1.dejanews.com>,
  bolesbr1@memorialmed.com wrote:
> I've been having a hard time trying to grasp the concept of arrays in perl by
> trying to read the faqs and previous news posts.  What I would like to do is
> this:  I want to assign a whole array to one element of another array and be
> able to print out the one element.  I know I need to do something like this:
>
> $a[0]=@b;
>
> But when I try to print out $a[0], like this:
>
> print $a[0];
>
> I don't get the same thing I get when I do this:
>
> print @b;
>
> Why is this?  I know it has something to do with referencing the array, but
> I'm not sure.  If someone could give me an example or two with some
> explanation, I would greatly appreciate it.  TIA!

You want something like
$a[0] = \@b;
print @{$a[0]};

This puts a reference to @b in $a[0], and then dereferences it as an array. 
You need to have a look at the perlref manpage or chapter 4 of the camel
book. References and dereferencing are quite a detailed subject, so I'm not
sure if a potted summary will really benefit you here.	Perhaps you might
like to take a look at the references (sorry ;-)) I've given you, and email
me with specific questions that you may have.

Regards

Sean Hunter

-----== 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 12:55:00 -0400
From: Jack Chastain <jack.chastain@attws.com>
Subject: Re: Help! Stuck with an array assignment problem
Message-Id: <35C73CE4.DDE6FC91@attws.com>

bolesbr1@memorialmed.com wrote:

> I've been having a hard time trying to grasp the concept of arrays in perl by
> trying to read the faqs and previous news posts.  What I would like to do is
> this:  I want to assign a whole array to one element of another array and be
> able to print out the one element.  I know I need to do something like this:
>
> $a[0]=@b;
>
> But when I try to print out $a[0], like this:
>
> print $a[0];
>
> I don't get the same thing I get when I do this:
>
> print @b;
>
> Why is this?  I know it has something to do with referencing the array, but
> I'm not sure.  If someone could give me an example or two with some
> explanation, I would greatly appreciate it.  TIA!
>

[snip]

What you are trying to do is an "Array of arrays" issue. This is rather well
documented in the Camel book and in Learning Perl, also in perldsc (Data
Structures Cookbook)!

Basically, perl (currently?) will not store an array within an array - this is
what you are trying to do when you say $a[0] = @b - in reality, what you are
doing here is "referencing an array in scalar context" - which gives you the
"size of" the array - the array in scalar context.

You can store the address of the array @b in the array element and reference it -
this gives you what you (may be) are looking for:

    $a[0] = [@b];
    print $a[0][1];    #Prints second element of array referenced in $a[0]!

There are many ways (TMTOWTDI!) of creating/referencing this structure. There is
also reasonably good documentation - check it out!

Hope this helps - Good Luck!



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

Date: Tue, 04 Aug 1998 16:03:37 GMT
From: b_redeker@hotmail.com
Subject: Re: hiding user input
Message-Id: <6q7bcp$oei$1@nnrp1.dejanews.com>

just to get it off my chest:

* I am a experienced developer (VB, VC, Delphi, etc) and have for a long time
followed several newsgroups;
* I have several times posted stupid questions, and sometimes stupid answers;
* I have never seen flaming like Abigail's in most newsgroups (hackers
newsgroups are the exception)
* lighten up, ok?

btw 42 is definitely 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: Tue, 04 Aug 1998 16:26:34 GMT
From: John Porter <jdporter@min.net>
Subject: Re: hiding user input
Message-Id: <35C736BB.314B@min.net>

Russ Allbery wrote:
> 
> You do realize that Gary isn't the only person who doesn't appreciate
> courtesy copies in e-mail, don't you?  

Yeah, but that's not the issue here.
I think we all understand -- except Gary, that is -- that there
are times when it is appropriate to take a discussion out of
the public forum into a private one -- which for most people
means email, but it could just as well be a private IRC channel.

-- 
John Porter


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

Date: 04 Aug 1998 09:28:46 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: hiding user input
Message-Id: <m3k94oww1t.fsf@windlord.Stanford.EDU>

Daniel Grisinger <dgris@rand.dimensional.com> writes:

> 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.

Honestly, while I think that rallying to the defense of someone usually
stems from noble motives, on Usenet and particularly in comp.* groups it
honestly seems rather out of place.  95% of the readers of this group, at
*least*, really don't care one way or the other.  The appropriate response
to personal attacks on Usenet is almost invariably to ignore them.

> 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.

Does it honestly matter?  If he answers questions later, the correctness
or helpfulness of his answers isn't going to change based on what he said
in a flamewar earlier on.

> 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.

Er.

This is Usenet.  Usenet has a lot of things, but historical record ain't
one of them.  The medium expires by its very nature.  Gary is rather far
from the only person who's been on Usenet from before the days of DejaNews
and considers making money off other people's writings without their
explicit permission to be in very poor taste.  I personally consider this
concept of determining who someone is from their posting profile to be a
Very Bad Thing.

> 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.

Why?  What does it matter?  Who cares?  I mean, if they were really
hurting the regulars, that would be one thing, but do you honestly believe
that Abigail is somehow deeply wounded by the fact that Gary's calling her
names?

> 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.

Maybe it's a Usenet generation thing, but I'm of the opinion that the fact
that the net has a collective memory of about two weeks is a *good* thing.
I can't count the number of people I've seen grow up on Usenet, some
taking longer than others, gradually becoming valuable posters after
really drastically bad starts.  What does it really matter if someone was
a flaming jerk two years ago if they aren't any more?

> 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.

Um.

Don't.

If you do, I'll have to contact your ISP and try to convince them to shut
it down.  That's spamming as far as I'm concerned; it's network abuse,
clear and simple, and is absolutely not acceptable.

People have the right to say that DejaNews is not allowed to make money
off of their posts.

-- 
#!/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: Tue, 04 Aug 1998 16:30:43 GMT
From: John Porter <jdporter@min.net>
Subject: Re: hiding user input
Message-Id: <35C737B4.308C@min.net>

Gary L. Burnore wrote:
> 
> On Mon, 03 Aug 1998 23:01:35 GMT, in article <35C641D1.96E@min.net>, John
> Porter <jdporter@min.net> wrote:
> 
> >> >Maybe you should let others speak for themselves; have some faith that
> >> >those you suppose are actually clueful will say the right thing.
> >
> >No comment on this?
> 
> I was letting others speak for themselves.

O.k.


> Ooh! Cool! We're going to turn this into an "I've been on the net since ..."
> thread.

No, not at all. I just went and searched for the relevant RFCs.
The earliest one, as far as I could tell, was 850.
I was not active on USENET that long ago.

-- 
John Porter


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

Date: Tue, 04 Aug 1998 10:41:00 -0700
From: news@russo.org (Chris Russo)
Subject: Re: hiding user input
Message-Id: <news-0408981041000001@buzz.hq.alink.net>

[ emailed & posted ]

In article <m3n29l13ld.fsf@windlord.Stanford.EDU>, Russ Allbery
<rra@stanford.edu> wrote:

[...]
>> Hmmmm... apparently you've never contributed anything to perl other than
>> bullshit, flames, and hard feelings.  I'd say that you are undoubtedly a
>> troll.
>
>I hate it when this argument comes up.

Although I'd agree with you if this were a "reputation thing", I think
that the slant is more that Mr. Burnore is probably just intentionally
disrupting this newsgroup with his guerilla tactics.  He actually has
nothing to do with Perl, and is merely (as my school-teaching wife puts
it) "acting out for attention".

Apparently, he's been very successful and is probably quite pleased with
himself.

To my chagrin, I'm one of the people who probably got him even more juiced
by sending him email.

I hope that everyone realizes that the best thing to do in this situation
is to simply ignore him.

Deep breaths, everyone,

Chris Russo

-- 
Chris Russo
news@russo.org
http://www.russo.org


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

Date: Tue, 04 Aug 1998 16:57:43 GMT
From: huntersean@hotmail.com
Subject: Re: How to write a UNIX command line script which accesses remote web sites.
Message-Id: <6q7ei7$ulh$1@nnrp1.dejanews.com>

In article <35C71E5B.50C@lmco.com>,
  erik.kleinbussink@lmco.com 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.
>
> 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
>

The HTTP and HTTP::Request modules sound like what you need.  Find out about
them on http://www.cpan.org/modules/00modlist.long.html#15)WorldWideWeb

Sean Hunter

-----== 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 17:26:21 GMT
From: scott@softbase.com
Subject: Re: Long filenames under Perl4 (DOS)
Message-Id: <35c7443d.0@news.new-era.net>

L|der Sachse (sachse@aeb.de) wrote:
> I have to use directory listings with long filenames and that's where it
> 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?

In DOS, it is impossible. In Windows 95, you can say something like
"dir > file.txt" and read the file. It will tell you the long filenames.

Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more. 


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

Date: Tue, 04 Aug 1998 16:13:00 GMT
From: justin_lloyd@my-dejanews.com
Subject: parsing of here-docs
Message-Id: <6q7buc$pcg$1@nnrp1.dejanews.com>

I've run into an interesting parsing issue when it comes to here-docs.  I have
some code that boils down to this:

   $email_address = "bob@nowhere.com";
   send_message($email_address, <<END_OF_MSG) if $email_address;
   Hi there, Bob!
   END_OF_MSG

However, the actual line of code is pretty long so I wrapped it:

   $email_address = "bob@nowhere.com";
   send_message($email_address, <<END_OF_MSG)
     if $email_address;
   Hi there, Bob!
   END_OF_MSG

The line

     if bob@nowhere.com;

appears as the first line of the message.  It seems that the parsing of the
conditional statement should precede that of the here-doc.  Is this exhibited
behavior correct, or should it do as I expected?

If you wish, you can reply directly to me at jlloyd_AT_harris_DOT_com, but
it's not necessary.

Thanks,

JcL

-----== 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 17:27:31 GMT
From: scott@softbase.com
Subject: Re: passwords and DOS/Win
Message-Id: <35c74483.0@news.new-era.net>

b_redeker@my-dejanews.com wrote:
> does anyone know how you can read a password from STDIN and not show that
> password on screen?

There is an old DOS command that will turn the screen display off.
I think it is "mode" or "ctty". Read an old DOS book for details.

Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more. 


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

Date: 4 Aug 1998 11:54:46 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Perl "system" command and Informix
Message-Id: <6q7as6$ann$1@monet.op.net>


In article <35c659bb.0@blushng.jps.net>,
Edward Villalovoz <edwardv@jps.net> wrote:
>   system q{
>   dbaccess << 'eof'
>   database pmsys@n36;
>   SELECT *
>   FROM ama0_980714
>   WHERE EXTEND (ostime, HOUR to HOUR) = "$hh";
>   eof
>   };

Variables are not expanded in single-quoted strings.  q{} introduces a
string of this type, in which no variable interpolation is performed.
The result is that `dbaccess' gets the literal string "$hh", instead
of "12" or whatever.  If you want variable interpolation, you need to
use `qq' instead of `q', like this:

   system qq{
   dbaccess << 'eof'
   database pmsys\@n36;
   SELECT *
   FROM ama0_980714
   WHERE EXTEND (ostime, HOUR to HOUR) = "$hh";
eof
   };

Note the backslash on the @n36; without the backslash, Perl will also
try to expand the array @n36.  Also note that the shell probably
won't recognize the `eof' unless it's flush with the left margin.

Now, I would do it a little differently.  When you use `system', you are
running the shell and having the shell process your command, and that
is inefficient, and it can also cause problems if the command contains
characters that are special to the shell.  For these reasons, it's
probably better to have Perl invoke `dbaccess' directly and feed the
command right into it:
   

   open DBACCESS, "| dbaccess"
     or die "Couldn't run dbaccess: $!; aborting";
 
   print DBACCESS qq{
     database pmsys\@n36;
     SELECT *
     FROM ama0_980714
     WHERE EXTEND (ostime, HOUR to HOUR) = "$hh";
   };

   close DBACCESS 
     or die "Couldn't finish dbaccess: $!; aborting";


You also get better control over the error conditions if  you do it
this way.

Hope this helps.



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

Date: Tue, 04 Aug 1998 10:03:16 -0700
From: Andrew Perrin <aperrin@mcmahon.qal.berkeley.edu>
Subject: Re: Piping mail to a script that splits off attachments (Mailtools)
Message-Id: <35C73ED4.4E1DAD0F@mcmahon.qal.berkeley.edu>

I'm not sure, to be honest -- it's listed as part of the Solaris
installation on our systems.

- wrote:

> Andrew Perrin <aperrin@mcmahon.qal.berkeley.edu> Said this:
>
> >I believe the munpack utility does this pretty cleanly, but I can't say
> >I've played with it too much; check it out.
> >
> >     munpack - unpack messages in MIME or split-uuencode format
> >
> >SYNOPSIS
> >     munpack [ -f ] [ -q ] [ -t ] [ -C directory ] [ filename ...
> >     ]
> >
> >DESCRIPTION
> >     The munpack program reads each RFC-822 message filename  and
> >     writes  all  non-text MIME parts or split-uuencoded files as
> >     files.  If no filename argument is given, munpack reads from
> >     standard input.
> >
> >
>
> Where can I get this?  It doesn't seem to be part of the "standard"
> installation, or I'm not looking in the right place and it's just not
> in my path



--
-------------------------------------------------------------
Andrew J. Perrin - NT/Unix/Access Consulting -  (650)938-4740
aperrin@mcmahon.qal.berkeley.edu (Remove the Junk Mail King
http://socrates.berkeley.edu/~aperrin        to e-mail me)
    e-mail wheres-andy@socrates.berkeley.edu to find me!
-------------------------------------------------------------




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

Date: Tue, 04 Aug 1998 09:37:40 -0700
From: Jim Bowlin <bowlin@sirius.com>
To: venus@bom2.vsnl.net.in
Subject: Re: Problem updating $dir in module File::Find - Win32 platform
Message-Id: <35C738D4.5C6C4397@sirius.com>

venus@bom2.vsnl.net.in wrote:
> 
> 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, ".");
> 
> -----------------------------------------------

# try this: 
use File::Find;
sub wanted {
    print "Dir =  $File::Find::dir\n";
    print "Name = $File::Find::name\n";
    print "File = $_\n\n";
}
finddepth(\&wanted, "..");
 
-- Jim Bowlin


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

Date: Tue, 04 Aug 1998 19:38:59 -0700
From: Jan Krynicky <JKRY3025@comenius.ms.mff.cuni.cz>
To: venus@bom2.vsnl.net.in
Subject: Re: Problem updating $dir in module File::Find - Win32 platform
Message-Id: <35C7C5C3.6403@comenius.ms.mff.cuni.cz>

venus@bom2.vsnl.net.in wrote:
> 
> 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, ".");
> 
> -----------------------------------------------
<snipped>
> -----------------------------------------------
> 
>   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.

It is posible that I overlooked something, but I don't think
they should be. Only $File::Find::dir sould be updated,
$main::dir should remain intact.


You either have to use the full names ($File::Find::dir)
or schitch to File::Find package:


 sub wanted
 {
package File::Find;
   print "Dir =  $dir\n";
   print "Name = $name\n";
 
  print "File = $_\n\n";
package main;
 }

> Thanks a lot in advance,
> 
> --
> Yashesh
> 
> venus@bom2.vsnl.net.in

HTH, Jenda


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

Date: Tue, 04 Aug 1998 13:16:32 -0400
From: Tim Vann <tlvann@raleigh.ibm.com>
Subject: Reading from and writing to the serial port
Message-Id: <35C741EF.BC152260@us.ibm.com>

I'm trying to read the input from the serial port using /dev/tty and
then based on what I get, send out commands back thru /dev/tty.  I think
some of the problems I've had are related to the open command not
keeping the connection active  (I'm getting the same line echoing to the
console over and over again that should only be coming up once.)

This is what I've been trying:

open (DEV, '+< /dev/tty0');
while (<DEV>) {
    print;
    if ($_ =~ /^Please\b/) {
        print "Found the Please prompt\n";
        print DEV " \r";
    }
} close (DEV);

I am getting it to print "Found the Please prompt and it also prints out
the " \r" to the serial port, but then it should read in a * prompt and
stop.  It doesn't.  The line that it found beginning with "Please" is
printed to the console and the serial port several times along with
other lines that had previosly come in from the serial port.  Any idea
what's happening?

Travis Harkness
harkness@us.ibm.com



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

Date: Tue, 04 Aug 1998 16:57:18 GMT
From: "Majik Group" <filmguy@bellsouth.net>
Subject: Re: Reading in one file and writing to another
Message-Id: <O3Hx1.52$ke.172975@news1.atl.bellsouth.net>


Matt, Try changing to a global replace feature.... See below...


Matt Grommes wrote in message <35C726D4.DF7797DA@sandia.gov>...
>
> 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\">&nbsp;$month $day</font></b></
>td></tr></table><ul><li>$message</ul>\n";
>
> if (-T $MainLocation)
> {
>  open(HEAD, "+<$MainLocation") || die "Error $! opening file.";
>  while (<HEAD>)
>  {


========= TRY THIS ==============================

if (s/<!--NewsText-->/$line/g) {  # Global replace works better

================================================
>   if(s/<!--NewsText-->/$line/x)
>   {
>


>
>-- Matt Grommes
>-- Target Fabrication
>-- www.targetfab.sandia.gov
>




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

Date: Tue, 04 Aug 1998 17:00:18 GMT
From: John Porter <jdporter@min.net>
Subject: Re: strange results from tied hash
Message-Id: <35C73EA2.4FE6@min.net>

krupicka@tellabs.com wrote:
> 
> 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)

In other words, you re-wrote MLDBM?  Why?

-- 
John Porter


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

Date: Tue, 04 Aug 1998 10:07:30 -0700
From: Edward Houston <ed@h.com>
Subject: Re: Uploading Large Files with Perl
Message-Id: <35C73FD2.4349EFE4@h.com>

Thats fine until someone opens up the frame in a new window...

philc@hempseed.com wrote:

> > I would like to use ftp, but MS IE doesn't support ftp://username@host syntax,
> > and can only use ftp://username:passwd@host. Users (IntrAnet only) freak out
> > when they see their password flashing on their screen.
>
> If that is their only concern, just put it in a frame (i.e. one set at %100).
> Then the URL displayed would be of the frameset, not the FTP session...
>
> -----== 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 17:34:17 GMT
From: scott@softbase.com
Subject: Re: Using Perl to create a DLL
Message-Id: <35c74619.0@news.new-era.net>

Eric Johansson (esj@harvee.billerica.ma.us) wrote:
> 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.

I don't think you realize what you're asking. It's impossible. Perl
code is compiled to an intermediate parse tree. A DLL needs concrete
entry points to which the caller can link, load, and call. Perl
routines wouldn't have entry points per se, they'd just be entries in
the parse tree. Before Visual Basic became a compiled language capable
of generating native code, it had exactly the same problem:  you
couldn't create a VB DLL because VB was compiled to p-code which again
had no entry points that other modules like EXEs and other DLLs could
load (with LoadLibrary()) and call. The interpreter, in both cases,
is interpreting its intermediate code, and all the routines are located
in it. There's no routine, in OS terms, for the caller to call.
The Perl program is, to the OS, a figment of the parser's imagination.
It's easy to provide glue code to call *out of* the interpreted
program, but very hard to call *into* the interpreted program.

You could, of course, compile the Perl code into an OS executable like
Visual Basic finally ended up doing, but you'd be back to the same
compile/link/run cycle.

I'd suggest developing the DLL's functionality with a stub main()
driver first, and investing in a good debugger. Something like
Visual C++ or Borland C++ Builder that can step through a DLL loaded
by another process.

Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more. 


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

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

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