[17347] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4769 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 31 00:05:32 2000

Date: Mon, 30 Oct 2000 21:05:13 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <972968713-v9-i4769@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 30 Oct 2000     Volume: 9 Number: 4769

Today's topics:
        "chown" of symlink instead of linked file (Otto Wyss)
    Re: "chown" of symlink instead of linked file (Tom Christiansen)
    Re: Array of Associative Arrays? <kevin@vailstar.com>
    Re: Array of Associative Arrays? <fromhold@ics.uci.edu>
    Re: Array of Associative Arrays? (Colin Watson)
    Re: Array of Associative Arrays? (Gwyn Judd)
    Re: CGI Perl vs. Java Servlets... <ryanb@one.net>
    Re: CGI Perl vs. Java Servlets... <joe+usenet@sunstarsys.com>
    Re: CGI Perl vs. Java Servlets... (Gwyn Judd)
    Re: CGI Perl vs. Java Servlets... (Randal L. Schwartz)
    Re: CGI Scripting Errors 'Help' <ryanc@nci1.net>
    Re: code counter v1 released :-) (Randal L. Schwartz)
    Re: Comparing two files (Gwyn Judd)
    Re: Comparing two files (Martien Verbruggen)
    Re: Comparing two files (Tom Christiansen)
    Re: Comparing two files (Martien Verbruggen)
        Compiling Perl-5.6.0 on OPENSTEP-Mach 4.2 <andang@nmt.edu>
        Crypt::SSLeay installation problems (Jeff Haferman)
    Re: Help Read File <elephant@squirrelgroup.com>
    Re: MSSQL connection <elephant@squirrelgroup.com>
        Newbie question about hashes <cak@putzl.com>
    Re: NT Web Server and Perl Interpreter Problems <elephant@squirrelgroup.com>
        OT: Re: Is there a more perlish way to write this? (Tim Hammerquist)
        Session or Sessionless? (Ameen Dausha)
    Re: Session or Sessionless? (Martien Verbruggen)
    Re: solaris vs linux perl and hash/dbm files <bwalton@rochester.rr.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 31 Oct 2000 03:55:37 +0100
From: otto.wyss@bluewin.ch (Otto Wyss)
Subject: "chown" of symlink instead of linked file
Message-Id: <1ejckhw.xd2wo61u8nyy0N%otto.wyss@bluewin.ch>

If I use "chown" specifying a symlink the owner of the linked file is
changed. Is there a switch or an option I could use, so  that the owner
of the symlink itself is changed? Or is there anything so the owner of
both the symlink and the linked file is changed?

How about if the symlink points to a symlink points to ... a file?

O. Wyss


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

Date: 30 Oct 2000 20:03:51 -0700
From: tchrist@perl.com (Tom Christiansen)
Subject: Re: "chown" of symlink instead of linked file
Message-Id: <39fe3697@cs.colorado.edu>

In article <1ejckhw.xd2wo61u8nyy0N%otto.wyss@bluewin.ch>,
Otto Wyss <otto.wyss@bluewin.ch> wrote:
>If I use "chown" specifying a symlink the owner of the linked file is
>changed. Is there a switch or an option I could use, so  that the owner
>of the symlink itself is changed? Or is there anything so the owner of
>both the symlink and the linked file is changed?
>
>How about if the symlink points to a symlink points to ... a file?

What does the chown(2) manpage say?

--tom


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

Date: Mon, 30 Oct 2000 21:20:04 -0500
From: Kevin Michael Vail <kevin@vailstar.com>
Subject: Re: Array of Associative Arrays?
Message-Id: <kevin-8DFF6C.21200430102000@news.his.com>

In article <39FE23EF.E8F32D8@ics.uci.edu>, RFT <fromhold@ics.uci.edu> 
wrote:

> Is it possible to read individual elements from an array of associative
> arrays?

Yes.

> I create my array of arrays as follows:
> 
> $DataMatrix[$reccount] = [%TokenArray];

Actually you want

    $DataMatrix[$reccount] = {%TokenArray};

i.e., curly braces rather than square, to create a reference to a hash 
rather than a reference to an array.

> where %TokenArray contains different values in each key for different
> records.
> 
> I'm trying to access a single element of @DataMatrix via
> 
> $DataMatrix[$reccount]{"$token"}

Then here you want

    $DataMatrix[$reccount]->{$token}

The double quotes are unnecessary around $token.

> where $token contains the key for %TokenArray. Unfortunately, this is
> not working. Does anyone have any idea on how to access the value for an
> individual key directly from @DataMatrix?

You were almost there.

(By the way, they've been called "hashes" rather than "associative 
arrays" for quite some time now...faster to say and easier to type.)
-- 
Kevin Michael Vail | a billion stars go spinning through the night,
kevin@vailstar.com | blazing high above your head.
 . . . . . . . . .  | But _in_ you is the presence that
 . . . . . . . . . | will be, when all the stars are dead.  (Rainer Maria Rilke)


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

Date: Mon, 30 Oct 2000 18:30:20 -0800
From: RFT <fromhold@ics.uci.edu>
Subject: Re: Array of Associative Arrays?
Message-Id: <39FE2EBC.1EE601C2@ics.uci.edu>

>
>
> (By the way, they've been called "hashes" rather than "associative
> arrays" for quite some time now...faster to say and easier to type.)

Thanks for your help - and I probably need to get a more recent version of
"Programming Perl" than the '91 edition. :)



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

Date: 31 Oct 2000 02:14:16 GMT
From: cjw44@flatline.org.uk (Colin Watson)
Subject: Re: Array of Associative Arrays?
Message-Id: <8tl9to$kb0$1@riva.ucam.org>

RFT <fromhold@ics.uci.edu> wrote:
>Is it possible to read individual elements from an array of associative
>arrays?

They're usually called "hashes" in Perl 5. Maybe thinking of them as a
kind of array is confusing you into using array syntax.

>I create my array of arrays as follows:
>
>$DataMatrix[$reccount] = [%TokenArray];

[%TokenArray] constructs an anonymous array containing alternating keys
and values from that hash, and gives you a reference to that array. This
probably isn't what you want. Take a reference to the hash directly
instead, by using \%TokenArray.

>I'm trying to access a single element of @DataMatrix via
>
>$DataMatrix[$reccount]{"$token"}

That's right, although you don't need the double quotes around $token
there. If it needs to be a string, it will be a string.

Cheers,

-- 
Colin Watson                                     [cjw44@flatline.org.uk]
"What a hairstyle, what a finish!" - Sydney Olympics boxing commentator


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

Date: Tue, 31 Oct 2000 02:57:29 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Array of Associative Arrays?
Message-Id: <slrn8vsd8n.p9p.tjla@thislove.dyndns.org>

I was shocked! How could RFT <fromhold@ics.uci.edu>
say such a terrible thing:
>Is it possible to read individual elements from an array of associative
>arrays?

It's a "hash" not an "Associative Array". If you have a book that calls
it by the longer name then throw it away.

>I create my array of arrays as follows:
>
>$DataMatrix[$reccount] = [%TokenArray];

the square brackets in this context create an array reference to an
array containing the key/value pairs of %TokenArray. You can't use this
as a hash. What I think you want to do is store a reference to a hash.
You can do this is at least two ways:

1)

$DataMatrix[$reccount] = {%TokenArray};

2)

$DataMatrix[$reccount] = \%TokenArray;

The second is probably better because it doesn't flatten the key/values
out into a list before making the reference, as the first does (I
think).

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Recursion is the root of computation since it trades description for time.


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

Date: Mon, 30 Oct 2000 21:28:20 -0500
From: "Ryan Bedford" <ryanb@one.net>
Subject: Re: CGI Perl vs. Java Servlets...
Message-Id: <39fe2f0a_1@news2.one.net>

I know both.  I ment in terms of processing http requests and sending a
response back to the user.
"Joe Schaefer" <joe+usenet@sunstarsys.com> wrote in message
news:m3g0ld7p2n.fsf@mumonkan.sunstarsys.com...
> "Ryan Bedford" <ryanb@one.net> writes:
>
> > All things being equal which is faster?  CGI Perl or Java Servlets?
>
> That depends on which of the two languages you already know :)
>
> --
> Joe Schaefer




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

Date: 30 Oct 2000 21:34:44 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: CGI Perl vs. Java Servlets...
Message-Id: <m366m97n7f.fsf@mumonkan.sunstarsys.com>

"Ryan Bedford" <ryanb@one.net> writes:

> I know both.  I ment in terms of processing http requests and sending a
> response back to the user.

Which language did you decide on when you wrote your own web server?

-- 
Joe Schaefer


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

Date: Tue, 31 Oct 2000 02:58:29 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: CGI Perl vs. Java Servlets...
Message-Id: <slrn8vsdak.p9p.tjla@thislove.dyndns.org>

I was shocked! How could Ryan Bedford <ryanb@one.net>
say such a terrible thing:
>All things being equal which is faster? CGI Perl or Java Servlets?

If all things are truly equal, then neither is faster.

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
"I can help you with the big words if you're having trouble."
	-- Matthew Stoner (to Garibaldi), "Soul Mates"


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

Date: 30 Oct 2000 20:47:32 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: CGI Perl vs. Java Servlets...
Message-Id: <m166m962hn.fsf@halfdome.holdit.com>

>>>>> "Ryan" == Ryan Bedford <ryanb@one.net> writes:

Ryan> All things being equal which is faster?  CGI Perl or Java Servlets?

You just said they were equal!  Unless "CGI Perl" and "Java Servlets"
are not part of "All things".

Sorta like that old phrase, "Presume a perfectly spherical cow..."

Why not come up with a question which really makes sense, and could
empower you, instead of being nonsense?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Mon, 30 Oct 2000 21:38:42 -0500
From: "Ryan & Treena Carrier" <ryanc@nci1.net>
Subject: Re: CGI Scripting Errors 'Help'
Message-Id: <39fe3022_1@news.cybertours.com>


"Jon Ericson" <Jonathan.L.Ericson@jpl.nasa.gov> wrote in message
news:39FE24DA.49FC10EC@jpl.nasa.gov...
> fallenang3l@my-deja.com wrote:
> >
> > What does -wT switch do?
>
Easier to just answer the question:

-w is a switch checking for possible programmatical errors.
the -T is for Taint mode. You'll have to do some reading for this one.




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

Date: 30 Oct 2000 20:45:20 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: code counter v1 released :-)
Message-Id: <m1d7gh62lb.fsf@halfdome.holdit.com>

>>>>> "CDM" == CDM  <cdemaeyer1@mmm.com> writes:

CDM> comp.lang.perl.announce is the group to use

Not really.  That's for announcements of source code.  Not announcements
*made* of source code. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Tue, 31 Oct 2000 02:29:55 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Comparing two files
Message-Id: <slrn8vsbl1.p9p.tjla@thislove.dyndns.org>

I was shocked! How could Martien Verbruggen <mgjv@tradingpost.com.au>
say such a terrible thing:
>that don't mention the perldoc tool anymore. maybe I'll just write a
>little piece of text that I can include at the bottom of such messages
>that explains what the current ways of reading documentation are.

Isn't that in the weekly-posted 'How to find the perl FAQ' (I forget the
exact title) post? If not, wouldn't it be a good idea to add that in
with details of how the documentation works on each platform, rather
than have each person answering questions say virtually the same thing?
Easier just to say 'read the perlfunc documentation' and assume the
person knows how to find it from the FAQ.

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
I'm not under the alkafluence of inkahol
that some thinkle peep I am.
It's just the drunker I sit here the longer I get.


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

Date: Tue, 31 Oct 2000 02:51:26 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Comparing two files
Message-Id: <slrn8vsctd.ksa.mgjv@verbruggen.comdyn.com.au>

On Tue, 31 Oct 2000 02:29:55 GMT,
	Gwyn Judd <tjla@guvfybir.qlaqaf.bet> wrote:
> I was shocked! How could Martien Verbruggen <mgjv@tradingpost.com.au>
> say such a terrible thing:
> >that don't mention the perldoc tool anymore. maybe I'll just write a
> >little piece of text that I can include at the bottom of such messages
> >that explains what the current ways of reading documentation are.
> 
> Isn't that in the weekly-posted 'How to find the perl FAQ' (I forget the
> exact title) post? If not, wouldn't it be a good idea to add that in

Yeah, but which person that needs the extra hint on how to find the
documentation would read that weekly posted FAQ? :)

> with details of how the documentation works on each platform, rather
> than have each person answering questions say virtually the same thing?
> Easier just to say 'read the perlfunc documentation' and assume the
> person knows how to find it from the FAQ.

Unfortunately, experience dictates that you can't assume that. The
only thing that happens when you assume that, is that you get back a
followup asking 'how do I do that', or a flame about how fscking
unhelpful that response was.

Been there, got the T-shirt.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Unix is the answer, but only if you
Commercial Dynamics Pty. Ltd.   | phrase the question very carefully
NSW, Australia                  | 


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

Date: 30 Oct 2000 20:01:14 -0700
From: tchrist@perl.com (Tom Christiansen)
Subject: Re: Comparing two files
Message-Id: <39fe35fa@cs.colorado.edu>

In article <slrn8vs2ha.ksa.mgjv@verbruggen.comdyn.com.au>,
Martien Verbruggen <mgjv@tradingpost.com.au> wrote:
>However, it is still the most
>cross-platform documentation viewing tool available. 

It is not a tool.  It is a disability.  If they knew where the docs
were, and how to search them, it would be much better.  Can you
believe that there are people pretending to try to use perl who
cannot actually search a file?  It's incredible.  Giving them
brain-dead crutches that obviates any smidged of learning on their
part interferes with Darwinian selection of the fittest.  

This is bad.

>> It's part of our culture and lingo.  You merely them to consult the
>> perlsec manpage, or perlsec(1), or the chroot manpage, or chroot(2).
>> And you give them things like this.  The Camel glossary reads:
>
>I think that this is more the point of your current posts, correct?  I
>seem to read that you object to the word perldoc being used as a
>synonym for 'have a look at this documentation'. 

I read the word as a bit of profanity, a constant reminder of 
both the disgusting piece of crap that is the old program, and
also of infinite incompetence of the general public.

>If that's the case, I agree. I'd rather see people, including me,
>say things like 'see the entry on open() in the perlfunc
>documentation'. 

It's faster to say in the perlfunc manpage, and even faster to say
perlfunc(1).  And if they don't know what that means, then they'll
learn.  If they can't learn, then you can't help them.  And if they
won't learn, they don't deserve help.

"perldoc" is winbaby talk.  It was a pathetically sad day when we
saw exchange its traditional cultural lingo for mealy-mouthed,
politically-correct, Microsoft-coddling blather for idiots who can't
even search a text file--and, in so doing, raise its middle finger
to its rich and honorable heritage in Unix and all that that entails.
It's the Cliff Notes of Unix.  If one doesn't like that, there's
always BASIC.

--tom


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

Date: Tue, 31 Oct 2000 03:24:52 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Comparing two files
Message-Id: <slrn8vses3.ksa.mgjv@verbruggen.comdyn.com.au>

On 30 Oct 2000 20:01:14 -0700,
	Tom Christiansen <tchrist@perl.com> wrote:
> 
> "perldoc" is winbaby talk.  It was a pathetically sad day when we
> saw exchange its traditional cultural lingo for mealy-mouthed,
> politically-correct, Microsoft-coddling blather for idiots who can't
> even search a text file--and, in so doing, raise its middle finger
> to its rich and honorable heritage in Unix and all that that entails.
> It's the Cliff Notes of Unix.  If one doesn't like that, there's
> always BASIC.

Very eloquent, and with a core of truth, even though the language is
stronger than I would have used, personally. It does make one think.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Begin at the beginning and go on till
Commercial Dynamics Pty. Ltd.   | you come to the end; then stop.
NSW, Australia                  | 


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

Date: Mon, 30 Oct 2000 20:21:19 -0700
From: Reinardus Andang Kustamsi <andang@nmt.edu>
Subject: Compiling Perl-5.6.0 on OPENSTEP-Mach 4.2
Message-Id: <Pine.GSO.4.21.0010302019300.16463-100000@rainbow>

Has someone in this newsgroup successfully compiled the stable Perl source
on NeXT with OS 4.2?

Thanks.

  --Andang



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

Date: 31 Oct 2000 03:53:55 GMT
From: haferman@server2.digital-web.net (Jeff Haferman)
Subject: Crypt::SSLeay installation problems
Message-Id: <slrn8vsgin.301g.haferman@server2.digital-web.net>


I'm trying to install Crypt::SSLeay into my home directory on
a FreeBSD 4.0 machine.

My guess is that my installation problems stem from the fact
that I am installing into /home/me, so for example openssl
is installed in /home/me/openssl rather than /usr/local/openssl.

I did install openssl 0.9.6 fine, everything seemed to go okay
and "make test" ran fine.

But, with Crypt-SSLeay-0.17, I have problems.  I did modify
Makefile.PL by adding /usr/local/openssl to the POSSIBLE_SSL_DIRS
variable.  The make runs fine, but 'make test' gives

PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/libdata/perl/5.00503/mach -I/usr/libdata/perl/5.00503 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/ssl_context.......Can't load 'blib/arch/auto/Crypt/SSLeay/SSLeay.so' for module Crypt::SSLeay: blib/arch/auto/Crypt/SSLeay/SSLeay.so: Undefined symbol "SSL_set_fd" at /usr/libdata/perl/5.00503/DynaLoader.pm line 169.

 at blib/lib/Crypt/SSLeay/CTX.pm line 2
 BEGIN failed--compilation aborted at t/ssl_context.t line 3.
 dubious
         Test returned status 255 (wstat 65280, 0xff00)
         FAILED--1 test script could be run, alas--no output ever seen
         *** Error code 2

Help, please?

THanks,
Jeff




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

Date: Tue, 31 Oct 2000 14:26:56 +1100
From: jason <elephant@squirrelgroup.com>
Subject: Re: Help Read File
Message-Id: <MPG.1468e70761a7bee98986d@localhost>

Howard Chen wrote ..
>Okay, sorry i forgot to post my source code.

this is the first post I'm seeing from you in this thread - in future 
you might try following up whatever you're trying to make a comment on

>  if ( !open ( FP_IN_HTML, '<'.$FILENAME)  {
>    $html_param{send_type} = 0;
>    $html_param{message} = '<h1>ERROR</h1>';
>    &SendFile();
>    exit(-1);
>  }
>
>and the thing is I had it working in Apache using Active Perl, but it gives
>me error when I port the same code onto IIS, where the same version of
>Active Perl is used.
>
>Can somebody help me with that?

you have a syntax error on the first line .. you have two open parens 
but only one close...

or .. did you fail to copy-and-paste the problematic code directly from 
the source file ? .. please avoid that .. whenever you post you must 
show the EXACT code that you're using (the shortest example possible) 
otherwise you waste other people's time in troubleshooting problems that 
you don't actually have

assuming that the syntax in your real program is correct - you most 
likely have a problem with this open .. you've probably seen this style 
of open check over and over as you've been reading various Perl 
documentation

  open( FILEHANDLE, '<filename') || die "Open failed: $!";

it's not just for fun .. you might want to try outputting that $! 
variable yourself

it will usually give you good clues as to where your problem is

in a CGI environment you might want to put this statement at the top of 
your program as well

  use CGI::Carp 'fatalsToBrowser';

which will send the output of that 'die' to the browser instead of 
burying it in the IIS error log

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Tue, 31 Oct 2000 14:33:49 +1100
From: jason <elephant@squirrelgroup.com>
Subject: Re: MSSQL connection
Message-Id: <MPG.1468e8aac27c5aa298986e@localhost>

wapache@my-deja.com wrote ..
>I am trying to connect to the MS SQL server (7.0) on my window
>2000 by running the cgi on the command line. But I got this
>message:
>dbiquery.cgi: DBI->connect(MSSQL:test:localhost) failed:
>[Microsoft][ODBC Driver Manager] Data source name not found
>and no default driver specified

seems pretty clear to me .. you haven't set up the data source name that 
you've specified and there's no default driver specified

did you look at the documentation for DBD::ODBC ? .. because your 
connection string is completely unlike the example given in the synopsis

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Mon, 30 Oct 2000 19:42:58 -0800
From: Chris Kantarjiev <cak@putzl.com>
Subject: Newbie question about hashes
Message-Id: <39FE3FC2.52F170A2@putzl.com>

I'm trying to use hashes to keep track of session keys across multiple
socket connections (among other things). Even though I think I'm
creating several entries in the hash, the only key that's defined at the
end is the last one I put in.

I'm pretty sure this has something to do with the way that I'm assigning
into the hash, in particular that I'm using a local variable as the key,
but I don't understand what the right way to do this is...

Sample code (as curt as I could make it):

use IO::Socket;

$DTAP_CTL_PORT_TCP = 8000;

sub doStartup($) {
    my $id = $_[0];
    print "connecting to $DTAP_host as USER", sprintf("%04d\n",$id);

    $s = IO::Socket::INET->new(PeerAddr => $DTAP_host,
			       PeerPort => $DTAP_CTL_PORT_TCP,
			       Proto	 => "tcp",
			       Type	 => SOCK_STREAM)
	or die "Couldn't connect to $DTAP_host:$DTAP_CTL_PORT_TCP : $@\n";
    $s->autoflush(1);

    print "socket $s \n";

    %sessionKey = ($s, 0);

    # much code elided...

    if ($sessionKey{$s} == 0) {
	$sessionKey{$s} = $id;
    }
    return ($s, 0);
}

#
#--------------------------
#
($DTAP_host, $baseID, $nUsers) = @ARGV;

for (my $i = 0; $i < $nUsers; $i++) {
    my $id = $baseID + $i;
    ($sockets{$id}, $umids{$id}) = doStartup($id);
}

print "\n session keys \n";

foreach $s (%sessionKey) {
    print "$s \n";
}


and the output:

C:\src\sandbox\DTAP testing>perl -w  test2.pl ussdtap 0 2
Name "main::sockets" used only once: possible typo at test2.pl line 37.
Name "main::umids" used only once: possible typo at test2.pl line 37.
Name "main::serverSequenceNo" used only once: possible typo at test2.pl
line 20.

Name "main::clientSequenceNo" used only once: possible typo at test2.pl
line 19.

connecting to ussdtap as USER0000
socket IO::Socket::INET=GLOB(0x1a752d8)
connecting to ussdtap as USER0001
socket IO::Socket::INET=GLOB(0x1a72a28)

 session keys
IO::Socket::INET=GLOB(0x1a72a28)
1


Thanks,
chris


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

Date: Tue, 31 Oct 2000 13:13:10 +1100
From: jason <elephant@squirrelgroup.com>
Subject: Re: NT Web Server and Perl Interpreter Problems
Message-Id: <MPG.1468d5c6808ba74898986b@localhost>

David Heley wrote ..
-
>PERL SCRIPT TEST RESULTS
>
>Key Factors
>
>WEB Browsers type IE5 and versions 5.0, 5.01, 5.5
>WEB Server type and version - IIS 4
>Perl Type and version - build 618, based on Perl 5.6.0.     Active Perl
>
>Observations when testing  samples
>
>1.  When running IE5  v 5.01 on Web server all the Perl samples seem to run
>fine.
>
>2.  When running IE5  v 5.5 on my NT workstation to the Web server none of
>the samples work properly.
>
>3.  When running IE5  v 5.0 on another NT workstation to the Web server none
>of the samples work properly.
>
>4.  When running IE5  v 5.5 on the Web server all except the Mouse Move,
>Perl samples seem to run fine.

you seem to be talking about client-side PerlScript .. you seem not to 
be aware that IE does NOT come with support for this scripting engine 
from Microsoft .. and in fact - only by installing ActivePerl will you 
have support for client-side scripting in your IE browser

however .. none of this has anything to do with the web server - or with 
CGI or running Perl programs via CGI under IIS

keep reading the documentation included with ActivePerl .. specifically 
take a look at the sections entitled "Web Server Config" and "Web 
programming"

>These results suggest to me a number of things.
>
>1. An issue with security or pathing for remote client web browsers may
>possibly exist.

there is ZERO relationship between client-side PerlScript (which is 
what's being used for the PerlScript Examples; 'Hello', 'Calculator', 
'Greetings' and 'Mouse Tracking') and web server or paths on that web 
server to the Perl interpreter

you need to install ActivePerl on EVERY machine that you want to use 
PerlScript on

PerlScript does not equal Perl

>2. The web browsers own ability to interperate Perl may vary.

the PerlScript engine that's installed with ActivePerl was written for 
pre-5.5 versions of IE .. therefore there is not complete support for 
all features

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Tue, 31 Oct 2000 04:50:45 GMT
From: tim@degree.ath.cx (Tim Hammerquist)
Subject: OT: Re: Is there a more perlish way to write this?
Message-Id: <slrn8vskrb.1a0.tim@degree.ath.cx>

Shimon Bollinger <bollinge@wholefamily.com> wrote:
> I need to test if a variable has a value in a particular range:
> 
>     if ($n >= 30 && $n < 40) {
>         # ...
>     }
> 
> This code is 1) clear and 2) works.  But it looks very C/C++ to me.  Is
> there a more perlish way to write this test?

That's how I would do it in Perl.  However, elsewhere in this thread was
posted the Perl 6 proposition:

	if (30 <= $n < 40) {...}

I can't resist... Python already does this:

	if 30 <= n < 40:
		...

A question to anyone developing/proposing this in Perl 6: If this syntax
were implemented in Perl6, would $n be evaluated once or twice?  Once
would make more sense to me, and would allow more ways to do it.

-- 
-Tim Hammerquist <timmy@cpan.org>
To steal ideas from one person is plagiarism;
to steal from many is research.
	-- Unknown


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

Date: Tue, 31 Oct 2000 03:51:36 GMT
From: ameen @ dausha . net (Ameen Dausha)
Subject: Session or Sessionless?
Message-Id: <39fe40af.183028068@news>

I work in a shop that has two different groups of developers. The
first group are we Perl developers, and the other group comprises Java
developers hamstrung by a rapid development tool. While it takes them
months longer to develop the same basic type of application it would
some of we Perl developers, 

Knowing that Java is a system langauge and Perl a glue language, I
still have a question that I have not yet found a clear answer. Is
Perl capable of sessions in a browser interface? If so, how?

This seems to be the biggest issue with the shop's two factions.

Thanks in advance.


Ben Wilson (a.k.a. Ameen, Last of the Dausha)
____________________________
-"Ever heard of Aristotle . . . Plato . . . Socrates?!"
-"Yes."
-"Morons!"


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

Date: Tue, 31 Oct 2000 04:30:00 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Session or Sessionless?
Message-Id: <slrn8vsim8.ksa.mgjv@verbruggen.comdyn.com.au>

On Tue, 31 Oct 2000 03:51:36 GMT,
	Ameen Dausha <ameen@dausha.net> wrote:
> I work in a shop that has two different groups of developers. The
> first group are we Perl developers, and the other group comprises Java
> developers hamstrung by a rapid development tool. While it takes them
> months longer to develop the same basic type of application it would
> some of we Perl developers, 
> 
> Knowing that Java is a system langauge and Perl a glue language, I
> still have a question that I have not yet found a clear answer. Is
> Perl capable of sessions in a browser interface? If so, how?

errr... that depends a bit. What do you mean by 'session'? If you mean
what I think you mean then it has nothing to do with any language, but
with the code (or libraries) you use.

The CGI module contains stuff for sessions.
I'm sure the Apache modules will have session things.

java itself doesn't do any session stuff for browsers, AFAIK. There
may be some libraries, and there are certainly some good engines that
do this for Java, but again,it has nothing to do with the languages. 

> This seems to be the biggest issue with the shop's two factions.

Maybe the two factions should stop warring, and just concentrate on
using the right tools for the right tasks. There are many things at
which Perl is much better than Java. There are things at which Java is
better than Perl. There are things for which Perl has better
libraries/modules available. There are things for which Java has
better libraries/classes available. 

I pity the shop that locks itself into using one language. They will
forever need to work around the problems with that language. And every
language has some.

If you want to ask a programmer a question that will show you his or
her knowledge of the language, ask them what they *don't* like about
it. Not what they do like about it.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | If at first you don't succeed, try
Commercial Dynamics Pty. Ltd.   | again. Then quit; there's no use
NSW, Australia                  | being a damn fool about it.


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

Date: Tue, 31 Oct 2000 03:31:38 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: solaris vs linux perl and hash/dbm files
Message-Id: <39FE3D00.B3894A5F@rochester.rr.com>

Henry F Turner wrote:
> 
> I have perl, version 5.005_03, on both solaris and linux systems.
> I would like to be able to run a perl application on the linux systems
> which accesses existing dbm files, but have been unable to get the
> perl on the linux systems to do so. In particular, the following code:
> -----------------------------------------------------
> #!/usr/bin/perl -w
> 
> use NDBM_File;
> use Fcntl;
> 
> #dbmopen(%TST_DBM, 'DBM_TST', 0644);
> tie(%TST_DBM, 'NDBM_File', 'DBM_TST', O_RDWR|O_CREAT, 0644);
> $TST_DBM{"foo"}="bar";
> #dbmclose(%TST_DBM);
> untie(%TST_DBM);
> -----------------------------------------------------
> does not work the same. On solaris it produces two files (.dir & .pag),
> and on linux, only one, DBM_TST.db.  The linux perl seems to be
> ignoring the NDBM_File part, with dbmopen or with tie. If anybody can
> tell me what I am missing I would be much obliged.
 ...
>  hft@super.org
You will find that DBM-type files are seldom binary-compatible between
different operating systems.  That isn't Perl's fault, but rather that
of the methods used by the underlying DBM-style implementations used by
the various OS's.  And depending upon the defaults chosen when the
particular DBM-type install was originally performed, it may not even be
compatible with other installations using the same version of the same
OS and DBM-type!  Things like bucket size can be changed to give better
performance for particular data, for example.  You can use Data::Dumper
or equivalent to convert a DBM file to a portable ASCII file, and then
recreate the DBM-type tied hash on the other system.  Those should be
quickie little programs (but depending on the size of your files, they
might take a while to run -- if they're huge, you could use sockets and
never actually create the intermediate ASCII file).
-- 
Bob Walton


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>


Administrivia:

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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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 V9 Issue 4769
**************************************


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