[10193] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3785 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 22 13:07:53 1998

Date: Tue, 22 Sep 98 10:00:24 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 22 Sep 1998     Volume: 8 Number: 3785

Today's topics:
    Re: [Q]Net::Ftp - How to set local dir? (Jeffrey R. Drumm)
    Re: already made binaries for DEC_ALPHA? (OpenVMS) <sugalskd@netserve.ous.edu>
    Re: any way to encrypt my script? (Paul David Fardy)
    Re: C Struct -> Perl (Mark-Jason Dominus)
    Re: Can CGI return page but continue processing? <barnett@houston.Geco-Prakla.slb.com>
        Can one pass Variables from PERL CGI to another Script  <merlin@fclass.net>
    Re: cat reese > /dev/null (was Re: Perl & Java - differ <uri@camel.fastserv.com>
        Change chars in STDOUT? <Christopher.Marquis@fairchildsemi.com>
    Re: Change chars in STDOUT? <eashton@bbnplanet.com>
    Re: copy a file? (Mark-Jason Dominus)
        dbi dbd::ORACLE insert questions <jhamil01@sunbox.troy.sat.eds.com>
    Re: even/odd numbers <Arved_37@chebucto.ns.ca>
        FORMAT problem <prl2@lehigh.edu>
        George Reese for President! (was: Re: Perl & Java - dif <zenin@bawdycaste.org>
    Re: Hashes springing into existence [Was: more regex/pa <merlyn@stonehenge.com>
        Hidden field??? ywang@maingate.net
    Re: Hidden field??? <evonzee@tritechnet.com>
    Re: Hidden field??? <mcgrew@alumni.stanford.org>
    Re: Hidden field??? <merlyn@stonehenge.com>
    Re: Hidden field??? <evonzee@tritechnet.com>
    Re: I need a script writen, can someone help me please <barnett@houston.Geco-Prakla.slb.com>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Tue, 22 Sep 1998 15:24:57 GMT
From: drummj@mail.mmc.org (Jeffrey R. Drumm)
Subject: Re: [Q]Net::Ftp - How to set local dir?
Message-Id: <3607c0cd.81851025@news.mmc.org>

On Tue, 22 Sep 1998 14:59:41 +0100, Raj Subramani <raj.subramani@citicorp.com>
wrote:

>In interactive ftp one can set lcd to /foo/bar
>so that any get commands will store the remote
>file in my /foo/bar dir.
>
>The Net::Ftp modules does'nt seem to define such
>an option.
>
>Does one just say:
>$ftp->get(remoteFile, /foo/bar/localFile);

That's one way (although i doubt the specific example above will compile).

>Any help would be much appreciated.

Setting the local directory is a function of your application, not specifically
the Net::FTP module. Use Perl's chdir command.

-- 
                               Jeffrey R. Drumm, Systems Integration Specialist
                       Maine Medical Center - Medical Information Systems Group
                                                            drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented!" - me


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

Date: 22 Sep 1998 16:23:40 GMT
From: Dan Sugalski <sugalskd@netserve.ous.edu>
Subject: Re: already made binaries for DEC_ALPHA? (OpenVMS)
Message-Id: <6u8iuc$3vc$1@news.NERO.NET>

In comp.lang.perl.misc Kurt Lange <milkman@dave-world.net> wrote:
: My company is looking for the binaries that are already made for DBI and the
: DEC_ALPHA running vms 7.1.  My company does not want to buy a C Compliler.
: They are not cheap, we are just selling a product in which we don't want to
: require the customer to buy a C Compliler, just to run Perl DBI.  If there
: is someone out there willing to give or sell it to us(depending on the
: price), we would greatly appreciate.  Or maybe there is a free C Compliler
: for the DEC_ALPHA that we don't know about.  If anyone knows of a free or
: cheap C Compliler, we would appreciate knowing about it.

There are binaries for perl 5.004_04, compiled for OpenVMS Alpha
7.1, with DBI and DBD::Oracle compiled against Oracle 7.3.2.3.2 at
http://www.sidhe.org/vmsperl/prebuilt.html. (Only the VMS 7.1 Alpha
bersion ahs DBI/DBD::Oracle built in, as it's a snapshot of my production
perl as of a while ago) No 5.005_02 as of yet (Mainly due to lack of
time), but 5.004_04 should do you
fine.

Pages for VMS perl in general are at http://www.sidhe.org/vmsperl.

OTOH, given the cost of databases in general (whichever one you're running
with on VMS), springing for Dec C really isn't that big a deal. And,
AFAIK, none of the DBMSes on VMS can run against Gnu C. (But then again,
neither does perl, at least on OpenVMS Alpha)

					Dan


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

Date: 22 Sep 1998 15:18:09 GMT
From: pdf@morgan.ucs.mun.ca (Paul David Fardy)
Subject: Re: any way to encrypt my script?
Message-Id: <6u8f3h$7qf$1@coranto.ucs.mun.ca>

Re: compiler vs interpreter

I think several in the "Perl is a compiler" camp are missing the
point here.  In terms of this debate, it's the OS's understanding
of "interpreter" that counts here.  From Digital UNIX's manual
page on execve(2):

  An executable text file is one that contains a header line with the
  following syntax:

  #! interpreter_name [ optional_string ]

  The #! identifies the file as an executable text file.  The new process
  image is constructed from the process image file named by the
  interpreter_name string.  ...


>From FreeBSD manual page on execve(2):

  An interpreter file begins with a line of the form:

  #! interpreter [arg]

  When an interpreter file is execve'd, the system actually execve's the
  specified interpreter. ...


This gives a technical legitimacy to "Perl is an interpreter".
Two critical points define an interpreter in this context:  (1) the
original source is parsed _after_ the executing process is exec'd
and--it follows--(2) the code must be distributed in its original
source form.  For this debate, the context of the Unix kernel
definition is legitimate.  I believe it's also more relevant than
arguments about parse trees, byte code, and virtual machines.
Let's face it: the real issue in this thread is philosophical,
not technical.  We're talking about hiding stuff here, we're
not talking about the efficiencies of compiling vs interpreting.

Still, though, the technical issue is interesting:  While it's true
that the */bin/perl we all know--and most here love--does compile the
code, is that a requirement of the language?  How hard would be for
some random perl programmer--say Larry Wall, for example--to write
a perl program that interprets perl programs?

Paul Fardy (japh)


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

Date: 22 Sep 1998 11:51:08 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: C Struct -> Perl
Message-Id: <6u8h1c$egn$1@monet.op.net>

In article <6u4dbs$osh$1@netnews.upenn.edu>,
Mark-Jason Dominus <mjd@plover.com> wrote:
>In article <6u11tk$2gt$1@news.dn.net>, Andy <rapruitt@inetconn.net> wrote:
>>I'm trying to replicate a C struct  in Perl and I'm having a bad time of it.
>>Does join preserve the byte order and word boundaries? 
>
>Join preseves all the orders.  All it does is concatenate things.  As
>for `word boundaries', your question makes no sense.  Do you know what
>word boundaries are?

Andy wrote me a very polite note in which he explained that in fact,
he did not know what `word boundaries' are, and he asked me to explain
them.  I wrote an explanation, which I sent, and then I thought that
other people might be interested in the explanation, especially if
they also have to invent Perl `pack' templates for C structs, so I am
reproducing it here.

You should look at this in a fixed-width font, because the
illustrations are important.

There is little Perl content, so I've redirected followups to comp.lang.c.

>> If you don't mind, what is a word boundary?

An integer number in the computer is usually represented by more than
one byte, typically two or four bytes.  Such multi-byte quantities are
called `words'.  

Here is a picture of a small part of the computer's memory.  Be sure
to display this file in a fixed-width font or the pictures won't make
any sense.

	32 33 34 35 36 37 38 39 40 41 42
	|----I1-----|
	                  |----I2-----|  

If you tell the computer to store integer I1 at address 32, then the
four bytes of I1 will be put at 32, 33, 34, and 35.  (Or at 35, 34,
33, and 32 if the computer uses `little-endian byte order'.)  This
will work on every computer.

If you tell the computer to store integer I2 at address 38, then, on
some computers, four bytes of I2 will be put at 38, 39, 40, and 41.
On most computers, however, this is impossible.  Hardware limitations
often require that words be stored at addresses that are multiples of
4 (or 2, or 8, or more, depending on the word and on the hardware.)
Your attempt to violate this restriction will cause a hardware fault
condition.  The operating system will detect the fault and take
appropriate action.  On Unix systems, the typical end result is that
your program aborts and dumps core, and the shell prints `Bus error:
core dumped'.

On typical machines, an integer can only be stored in memory at an
address that is a multiple of 4.  Other addresses will cause a bus
error and a core dump.  We say that there is a notional `word
boundary' every four bytes, and tat storage of a four-byte integer (a
`word') cannot `cross a word boundary':

        |           |           |           |
	32 33 34 35 36 37 38 39 40 41 42 43 44
	|----I1-----|           |           |
	|           |     |----I|2----|     |
        |           |           |           |

Here you see the word boundaries cutting through I2 but not I1.  We
say that `I1 is aligned on a word boundary', but I2 is not.  Attempts
to store or retrieve I2 will fail.

When you pack information into a structure, the C compiler has to
leave empty space in the structure to get the alignment correct.
Consider your example:

	struct CUST {
	  char start_code[5];
	  int rc;
	  int slength;
	}

Let us suppose that `int' is four bytes long, which is typical.
The obvious way for the compiler to store this struct is like this:

        |           |           |           |           |
	0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16
	|--start_code--|
                       |-----rc----|
                                   |--slength--|
        |           |           |           |           |

for a total of 13 bytes.  But this won't work, because then rc and
slength would be improperly aligned; you can see them cross the word
boundaries.  To fix this problem, the compiler inserts some empty
space into the structure, so that it looks like this instead:

        |           |           |           |           |
	0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16
	|--start_code--|
                       |xxxxxxxx|
                                |-----rc----|
                                            |--slength--|
        |           |           |           |           |



The xxxxxxxx is three bytes of unused space, called `padding', whose
only purpose is to make rc and slength align properly.  The total size
of the struct is now 16 bytes.

> So that I would have to say:
> pack "a5 x3 N N x3 a$slength", 'start', $rc, $slength, 'long string!';

No, you do it the way I said to in the article you were replying to.
I don't know how that extra `x3' got into your pack format.  If the
picture I drew above is correct, you use

	pack "a5 x3 N N", 'start', $rc, $slength;

The a5 is five bytes of alphabetic characters for the start code.  The
x3 is the three bytes of padding.  The N's are for the rc and slength,
which are big-endian integers.

But you must compile the program I sent you and run it and understand
its output, because the picture which is correct for my computer is
also correct for yours.  For example, the output of the program on an
IBM PC might very well be something like this:

	start_code: 5 bytes at offset 0.
	rc: 2 bytes at offset 6.
	slength: 2 bytes at offset 8.
	Total struct size: 10.

`offset' is the position in the structure at which the structure
member begins.  So for example `rc: 2 bytes at offset 6' means that
the `rc' part of the structure occupies bytes 6 and 7.  Notice that
even though start_code only occupies bytes 0,1,2,3, and 4, rc starts
at byte 6 instead of byte 5; from that you can infer that byte 5
contains useless padding to preserve the alignment.

>From this you can draw the correct picture:

        |     |     |     |     |     |
	0  1  2  3  4  5  6  7  8  9 10
	|--start_code--|                   5 bytes at offset 0
                       |xx|
                          |-rc--|          2 bytes at offset 6
                                |slen-|    2 bytes at offset 8
        |     |     |     |     |     |

And then the pack format would be

	pack "a5 x1 n n", 'start', $rc, $slen;

Note that the x3 turned into x1, and the N's turned into n's.
(N means a 4-byte integer, and n means a 2-byte integer.)

I hope this helps. 




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

Date: Mon, 21 Sep 1998 08:12:07 -0500
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
Subject: Re: Can CGI return page but continue processing?
Message-Id: <360650A7.2D81F575@houston.Geco-Prakla.slb.com>

mark_thomas@my-dejanews.com wrote:
> 
> Is there any way for a Perl CGI script to send back a complete HTML page and
> close the connection, then perform some other functions before quitting?
Yes.

> 
> In other words, is there any other way to close the output stream without
> exiting the Perl program? (i suppose you could use fork() but is there any
> other way?)
Fork would work, but I think the following should also.

#!/usr/local/bin/perl -w
#
select STDOUT;
$| = 1;
print "Content-type: text/html\n\n";
print <<EOF;
<HTML>
<BODY>
<P>Thank you.</P>
</BODY>
</HTML>
EOF
close(STDOUT);

open(FILE, ">/tmp/file") or die "Cannot open: $!\n";
select(FILE);
$| = 1;
for ($i = 0; $i < 10; $i++) {
	print $i, "This is some text.\n";
	sleep (10);
}
exit;
__END__

Sorry, I don't have a web server on which to try this myself, but the
above should work okay.

HTH.

> 
> Thanks
> Mark Thomas
> mark_thomas@my-dejanews.com
> 
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

Cheers,
Dave

-- 
Dave Barnett	Software Support Engineer	(281) 596-1434

"What do you care what other people think?"
	-- __Infinity__, Arline Greenbaum played by Patricia Arquette


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

Date: Tue, 22 Sep 1998 10:48:09 -0500
From: Merlin Johnson <merlin@fclass.net>
Subject: Can one pass Variables from PERL CGI to another Script or an ASP page?
Message-Id: <3607C6B9.1F70@fclass.net>

Hello,

I am trying to pass variables generated within a PERL CGI script to
another PERL script located on another server.  Alternately, I can send
the variables to an Active Server Page on that same other server.

My thoughts were to somehow create a "pseudo" Form POST from the first 
CGI so that the second CGI script thinks the data was POSTED from a
form.

Where can I find the PERL syntax to generate the Form POST code?

Will my idea work or does anyone have other suggestions?

Thanks.

Merlin Johnson


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

Date: 22 Sep 1998 12:14:54 -0400
From: Uri Guttman <uri@camel.fastserv.com>
Subject: Re: cat reese > /dev/null (was Re: Perl & Java - differences and uses)
Message-Id: <sarvhmgf7k1.fsf@camel.fastserv.com>

>>>>> "A" == Abigail  <abigail@fnx.com> writes:

  A> Uri Guttman (uri@sysarch.com) wrote on MDCCCXLVIII September MCMXCIII in
  A> <URL: news:x790jcx4wx.fsf_-_@sysarch.com>:
  A> ++ 
  A> ++
  A> ++ to sumarize, reese has no sense of humor, no sense of programming
  A> ++ history, no knowledge of turing machines and turing computability, a
  A> ++ narrow view of allowable syntax and semantics, a zealotic view on the
  A> ++ right way to do anything, in short, not a good candidate for perl.

  A> Well, he does have a programming history. I've had the pleasure of
  A> maintaining some of his code. 

  A> Perfect examples of how not to code, and how to break any OO principle 
  A> you can imagine.

i meant no sense of the history of programming, i.e. where perl came from,
what other paradigms lived and died, turing machines, etc. 

tho it is nice to hear that someone has seen his OO code and it is as
logical as he is.

uri

-- 
Uri Guttman                             Speed up your web server with Fast CGI!
uri@fastengines.com                                  http://www.fastengines.com


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

Date: Tue, 22 Sep 1998 11:32:00 -0400
From: Christopher Marquis <Christopher.Marquis@fairchildsemi.com>
Subject: Change chars in STDOUT?
Message-Id: <3607C2F0.85FFBDCF@fairchildsemi.com>

I'm trying to do a cute little password routine. But I can't think of a
way of replacing everything typed to echo back a "*" or something like
it instead of what is really being typed.



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

Date: Tue, 22 Sep 1998 15:49:47 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Change chars in STDOUT?
Message-Id: <3607C4B0.C503089A@bbnplanet.com>

Christopher Marquis wrote:

> I'm trying to do a cute little password routine. But I can't think of a
> way of replacing everything typed to echo back a "*" or something like
> it instead of what is really being typed.

print "Password: ";
system ( '/usr/bin/stty -echo -isig' );
$password = <STDIN>;
system ( '/usr/bin/stty echo isig' );
print ( "\n" );

An example that would work on Solaris. man stty.

e.

"All of us, all of us, all of us trying to save our immortal souls, some
ways seemingly more round-about and mysterious than others. We're having
a good time here. But hope all will be revealed soon."  R. Carver


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

Date: 22 Sep 1998 11:36:06 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: copy a file?
Message-Id: <6u8g56$ecu$1@monet.op.net>

In article <36079596.E0046C8B@uic.nnov.ru>,
Aleksey A. Pavlov <paaa@uic.nnov.ru> wrote:
> system 'cp' ," $oldfile $newfile";
> is shortest way...:) i use it.

I don't think you do use it, because it doesn't work.  What you wrote
runs `cp' with one argument, which happens to have a space in it; then
`cp' aborts because it wasn't at least two arguments.

You need:

	system 'cp', $oldfile, $newfile;





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

Date: Tue, 22 Sep 1998 12:27:32 -0400
From: "John W. Hamill" <jhamil01@sunbox.troy.sat.eds.com>
Subject: dbi dbd::ORACLE insert questions
Message-Id: <3607CFF3.DCD4B044@sunbox.troy.sat.eds.com>

I have dbi dbd::ORACLE set up with PERL.   I can do 
a select fine.
I haven't been able to get and INSERT to work.

Below is the code I am running.

Does anyone have an example of an INSERT using the dbi dbd::ORACLE
function calls?

 ...
require( "dbi-lib.pl" );
 ...
my($dbh) = &db_connect( $DB );
 ...
   @rslts =
      &db_write_row(
         $dbh, "
INSERT INTO
   LTP
(
   SAK,
   ADD_DATE,
   ADD_TIME
)
VALUES
(
   $$,
   '19980917',
   '174028'
)
 
"
      );
 ...
&db_disconnect( $dbh );


-- 
John W. Hamill      `"""""""   PROFS: SMTP(JHAMIL01)      Voice:(248)528-6139
EDS                  (. (. >   jhamil01@sunbox.troy.sat.eds.com
Mail Code 480.992.409          lnussat.jhamill@eds.com    Fax  :(248)528-6408
1450 Stephenson Hwy            LOTUS NOTES: JOHN W HAMILL@US_GM_Saturn
Troy, MI  48083-1189 R1100RS 94BMW  There is a $50.00 charge for any junk sent
                 KZ440D2 LTD 81Kaw to me.       The above are my views only!!


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

Date: Tue, 22 Sep 1998 13:34:41 -0300
From: Arved Sandstrom <Arved_37@chebucto.ns.ca>
Subject: Re: even/odd numbers
Message-Id: <Pine.GSO.3.95.iB1.0.980922133319.3484B-100000@halifax>


Mutually exclusive categories... :-)

On 22 Sep 1998, Sam Holden wrote:

> Which I grant you most programmers will know... however, those who have only
> used VB and the like might not.



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

Date: Tue, 22 Sep 1998 10:28:02 -0400
From: "Phil R Lawrence" <prl2@lehigh.edu>
Subject: FORMAT problem
Message-Id: <6u8c6h$20ra@fidoii.cc.Lehigh.EDU>

Hello, I have a new format problem.  I am calling a reporting method from a menu; both the TOP and the BODY of the format are
written correctly and I am returned to the same menu.  If I request the same report again (to make some parameter change, for
example) the body is written, but not the TOP.  Code and example output follow:

#!/usr/local/bin/perl -w
use diagnostics;
use strict;

package page;

sub report {
my $filename = "test.prn";
open REPORT, ">$ENV{HOME}/$filename" or die;

format REPORT_TOP =
BLAH: @<<<<<<<<<<<<<<
      'BLECH 1'

@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'Title'
@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'Sub Title'

 .

format REPORT =
 @<<<<
 'ding!'
 ONE          @>>>>>     @>>>>>     @>>>>>     @>>>>>     @>>>>>     @>>>>>
              'one','two','three','four;','five','six'
 TWO          @>>>>>     @>>>>>     @>>>>>     @>>>>>     @>>>>>     @>>>>>
              'one','two','three','four;','five','six'
 THREE        @>>>>>     @>>>>>     @>>>>>     @>>>>>     @>>>>>     @>>>>>
              'one','two','three','four;','five','six'

 .

for (1..3) {write REPORT}
# You see I tried resetting the accumulator.
$- = 0;
close REPORT or die;
}

package main;

sub menu {
    my $choice = '';
    while ( $choice !~ /^(1|q)$/i ) {
        system("tput clear");
        print "\n            Menu Title\n\n";
        print "       1.  Test Formatting\n\n";
        print "       Q.  Quit\n\n\n";
        print "           Enter Selection:  ";
        chomp ( $choice = <STDIN>);
    }
        if ($choice eq '1') {   &page::report;
                                &menu;
                            }
        if ($choice =~ /q/i){   system("tput clear");
                                exit(0);
                            }
}
menu;

__END__


First output:

BLAH: BLECH 1

                                     Title
                                   Sub Title

 ding!
 ONE             one        two      three      four;       five        six
 TWO             one        two      three      four;       five        six
 THREE           one        two      three      four;       five        six

 ding!
 ONE             one        two      three      four;       five        six
 TWO             one        two      three      four;       five        six
 THREE           one        two      three      four;       five        six

 ding!
 ONE             one        two      three      four;       five        six
 TWO             one        two      three      four;       five        six
 THREE           one        two      three      four;       five        six



Second output:

 ding!
 ONE             one        two      three      four;       five        six
 TWO             one        two      three      four;       five        six
 THREE           one        two      three      four;       five        six

 ding!
 ONE             one        two      three      four;       five        six
 TWO             one        two      three      four;       five        six
 THREE           one        two      three      four;       five        six

 ding!
 ONE             one        two      three      four;       five        six
 TWO             one        two      three      four;       five        six
 THREE           one        two      three      four;       five        six







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

Date: 22 Sep 1998 16:36:43 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: George Reese for President! (was: Re: Perl & Java - differences and uses)
Message-Id: <906482150.531056@thrush.omix.com>

--------------------------------------------------------------------------
                     George Reese for President!
--------------------------------------------------------------------------

George, you *really* need to step back and actually *read* what you've wrote
sometime.

You've contradicted yourself in this thread more times then The Hitchhiker's
Guide to the Galaxy.  When confronted with empirical evidence to such
blatant contradictions you start playing semantic games that rival Clinton's
legal team.

So what if your *exact* words where not, "Python, Java, and OO rule!  Perl, C,
SmallTalk and structured programming suck!".  This has been the mainstay of
your arguments since the start of the thread.  You can play all the semantic
games you like, however as long as there is a DejaNews we all can see exactly
what you've written and exactly what you mean.  You have been nothing if not
vocal and clear.

John Klassa quotes from you included the exact message IDs to insure that
everyone could easily see the context was clear and correct.

This isn't politics where the world will forget what you said 6 months ago
and such semantic games might actually work.  This is USENET.  Funny thing
about USENET, it evens the playing field.  Unlike the "real world", in
USENET your ideas and convictions must be able to stand on there own merits,
be you Brian Kernigan or a kid in Jr. High.  Contradicting yourself and not
fessing up when confronted is bad style at best, lies at worst.

As can clearly be seen from the followups to your posts, your ideas fall far
short of reality.  You have an extremely narrow and confused view of the
world, and your statements, contradictions, and semantic games border on
self dilution.

George, seek help.  I'm beginning to think you might actually believe what
you are saying.

Is this a personal attack?  Maybe (probably), however I consider it much
more of a badly needed wakeup call to try and bring you back in touch with
reality.  You've clearly lost your grip...


George Reese <borg@imaginary.com> wrote:
: In comp.lang.java.programmer John Klassa <klassa@aur.alcatel.com> wrote:
: : On Mon, 21 Sep 1998 20:12:10 GMT, George Reese <borg@imaginary.com> wrote:
: :   > I advise you to go back and take a remedial reading comprehension
: :   > class.  I have never argued anything of the sort of "Perl is so far
: :   > beneath Python".  You just made that up.
:
: : Really?  Maybe I suffer from an inability to comprehend what I read, too,
: : but the following would suggest that he didn't just make that up.
:
: : Message-ID: <MpFJ1.544$E9.1882388@ptah.visi.com>
: : Perl has no real use.  If you have to do scripting or text processing, use
: : Python.  Otherwise, use Java.
:
: : Message-ID: <pFRJ1.634$E9.2309187@ptah.visi.com>
: : One of the measures of a successful language is how easy it is for people
: : to pick it up and also for how easy it is for those who know the language
: : to read legacy code.  Perl is notoriously bad on this count.  To compound
: : its horrid syntax, it also has the single nastiest OO paradigm I have ever
: : seen in a programming language.
:
: : Message-ID: <CLaL1.1514$E9.5234013@ptah.visi.com>
: : Larry Wall was simply wrong.
:
: : Message-ID: <96gL1.1626$E9.5495820@ptah.visi.com>
: : Perl is just chaos.
:
: You do have a reading comprehension problem.  Especially since you
: have taken all of this out of context.  
:
: All of these things actually say different things, none of which are
: functional comparisons of perl and python.
:
: "Perl is chaos" is a comment on perl's syntax.  
:
: "Larry Wall was simply wrong" was a response to someone who posted
: some quote or another.  This, honestly, was a really stupid quote for
: you to post since it says zippo about perl or python.
:
: And the other two basically say that wherever perl can solve a
: problem, either python or java (or both) are equally able to solvve
: that problem.
:
: Of course, you have left out the parts where I went into that claim
: further.  The parts where I say the reason is due to the
: maintainability and extensibility of python, not because of some grand
: feature set of python.
:
: -- 
: George Reese (borg@imaginary.com)       http://www.imaginary.com/~borg
: PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
:    "Keep Ted Turner and his goddamned Crayolas away from my movie."
: 			    -Orson Welles

-- 
-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: Tue, 22 Sep 1998 16:45:53 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Hashes springing into existence [Was: more regex/pattern substitution]
Message-Id: <8csohk85ar.fsf@gadget.cscaper.com>

>>>>> "Martin" == Martin Gregory <mgregory@asc.sps.mot.com> writes:

Martin> cberry@cinenet.net (Craig Berry) writes:

>> value created the element.  On reflection, I realized that I was
>> remembering a slightly different case -- that doing
>> 
>> exists $foo{bar}{quux}
>> 
>> creates $foo{bar} if it didn't exist already. 

Martin> I have been bitten by this too.  I wonder why it happens?   Is there
Martin> ever a case where this is a desirable effect?

Yes, it's desirable.  It keeps people from starting to talk about

	$foo{bar}{quux}

and

	$foo{bar}[35]

in the same program, since they cannot both exist.  The
autovivification on $foo{$bar} establishes the necessary ref on the
first access, and we'll get a violation on the second one.

If you really wanna see if $foo{bar} exists, ask that first.
Otherwise, don't worry whether it's being stuffed or not.

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


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

Date: Tue, 22 Sep 1998 15:40:33 GMT
From: ywang@maingate.net
Subject: Hidden field???
Message-Id: <6u8gdh$utc$1@nnrp1.dejanews.com>

Hi,

I use couple Perl scripts to generate couple HTML pages, and require user
login at very first page. How can I prevent them jump into the middle of
chain? I tried to use ""post method to pass userid and password, however, it
only works between very first two pages, i.e. user wont't see them via "view
page source", but for later pages, if I use "hidden" field pass those params,
user can view the source to see the content, which is a security problem
here, and they can just type the content at URL to fool the CGI perl script.

Could anyone please tell me how to do hidden those info from users in my
situation?

Many thanks in advance. Please cc your answer to ywang@maingate.net


Y. Wang

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


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

Date: Tue, 22 Sep 1998 11:14:39 -0500
From: Eric Von Zee <evonzee@tritechnet.com>
Subject: Re: Hidden field???
Message-Id: <3607CCEF.CFCB5312@tritechnet.com>

Howdy,

I've come up against this problem myself, and I've thought of the following
solutions:

1) Write the user's IP address to a file (or make a file called "$userip.ip")
Have the program create/write this file when a valid password is entered, and
delete it after timelimit or on logout button

2) Use a cookie.  There are Perl cookie write/check/unwrite routines out there (I
just forget where..)

3) Go ahead and make a hidden variable and use it with Pragma:no-cache and #1
above (probably most secure of the 3)

If anyone out there has better ideas, I myself would be glad to hear them.

HTH!

Cheers,

Eric



ywang@maingate.net wrote:

> Hi,
>
> I use couple Perl scripts to generate couple HTML pages, and require user
> login at very first page. How can I prevent them jump into the middle of
> chain? I tried to use ""post method to pass userid and password, however, it
> only works between very first two pages, i.e. user wont't see them via "view
> page source", but for later pages, if I use "hidden" field pass those params,
> user can view the source to see the content, which is a security problem
> here, and they can just type the content at URL to fool the CGI perl script.
>
> Could anyone please tell me how to do hidden those info from users in my
> situation?
>
> Many thanks in advance. Please cc your answer to ywang@maingate.net
>
> Y. Wang
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

--
Best Regards,
Tritech Marketing Inc.

Eric Von Zee
Webmaster




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

Date: 22 Sep 1998 16:15:15 GMT
From: Darin McGrew <mcgrew@alumni.stanford.org>
Subject: Re: Hidden field???
Message-Id: <6u8iej$mcn$1@samba.rahul.net>

In article <6u8gdh$utc$1@nnrp1.dejanews.com>,  <ywang@maingate.net> wrote:
> I use couple Perl scripts to generate couple HTML pages, and require user
> login at very first page. How can I prevent them jump into the middle of
> chain?

You wouldn't have this problem if you used HTTP authentication.  The
configuration details vary from server to server, so you'll need to read
the authentication section of your server documentation.

> Many thanks in advance. Please cc your answer to ywang@maingate.net

[posted and emailed]
-- 
Darin McGrew, mcgrew@alumni.stanford.org, http://www.rahul.net/mcgrew/

"The man who never makes mistakes never makes much of anything."
                                                     -- Waite Phillips


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

Date: Tue, 22 Sep 1998 16:42:04 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Hidden field???
Message-Id: <8cww6w85h5.fsf@gadget.cscaper.com>

>>>>> "Eric" == Eric Von Zee <evonzee@tritechnet.com> writes:

Eric> 1) Write the user's IP address to a file (or make a file called
Eric> "$userip.ip") Have the program create/write this file when a
Eric> valid password is entered, and delete it after timelimit or on
Eric> logout button

No.  "user" != "ip address".  Any solution with "IP address" as part
of it is doomed to fail.

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


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

Date: Tue, 22 Sep 1998 11:50:51 -0500
From: Eric Von Zee <evonzee@tritechnet.com>
Subject: Re: Hidden field???
Message-Id: <3607D56A.64971CE1@tritechnet.com>

Okay,

So scratch the IP address thing.

How about if we create a file called "$random_number.user".  Pass the random number as
a hidden (and use no-cache to prevens unscrupulous co-worker from snooping on the back
button).  Then, on log out or time out, delete it.  Would that be more secure?

Cheers,

-Eric

Randal Schwartz wrote:

> >>>>> "Eric" == Eric Von Zee <evonzee@tritechnet.com> writes:
>
> Eric> 1) Write the user's IP address to a file (or make a file called
> Eric> "$userip.ip") Have the program create/write this file when a
> Eric> valid password is entered, and delete it after timelimit or on
> Eric> logout button
>
> No.  "user" != "ip address".  Any solution with "IP address" as part
> of it is doomed to fail.
>
> --
> Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
> Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
> Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
> Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
> Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me

--
Best Regards,
Tritech Marketing Inc.

Eric Von Zee
Webmaster




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

Date: Mon, 21 Sep 1998 08:04:39 -0500
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
Subject: Re: I need a script writen, can someone help me please
Message-Id: <36064EE7.FACDE3CE@houston.Geco-Prakla.slb.com>

Gareth Hall wrote:
> 
> >I take it this is another joke, not as good as Patrick Timmins' earlier
> >post, but funny.
> >
> >What? Its not a joke??
> >
> >Could the author read the "QUESTIONS (was: Perl Programmer Needed)"
> >thread started by Patrick Timmins on 09/09/98 and see how this question
> >_should_ be worded.
> >
> >Most programmers here will _help_ you write scripts, but don't expect
> >them to do all the work for you.
> >
> >
> 
> Not a joke, just a simple question. Obviously this newsgroup takes
> itself far to seriously.

Evidently, good poster, you do not take this newsgroup seriously enough.

This is not a for-free enterprise set up to meet your whims and desires.

The individuals who post to this newsgroup are people who are *more*
than willing to *help* someone who is having trouble with a script, or
any other area of perl.  (Did you read the above response before posting
your comment?)

Those same individuals do not take kindly to the attitude of 'gimme',
even if it is asked politely.  If money is to change hands, most of them
would be happy to do the work for you, but it is work you are asking
them to do.  Why do you expect them to freely give you what you asked
for?  *confusion*  Do you do work freely for others just because they
asked you to?  Maybe you do.  Not the point.

Now, if you'd like to post some code showing where you're having
trouble, I'm sure some kind soul would be willing to help you clear up
any problems you are having.

If you cannot, or don't have any idea of how to code in Perl, an offer
of a reasonable amount of money to do the work will also probably be met
with interested individuals.

Either way, 'gimme' doesn't go over well around here.  Is that clearer
now?

HTH.  HAND.

Cheers,
Dave

-- 
Dave Barnett	Software Support Engineer


If one synchronized swimmer drowns, do the rest have to drown too?


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

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

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