[13429] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 839 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Sep 18 05:07:18 1999

Date: Sat, 18 Sep 1999 02:05:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <937645512-v9-i839@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sat, 18 Sep 1999     Volume: 9 Number: 839

Today's topics:
        An Array of Collumns <meridamx@enol.com>
        An Array of Collumns <meridamx@enol.com>
    Re: Be careful about using constants (Larry Rosler)
    Re: Can Perl interface a compiled C program and a web s (d.k. henderson)
    Re: Case insensitive SQL query (Mark W. Schumann)
    Re: CGI in PERL <jmorneo@my-deja.com>
    Re: Error in "Learning Perl, 2nd Edition" or Error in P <jgrot@spam.off.tso.cin.ix.net>
    Re: Error in "Learning Perl, 2nd Edition" or Error in P <jgrot@spam.off.tso.cin.ix.net>
    Re: Help on Perl/Cgi script (d.k. henderson)
    Re: how to create temporary cookie and destroy it (Michael Budash)
    Re: Link CGI to microsoft Access <andriani@singnet.com.sg>
    Re: List files in a dir <ltl@rgsun40.viasystems.com>
    Re: make in Windows 98 <rpsavage@ozemail.com.au>
    Re: make in Windows 98 (elephant)
        Perl 5.005_03, BerkeleyDB 2.7.7, BerkeleyDB-0.06, and S <trevor@ndl.net>
        perl return value to a perl script <bchung@ci.south-el-monte.ca.us>
    Re: perl return value to a perl script (elephant)
    Re: PERL/HTML Interaction problems with <ACTION... comm <mnations@airmail.net>
        PerlScript in ASP under Win98 <davidra@nowonder.com>
        PL extension <micheljacob@multimania.com>
    Re: PL extension (elephant)
    Re: Problem with open() and probably something else (Eric Bohlman)
    Re: regexp odity with (?s-x:) <ltl@rgsun40.viasystems.com>
    Re: regexp odity with (?s-x:) (Ilya Zakharevich)
    Re: Sorting on a string, by value. (Larry Rosler)
    Re: Telnet scripting in Perl? <whilbone@algonet.se>
    Re: Telnet scripting in Perl? <whilbone@algonet.se>
    Re: win32 disk formatting (Philip 'Yes, that's my address' Newton)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sat, 18 Sep 1999 01:23:16 -0600
From: "Chuck Burgess" <meridamx@enol.com>
Subject: An Array of Collumns
Message-Id: <7rvf1s$9ck$1@news.inquo.net>

I am having difficulty figuring out how to pass collumnar data from a file
to an array.

Example:
FILE STREAM:
12345
12345
12345
12345

All of collumn 1 is considered the same answer, all of collumn 2... etc.
I use the following to read the data and set up the @testans array by
collumn.
open (dfile, "data.dat");
for ($rows = 0; $rows <= 3; $rows++)
   for ($cols = 0; $cols <=4; $cols++)

     read(dfile, $string, 1, 0);
     $testans{$cols} .= $string;
      if ($rows != '3') {
         $testans{$cols} .= ',';
      }
   }
}
I'm concantenating the next item in the collumn to the previous but I know
I'm not doing it right.  I don't think this is actually creating an array. I
need the outcome to be the following:
@testans[1] = (1,1,1,1)
@testans[2] = (2,2,2,2)
etc.

Any suggestions other than switching to a DB?




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

Date: Sat, 18 Sep 1999 01:23:16 -0600
From: "Chuck Burgess" <meridamx@enol.com>
Subject: An Array of Collumns
Message-Id: <7rvfcn$9cm$1@news.inquo.net>

I am having difficulty figuring out how to pass collumnar data from a file
to an array.

Example:
FILE STREAM:
12345
12345
12345
12345

All of collumn 1 is considered the same answer, all of collumn 2... etc.
I use the following to read the data and set up the @testans array by
collumn.
open (dfile, "data.dat");
for ($rows = 0; $rows <= 3; $rows++)
   for ($cols = 0; $cols <=4; $cols++)

     read(dfile, $string, 1, 0);
     $testans{$cols} .= $string;
      if ($rows != '3') {
         $testans{$cols} .= ',';
      }
   }
}
I'm concantenating the next item in the collumn to the previous but I know
I'm not doing it right.  I don't think this is actually creating an array. I
need the outcome to be the following:
@testans[1] = (1,1,1,1)
@testans[2] = (2,2,2,2)
etc.

Any suggestions other than switching to a DB?




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

Date: Sat, 18 Sep 1999 00:12:53 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Be careful about using constants
Message-Id: <MPG.124cdb408353b567989f99@nntp.hpl.hp.com>

In article <7rv1jh$bnr@netnews.hinet.net> on Sat, 18 Sep 1999 11:43:20 
+0800, John Lin <johnlin@chttl.com.tw> says...
> Dear all,
> 
>     Perl constants don't seem to be so natural.  In this program
> 
> use strict;
> use Fcntl ':flock';
> 
> print LOCK_EX,"\n";    # 2
> print LOCK_NB,"\n";    # 4
> print LOCK_EX+LOCK_NB,"\n";    # 2, and missing "\n"
> print (LOCK_EX+LOCK_NB),"\n";    # 2, and missing "\n"
> print LOCK_EX|LOCK_NB,"\n";    # 6
> print (LOCK_EX)+(LOCK_NB),"\n";    # 6
> 
> if you are not careful enough you can easily make an invisible bug
> because -w won't warn you.

print (...) interpreted as function at e:/test/try.txt line 8.
print (...) interpreted as function at e:/test/try.txt line 10.
Useless use of a constant in void context at e:/test/try.txt line 8.
Useless use of addition in void context at e:/test/try.txt line 10.
Useless use of a constant in void context at e:/test/try.txt line 10.
2
4
226
2


This is perl, version 5.005_03 built for MSWin32-x86-object
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-1999, Larry Wall

Binary build 519 provided by ActiveState Tool Corp. 
http://www.ActiveState.com
Built 09:50:30 Aug 12 1999


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


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

Date: Sat, 18 Sep 1999 07:43:00 GMT
From: dalekh@hotmail.com (d.k. henderson)
Subject: Re: Can Perl interface a compiled C program and a web site in HTML?
Message-Id: <8E4525EB2dkhenderson@207.14.236.74>

 >I have a large C program I'd like to connect to a web site for users to
>execute. I don't know how to start. Can I use Perl?

Here is an C CGI library that can be used with any compiler:
http://www.geocities.com/SiliconValley/Vista/6493/projects/cgi-lib.html


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

Date: 18 Sep 1999 02:36:45 -0400
From: catfood@apk.net (Mark W. Schumann)
Subject: Re: Case insensitive SQL query
Message-Id: <7rvbtt$m25@junior.apk.net>

In article <37E2E094.DF9BFD72@mail.cor.epa.gov>,
David Cassell  <cassell@mail.cor.epa.gov> wrote:
>mrbog@my-deja.com wrote:
>[snip of blather]
>> > >YES, I DO, because there are 2400 people to answer them.
>> >
>> > More like a couple dozen.  And they're here to help answer questions
>> > about Perl.  Why make busy-work for them?  They're doing a nice thing
>> > for us.  It's only fair to avoid making extra demands.
>> 
>> couple dozen?! Try a couple thousand.  The more people posting
>> questions, the more people there are to answer them.
>
>Hardly.  If you knew enough Perl you would notice that many of
>the people who only drop in to ask one question and stick around 
>to answer one to three others, give the WRONG answers!  So
>then the 'couple dozen' not only have to answer those same
>questions, but have to go back and fix the wrong answers,
>pointing out why they were not good things to tell people to do.

I think the main thing is that the few regulars who give most of
the useful answers here are helping the rest of us for free.

The least we could do is to apply a little self-filtering, to avoid
wasting their time.  Sticking to Perl questions in comp.lang.perl
sounds like a reasonable way to start.



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

Date: Sat, 18 Sep 1999 07:58:09 GMT
From: John Moreno <jmorneo@my-deja.com>
Subject: Re: CGI in PERL
Message-Id: <7rvgmf$lrr$1@nnrp1.deja.com>

  Dan Sugalski <dan@tuatha.sidhe.org> wrote:
> Zenin <zenin@bawdycaste.org> wrote:
> > Kim Saunders <kims@emmerce.com.au> wrote:
> > :>Thus Algol, Basic, Cobol, Fortran, Lisp, ... -- and now Perl!
> > :
> > : Dunno if I agree with some of those languages, esp BASIC... basic is
> > : often spelt in caps. But the principal is right...
>
> > 	ONLY BECAUSE EARLY BASIC INTERPRETERS COULD ONLY DO CAPS, AFAIK.
>
> Nope. It's because BASIC is an acronym--Beginner's Allpurpose something
> something something. I forget exactly what. COBOL is also supposed to be
> all upper-case, FWIW. (COmmon Business Oriented Language) FORTRAN too, as
> it's sorta an acronym.

BASIC = Beginner's All-Purpose Symbolic Instruction Code

--
--
John Moreno


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Thu, 16 Sep 1999 23:33:49 -0400
From: "Ishmael" <jgrot@spam.off.tso.cin.ix.net>
Subject: Re: Error in "Learning Perl, 2nd Edition" or Error in Perl port specific to Windows or ?
Message-Id: <ru654j5olg747@corp.supernews.com>


Brian Clark wrote in message >A followup to my original post:
>
>I got Jeff's message, and I decided to go ahead and upgrade to
>ActiveState's 519 Build. I did that, and I still get the same output
>from the example in my original post.
>
 ...
>Win95B (first posting), BSDI 4.0.1 (first posting), and now Win98
>(This may not make and difference what-so-ever, I don't know).
>
>Brian

Brian,

I didn't mention that I tested this on WinNt4.0 sp3.  I also have Perl
running on Win95 at work.  I'll test it tomorrow.

Jeff




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

Date: Sat, 18 Sep 1999 00:41:52 -0400
From: "Ishmael" <jgrot@spam.off.tso.cin.ix.net>
Subject: Re: Error in "Learning Perl, 2nd Edition" or Error in Perl port specific to Windows or ?
Message-Id: <ru65p165lg782@corp.supernews.com>

Brian Clark wrote in message <37dfb0be.67363578@news.greenwood.net>...

>
>A followup to my original post:
>
>I got Jeff's message, and I decided to go ahead and upgrade to
>ActiveState's 519 Build. I did that, and I still get the same output
>from the example in my original post.
>
>I have tried this with two different builds of ActiveState's Perl on
>two different systems and three different systems total:
>
 ...

>Brian

Brian,

I tried this same script in my Win95 machine at work also using
ActiveState's 519 Build and it worked just as on my WinNt system.

Jeff





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

Date: Sat, 18 Sep 1999 04:06:41 GMT
From: dalekh@hotmail.com (d.k. henderson)
Subject: Re: Help on Perl/Cgi script
Message-Id: <8E451AD4dkhenderson@207.14.236.87>

Here is a C CGI library:

 http://www.geocities.com/SiliconValley/Vista/6493/projects/cgi-lib.html


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

Date: Fri, 17 Sep 1999 21:49:32 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: how to create temporary cookie and destroy it
Message-Id: <mbudash-1709992149320001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>

In article <7rv0ss$m4v$1@winter.news.rcn.net>, "ken" <skywing@home.com> wrote:

>Hi:
>    Can someone show me how to create a temporary cookie in perl so I can
>passing the value from page to page in my website, and how to delete the
>cookie from the user browser when they leaving my website. Thanks.

http://stein.cshl.org/WWW/software/CGI/cgi_docs.html#cookies
-- 
Michael Budash ~~~~~~~~~~ mbudash@sonic.net


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

Date: Sat, 18 Sep 1999 15:14:34 +0800
From: Andriani Siau <andriani@singnet.com.sg>
To: andriani@singnet.com.sg
Subject: Re: Link CGI to microsoft Access
Message-Id: <37E33BDA.42C9EA49@singnet.com.sg>

i have solved this problem successfully. this is not SQL problem but case
sensitive of  my variable between my CGI and Form(the variable in HTML)  i
just want to let you know.
thanks a lot
andriani
Andriani Siau wrote:

> i tried to save my data that i get from the  form submission. After i read
> and parse the data , i want to store to database using this following
> command
>
>  $sql = "INSERT INTO test_table (name, password) VALUES
> ($form{'name'},'$form{'password'}')";
>    $db->Sql($sql);
> how to insert the variable data to database ????
>
> i  run the program . i got error message. can you help me
> sorry for disturbing you
> thank you in advance
> bye
>
> andriani
>
> Bob Walton wrote:
>
> > Andriani Siau wrote:
> >
> > > anyone know how to retrieve and save data from microsoft access using
> > > perl.
> > > Thank you in advance.
> > >
> > > bye
> > > andriani
> >
> > Here is one way, courtesy of the perl2exe folks.  Works in CGI scripts,
> > too.
> >
> > # ODBC test program
> >
> > # Seting up an ODBC database
> >
> > #a) Click Settings/ControlPanel
> > #b) Click 32-Bit ODBC
> > #c) Select "System DSN" tab
> > #d) Click Add, select "Microsoft Access Driver", click Finish
> > #e) Enter the following properties
> > #   Data Source Name:  test_dsn  (This is the most important field)
> > #   Description: Anything
> > #f) Click on Create... and choose a filename, eg. c:\database\test.mdb
> > #g) Next time Click on Select ... and choose a filename, eg.
> > c:\database\test.mdb
> >
> > use Win32::ODBC;
> >
> > &insertData;
> > &getData;
> >
> > exit(0);
> >
> > sub insertData {
> >    $dsn = "test_dsn";
> >
> >    $db = new Win32::ODBC($dsn);
> >    die "ERROR: Failed to open database\n" if(!$db);
> >
> >    $sql = "CREATE TABLE test_table (";
> >    $sql .= "id char(02), ";
> >    $sql .= "name char(04), ";
> >    $sql .= "city char(03) )";
> >
> >     $db->Sql($sql);
> >    ($ErrNum, $ErrText, $ErrConn) = $db->Error();
> >
> >    $sql = "DELETE FROM test_table";
> >    $db->Sql($sql);
> >
> >    $sql = "INSERT INTO test_table (id, name, city) VALUES ('01', 'Jack',
> > 'NY')";
> >    $db->Sql($sql);
> >
> >    $sql = "INSERT INTO test_table (id, name, city) VALUES ('02', 'John',
> > 'Lon')";
> >    $db->Sql($sql);
> >
> >    $sql = "INSERT INTO test_table (id, name, city) VALUES ('03', 'Mike',
> > 'HK')";
> >    $db->Sql($sql);
> >
> >    $sql = "INSERT INTO test_table (id, name, city) VALUES ('04', 'Carl',
> > 'LA')";
> >    $db->Sql($sql);
> > }
> >
> > sub getData {
> >
> >    $sql = "SELECT * from test_table order by id";
> >
> >    $db->Sql($sql);
> >    while ($db->FetchRow()) {
> >       ($id, $name, $city) = $db->Data("id", "name", "city");
> >       print $id, " - ", $name, " - ", $city, "\n";
> >    }
> >    $db->Close();
> > }
> >
> > --
> > Bob Walton





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

Date: 18 Sep 1999 04:37:17 GMT
From: lt lindley <ltl@rgsun40.viasystems.com>
Subject: Re: List files in a dir
Message-Id: <7rv4tt$9o5$1@rguxd.viasystems.com>

Abigail <abigail@delanet.com> wrote:

:>#!/opt/perl/bin/perl -w

:>use strict;

:>print <<HTML;
:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
:>    "http://www.w3.org/TR/REC-html40/strict.dtd">
:><title>Files</title>
:><pre>@{[`ls`]}</pre>
:>HTML

:>__END__

Let's see.  In order to understand this (and ignoring the HTML so we
are just talking about @{[`ls`]} in quoted context) the poor guy (or
gal) has to know

1) Contrary to expectations of shell programmers back-quotes
do NOT interpolate within double quotes... (and therefore other
qq type operators like a HERE document) [Reference: perlop]
2) Also from perlop:
               Interpolated scalars and arrays are internally
               converted to the join and . Perl operations, thus
               "$foo >> '@arr'"> becomes:

                 $foo . " >>> '" . (join $", @arr) . "'";

               All the operations in the above are performed
               simultaneously left-to-right.
3) Given that the @ indicated array in the quoted string must be
interpolated in that 'join' context (as explained above), the BLOCK
nature of it comes into play.  So the block has to be evaluated.
The block contains a reference to an anonymous array that happens to
contain a backquote operator...

I quit there.  It wasn't hard to figure out exacly what it did, but
the reasons for requiring all of it were non-obvious.  Surely you
would not label that an "idiomatic" Perl usage. (Not that you
claimed it was, but your usage was rather cavalier.)

If this is truly a common idiom, please point me to additional
reading material.

-- 
// Lee.Lindley   /// Programmer shortage?  What programmer shortage?
// @bigfoot.com  ///  Only *cheap* programmers are in short supply.
////////////////////    50 cent beers are in short supply too.


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

Date: Sat, 18 Sep 1999 15:48:39 +1000
From: "Pen and Ron Savage" <rpsavage@ozemail.com.au>
Subject: Re: make in Windows 98
Message-Id: <8NFE3.16823$1E2.123978@ozemail.com.au>

If you download Microsoft's nmake from
    ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe.
you should be ok.

You may need to edit C:\Perl\Lib\Config.pm, line 445 for me, to change
'make' to 'nmake'.

--
Cheers
Home: ron@savage.net.au. Work: rons@hpaco.aus.hp.com
Home: pen@savage.net.au. Work: pen.savage@education.monash.edu.au
http://savage.net.au/
Frank Losasso <losasso@rice.edu> wrote in message
news:37E2EABC.8671D11F@rice.edu...
> i got activeperl and i'm running windows 98... a program i downloaded
> has the following instalation instructions:
>
>
>
> Installation:
>
>   The usual installation strategy
>
>     perl Makefile.PL
>     make
>     make test
>     make install
>
>   should produce viable modules.
>
>   Note: Under 4Dos do not run dmake.  "command /c dmake" should work.
>
> and i can do the perl Makefile.PL without any problems, but i can't do
> the others.
>
> can anyone help <franklosasso@yahoo.com>
>
>




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

Date: Sat, 18 Sep 1999 19:13:00 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: make in Windows 98
Message-Id: <MPG.124de6894c25a19d989cd1@news-server>

Frank Losasso writes ..
>    perl Makefile.PL
>    make
>    make test
>    make install
>
>  should produce viable modules.
>
>  Note: Under 4Dos do not run dmake.  "command /c dmake" should work.
>
>and i can do the perl Makefile.PL without any problems, but i can't do
>the others.

you need a tool that knows how to parse makefiles .. please read the 
perlwin32 documentation available by typing the following at the command 
prompt

  perldoc perlwin32

or by navigating there in the ActiveState documentation

NB: some modules also require a compiler .. unfortunately for you - you 
can't get those for free on Microsoft OSs

-- 
 jason - elephant@squirrelgroup.com -


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

Date: Sat, 18 Sep 1999 00:34:34 -0400
From: Trevor Williams <trevor@ndl.net>
Subject: Perl 5.005_03, BerkeleyDB 2.7.7, BerkeleyDB-0.06, and Solaris7
Message-Id: <37E3165A.8193162B@ndl.net>

Hi,

    Has anyone successfully installed the above combination and gotten
it to work?
I have been tasked with trying to solve an installation problem. The
system in
question is a SUN Solaris7 based installation. I was told that
I needed to install BerkeleyDB first, then Perl, so that it sees the
libdb and db.h
files, then install the BerkeleyDB perl package last. I have
successfully (without
errors) all of the above, but when one of the programmers uses the
following
test program, it fails. This program works under Solaris 2.6.

#!/usr/bin/perl -w

use strict;

use BerkeleyDB;

my $dbf = "./dbtest";
my %QDB = ();

unlink $dbf;

my $qdb = tie %QDB, 'BerkeleyDB::Btree',
  -Filename => $dbf, -Flags => DB_CREATE
    or die "Can't create db file ($!): $dbf\n";

$QDB{zzz} = 27;
$QDB{one} = 1;
$QDB{two} = 2;
$QDB{three} = 3;
$QDB{four} = 4;
$QDB{aaa} = 0;

while (my($k,$v) = each %QDB) {
  print "$k -> $v\n";
}

print "Closing database\n";

undef $qdb;
untie %QDB;

print "Reading from database $dbf\n";

%QDB = ();

tie %QDB, 'BerkeleyDB::Btree',
  -Filename => $dbf, -Flags => DB_RDONLY
    or die "Can't open db file ($!): $dbf\n";

while (my($k,$v) = each %QDB) {
  print "$k -> $v\n";
}

This is the error:

%> perl test.pl
aaa -> 0
four -> 4
one -> 1
three -> 3
two -> 2
zzz -> 27
Closing database
Reading from database ./dbtest
Can't open db file (): ./dbtest

No matter what I try, I can not "re-open" the db file...
Can anyone see something wrong with what I am doing???
Any answers would be greatly appreciated. The next thing
to do is to drop back to Solaris 2.6...

Thanx...

Trevor Williams
Sr UNIX Systms Administrator
Northern Light Technology
http://www.northernlight.com/



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

Date: Fri, 17 Sep 1999 22:49:02 -0700
From: b chung <bchung@ci.south-el-monte.ca.us>
Subject: perl return value to a perl script
Message-Id: <37E327CD.206ED8B@ci.south-el-monte.ca.us>

I trying to call another perl script and return some data.

#perl1.pl
$out = system("perl perl2.pl");
print $out;


#perl2.pl
$xx ="test2";
return $xx;
#exit($xx);

This doesn't work

Any idea?

TIA
Betty Chung




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

Date: Sat, 18 Sep 1999 19:19:46 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: perl return value to a perl script
Message-Id: <MPG.124de820a5d2ac09989cd3@news-server>

b chung writes ..
>I trying to call another perl script and return some data.
>
>#perl1.pl
>$out = system("perl perl2.pl");
>print $out;
>
>
>#perl2.pl
>$xx ="test2";
>return $xx;
>#exit($xx);
>
>This doesn't work
>
>Any idea?

yeah

  perldoc -f system

  perldoc -f do

-- 
 jason - elephant@squirrelgroup.com -


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

Date: Sat, 18 Sep 1999 00:08:38 -0500
From: "Marc Nations" <mnations@airmail.net>
Subject: Re: PERL/HTML Interaction problems with <ACTION... command
Message-Id: <3F31453078455BCF.FCB2E0D08D0B5466.3B2F6B2F8D0C1C33@lp.airnews.net>

Sorry folks. I was having mail server problems which sent
a whole bunch of postings.

My problem I asked about was solved.
Thanks to those who helped.




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

Date: Fri, 17 Sep 1999 23:22:47 -0700
From: "David Ramos" <davidra@nowonder.com>
Subject: PerlScript in ASP under Win98
Message-Id: <0fGE3.10809$iy.311568@newsr1.san.rr.com>
Keywords: PerlScript, Win32::ASP, ASP, Windows 98

Hello

After programming CGI in PERL for almost a year now, I have become very
interested in ASP.  I am hosting my website using Apache 1.3.6 under Windows
98.  I downloaded and installed OpenASP for Apache, and it seems to run fine
under the VBScript (Yuck!) and JScript samples.  After fooling with
configuration for a while now, I have installed the Win32::ASP module.  Now
that that and PerlScript are installed, I wrote a simple test script:

"
<%@ LANGUAGE=PerlScript %>
<HTML>
<HEAD>
<TITLE>PerlScript Hello, World!</TITLE>
</HEAD>
<BODY>
<%
 use Win32::ASP;
 Print "Hello, World!";
%>
</BODY>
</HTML>
"

NOTE: The capital "P" in Print is not an error; the Print function is
declared in Win32::ASP.

When I run this script, OpenASP returns the error:
"
Apache Active Scripting Runtime Error
Can't call method "writeblock" on an undefined value.

Line #1
"

Any ideas?

Please either contact me through either one of the chat systems I listed, or
through e-mail.  In order to help others who read this newsgroup, please
also reply to here.

Thanks

-David Ramos-
davidra@nowonder.com
AIM: DRamos486
ICQ: 14335264
Yahoo: techbs486





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

Date: Sat, 18 Sep 1999 01:20:17 -0400
From: Michel Jacob <micheljacob@multimania.com>
Subject: PL extension
Message-Id: <37E32111.5D9E52B8@multimania.com>

Hi!

I know almost nothing on CGI and Perl programming.  I want to use a
little CGI program that is freely distribute on the WEB to put a
password access restriction on my WEB site.  In that program, there is
CGI and PL extension files.  The host server of my site can read CGI
extension but not PL extension.  Is someone know if in this situation,
the CGI program will not work, or if the PL file doesn't have to be read
by a host server? 

Thanks!

Michel Jacob


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

Date: Sat, 18 Sep 1999 19:17:22 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: PL extension
Message-Id: <MPG.124de7898dab7e5d989cd2@news-server>

Michel Jacob writes ..
>I know almost nothing on CGI and Perl programming.  I want to use a
>little CGI program that is freely distribute on the WEB to put a
>password access restriction on my WEB site.  In that program, there is
>CGI and PL extension files.  The host server of my site can read CGI
>extension but not PL extension.  Is someone know if in this situation,
>the CGI program will not work, or if the PL file doesn't have to be read
>by a host server? 

only on Tuesdays

-- 
 jason - elephant@squirrelgroup.com -


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

Date: 18 Sep 1999 09:02:36 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Problem with open() and probably something else
Message-Id: <7rvkfc$5bf@dfw-ixnews9.ix.netcom.com>

David Wall (darkon@one.net) wrote:
: In article <7rsdmv$b24@dfw-ixnews6.ix.netcom.com>, ebohlman@netcom.com (Eric Bohlman) wrote:
: >You need to seek() to the beginning of the file here because the OS's file
: >pointer is now pointing past the end of the file.  This will lead to 
: >various results on different OSs, none of which are likely to be what you 
: >want (on FreeBSD, for example, you'll get a block of null bytes the size 
: >of the original file before what you write).
: 
: Ah...  a light dawns.  I said I'd probably feel stupid.  Unfortunately, I was 
: right. Thanks for the help!

No need to feel stupid.  You're learning.  That's more than can be said 
for most people who write Web BBS scripts; they aren't even aware that 
concurrency issues exist.  If they're somehow made aware of the issues 
their first response is to deny that they're important ("who gave you the 
right to tell me what I should be doing?") and, if they can get past 
this, their next response is "tell me what to type to fix the problem."  
If, by some miracle, they manage to fix the problem, they gain no 
knowledge whatsoever from the exercise and will make the exact same 
mistake, without realizing it's a mistake, the next time they have to 
write something similar.

You're building up a mental model of how various things work as you go 
along; nobody gets such a model pre-built and the only way to build it is 
through trial and error; the errors are nothing to be ashamed of.  What 
*is*, IMHO, something to be ashamed of is refusing to build a mental 
model in the first place yet expecting to still be able to create 
something useful, or refusing to correct the errors in one's mental model 
("only sissies admit they're wrong") and blindly treating the incorrect 
model as correct.

The awareness of a mental model, its importance, and the possible errors 
in it are what distinguish the beginning programmer from the script kiddie.


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

Date: 18 Sep 1999 04:47:46 GMT
From: lt lindley <ltl@rgsun40.viasystems.com>
Subject: Re: regexp odity with (?s-x:)
Message-Id: <7rv5hi$9o5$2@rguxd.viasystems.com>

Rick Delaney <rick.delaney@home.com> wrote:

:>This is a bug which has been fixed in devel perls (it is in 5005_61
:>anyway).

Thank you.  I assume you made that statement after testing the
sample under 5005_61.  I will cease and desist (and code around it).

-- 
// Lee.Lindley   /// Programmer shortage?  What programmer shortage?
// @bigfoot.com  ///  Only *cheap* programmers are in short supply.
////////////////////    50 cent beers are in short supply too.


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

Date: 18 Sep 1999 06:54:57 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: regexp odity with (?s-x:)
Message-Id: <7rvd01$hn5$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to lt lindley 
<lee.lindley@bigfoot.com>],
who wrote in article <7rv5hi$9o5$2@rguxd.viasystems.com>:
> :>This is a bug which has been fixed in devel perls (it is in 5005_61
> :>anyway).
> 
> Thank you.  I assume you made that statement after testing the
> sample under 5005_61.  I will cease and desist (and code around it).

And the funny details of the bug: (?-x:) was restoring (?x)-ness too
late, *after* the whitespace after it was (not) ignored.  So: do not
have whitespace or # immediately after (?x:) or (?-x:) until a
bug-freeer version is released.

Ilya


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

Date: Fri, 17 Sep 1999 23:13:47 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Sorting on a string, by value.
Message-Id: <MPG.124ccd65bdd47a1f989f98@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <x7yae4ano4.fsf@home.sysarch.com> on 17 Sep 1999 23:44:43 -
0400, Uri Guttman <uri@sysarch.com> says...
 ...
> it may help you understand how to sort things like this. but in the mean
> time here is a whack at it using the ST (tested):

But not *very* thoroughly.

> @out =	map $_->[0],			# get back original records
> 	sort {	$a->[1] <=> $b->[1]	# compare numeric prefix first
> 			||
> 		$a->[2] <=> $b->[2]	# compare numeric suffix next
> 			||
> 		$a->[3] <=> $b->[3]	# compare string suffix last

                    cmp

> 	}
> 	map {
> 		( $num1, $str, $num2 ) = /([\d_]+)\.([a-z]+)(\d*)/i ;

        my ...
 
> 		$num1 =~ tr/_//d ;	# cleanup prefix number

You are taking the poster's word that this is correct, though it would 
sort, say, 2_3_5_1 ahead of 2_3_4_10.  It really needs a left-to-right 
numeric sort on each of the four fields (rather like the IP addresses 
used in the examples in our paper).

> 		$num2 ||= 0 ;		# make suffix number defined

It is always defined, but may be the null string.  This fixup makes it 
numeric.

> # create the anon array list for the sort sub
> 
> 		[ $_, $num1, $str, $num2 ] ;

  		[ $_, $num1, $num2, $str ] ;

> 
> 	} @in ;
> 
> 
> i leave it as an exercise to create a packed sort version of this.

Not me!  Use your module-to-be.

Oh, what the hell.  Here's a go at it (tested; assumes all number fields 
fit within a byte):

  @out =
	map substr($_, 1 + rindex $_, "\0"),
  	sort
  	map {
  		my ( $num1, $str, $num2 ) = /([\d_]+)\.([a-z]+)(\d*)/i ;
            pack 'C5 A* x A*' =>
                split(/_/ => $num1), $num2 || 0, $str, $_          
  	} @in ;


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


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

Date: Sat, 18 Sep 1999 10:03:07 +0200
From: "WhilBone" <whilbone@algonet.se>
Subject: Re: Telnet scripting in Perl?
Message-Id: <7rvh1p$d6j$1@zingo.tninet.se>

I'm sorry... I have had quite a lot of problems with spamming lately and
therefor I had my e-mail adressed removed from here.

Now it's back anyway.

/ Peter

Kragen Sitaker <kragen@dnaco.net> wrote in message
news:PzvE3.16831$N77.1241239@typ11.nn.bcandid.com...
> In article <7rtrqm$lt4$1@cubacola.tninet.se>, WhilBone <no_mail@to.me>
wrote:
>
> I'm not going to respond to messages from people whose addresses are
> "no_mail@to.me".  Neither, I hope, is anyone else.
> --
> <kragen@pobox.com>       Kragen Sitaker
<http://www.pobox.com/~kragen/>
> Fri Sep 17 1999
> 52 days until the Internet stock bubble bursts on Monday, 1999-11-08.
> <URL:http://www.pobox.com/~kragen/bubble.html>




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

Date: Sat, 18 Sep 1999 10:05:42 +0200
From: "WhilBone" <whilbone@algonet.se>
Subject: Re: Telnet scripting in Perl?
Message-Id: <7rvh6k$dgt$1@zingo.tninet.se>

>
> So, did you check out Net::Telnet?
>

Didn't know there was one...  I do know that it exists now at least. I guess
I will just try and find some info about it.

Thanks

/ Peter




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

Date: Sat, 18 Sep 1999 05:43:05 GMT
From: nospam.newton@gmx.net (Philip 'Yes, that's my address' Newton)
Subject: Re: win32 disk formatting
Message-Id: <37e296cc.1232755@news.nikoma.de>

On Thu, 16 Sep 1999 23:19:36 GMT, "David Clarke"
<clarked@hunterdon.csnet.net> wrote:

[stuff]

Why did you post this again? Didn't you like the way this post looked
four days ago?

Cheers,
Philip
-- 
Philip Newton <nospam.newton@gmx.net>


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

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


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