[6608] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 233 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 4 10:16:49 1997

Date: Fri, 4 Apr 97 07:00:33 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 4 Apr 1997     Volume: 8 Number: 233

Today's topics:
     Re: Arithmetic expressions?? <rootbeer@teleport.com>
     Re: At-sign cancels backslash? <rootbeer@teleport.com>
     Re: base conversion (for unix rgb/hex converter) (Andy Wardley)
     Re: cgi <tchrist@mox.perl.com>
     Re: Configuring Perl5.002 on OS2 <rootbeer@teleport.com>
     Environment Variables (John Allen XD/BZ 832 4812)
     Expand $variables (Pontus Berglund)
     guestbook (writing to the datafile) <lorraine@ait.nrl.navy.mil>
     Re: Help desperately needed.  Perl errors need decypher (Simon Hyde (aka Jeckyll))
     Re: Help Doing a chomp type function <rootbeer@teleport.com>
     Re: HELP: trouble "making" perl5.003_94 (David Combs)
     How to extract string starting with n characters? <jim.michael@gecm.com>
     Re: How to get key from value in a %VAR <seay@absyss.fr>
     Re: How to tell if a file exists? <rootbeer@teleport.com>
     Re: Last modified on files: HELP NEEDED URGENTLY (Andreas Schmidt)
     Re: lock file necessary? <rootbeer@teleport.com>
     Re: Multidimensional Arrays! <tchrist@mox.perl.com>
     Newbie - Help on debugging <billyrle@bayou.com>
     Re: Ousterhout and Tcl lost the plot with latest paper (Cyber Surfer)
     Parser gets confused with '@' in strings <gritton@iserver.com>
     Re: Perl CGI Problem RFinizio@3mail.3com.com
     Re: perl data structure for a data table with dictionar <rootbeer@teleport.com>
     Re: Perl, Delphi, Linux, Windows, and databases (VB5E?) <kjw1@stir.ac.uk>
     Perl, HTTP, CGI <pchang@pigpen.cs.columbia.edu>
     Re: Perl, HTTP, CGI (Eric Bohlman)
     Re: perl-based vrml builder (Simon Hyde (aka Jeckyll))
     Re: PERLscript with URL redirection <rootbeer@teleport.com>
     Re: Please - need help with for loop on hostname script <rootbeer@teleport.com>
     Problems with objects (Odd Number of elem. in hash list <lpa@sysdeco.no>
     Solid Calls <klockk@wsadmin2.cv.hp.com>
     Re: Suggestions: notation for RE lookbehind (Reshma Muchalambkar)
     Re: Suggestions: notation for RE lookbehind <rootbeer@teleport.com>
     Re: TPJ: Nukes (Piers Cawley)
     Re: Using Perl with MS-Access (Andrew Gruskin)
     Re: Where is the FAQ list? <tchrist@mox.perl.com>
     Win32 DDE module? mikee@spindle.net
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Fri, 4 Apr 1997 06:36:59 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Ken Anderson <anderson@necsys.gsfc.nasa.gov>
Subject: Re: Arithmetic expressions??
Message-Id: <Pine.GSO.3.96.970404063501.9600X-100000@kelly.teleport.com>

On 3 Apr 1997, Ken Anderson wrote:

> -e "file"$n+1 ...       # barfs

Maybe you want one of these...

   -e ( "file" . ($n+1) )

   -e "file${\($n+1)}"

Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: Fri, 4 Apr 1997 06:09:03 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: David Winfrey <do.not.spam.dwinfrey@cpcug.org>
Subject: Re: At-sign cancels backslash?
Message-Id: <Pine.GSO.3.96.970404060755.9600O-100000@kelly.teleport.com>

On 3 Apr 1997, David Winfrey wrote:

>         $str1 = "@\x55\n";
>         $str2 = "\x40\x55\n";
>  
>         print $str1;
>         print $str2;

Both those lines print the same thing in current versions of Perl. You may
need to get a newer version if this bothers you. :-) 

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: 3 Apr 1997 12:52:29 +0100
From: abw@peritas.com (Andy Wardley)
Subject: Re: base conversion (for unix rgb/hex converter)
Message-Id: <5i05lt$me1@aoxomoxoa.peritas.com>

In article <5hu0jp$pp9@panix.com>, David Staschover <das@panix.com> wrote:
>thanks! That one liner did it! The Windows-based rgb-hex converters are
>too awkward with the sliders..

I wrote a CGI perl script to do web-based rgb/hex colour conversion.
It may be of interest to you:

  In action: http://www.peritas.com/~abw/cgi-bin/hexcol.oxa
  Source:    http://www.peritas.com/~abw/online/hexcol


A



-- 
Andy Wardley <abw@peritas.com>  **NEW** http://www.peritas.com/~abw 
A responsible and professional individual who has no need for silly 
comments, inane banter or bizarre "in-jokes" in his signature file.  


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

Date: 4 Apr 1997 11:59:23 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: cgi
Message-Id: <5i2qer$gej$1@csnews.cs.colorado.edu>

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

In comp.lang.perl, a dead newsgroup, 
    gf94ab@sandcastle.cosc.brocku.ca (Greg Foley) writes:

THERE IS NO COMP.LANG.PERL NEWSGROUP -- STOP POSTING TO IT.

:I'm trying to open a file from my cgi program, to append data to it for
:later use.
:my script thus far is
:#!/usr/sbin/perl
:#name.pl from page 387 in Steve's book
:$length = read(STDIN, $user_input, $ENV{CONTENT_LENGTH});
:
:print "Content-type: text/html\n\n";
:print "Your input \"$user_input\" in the input boxes\n\n";
:
:open (FILEDES, ">>"."/usr/me/public_html/myfile");
:
:print FILEDES "$user_input\n";
:
:close (FILEDES);
:
:exit(0);
:
:I can execute this program, and I don't get any errors.  My question is
:where is the data being sent?
:I don't get a new myfile created.

That's because you didn't *ASK* for any errors!!!!

    http://www.perl.com/perl/faq/

Here the start;

    NAME
	perlfaq9 - Networking ($Revision: 1.13 $)

    DESCRIPTION
	This section deals with questions related to networking, the
	internet, and a few on the web.

      My CGI script runs from the command line but not the browser.
      Can you help me fix it?

	Sure, but you probably can't afford our contracting rates :-)

	Seriously, if you can demonstrate that you've read the
	following FAQs and that your problem isn't something simple
	that can be easily answered, you'll probably receive a
	courteous and useful reply to your question if you post it on
	comp.infosystems.www.authoring.cgi (if it's something to do
	with HTTP, HTML, or the CGI protocols). Questions that appear
	to be Perl questions but are really CGI ones that are posted
	to comp.lang.perl.misc may not be so well received.

	The useful FAQs are:

	    http://www.perl.com/perl/faq/idiots-guide.html
	    http://www3.pair.com/webthing/docs/cgi/faqs/cgifaq.shtml
	    http://www.perl.com/perl/faq/perl-cgi-faq.html
	    http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html
	    http://www.boutell.com/faq/


Now, go read the first URL there.  It's devoted to answering "How
come my Perl CGI script doesn't work?", and was written after I 
answered the question about the 1000th time (yes, really) so is
a bit heavy on irony, but when you've got bugs to iron out, this
should help.

This was the nicest answer I can give.  I shall let others chide
you for posting a non-perl question to the perl group.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com


    "His super power is to turn into a scotch terrier."


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

Date: Fri, 4 Apr 1997 06:23:09 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Dan Ascheman <asched1@medtronic.COM>
Subject: Re: Configuring Perl5.002 on OS2
Message-Id: <Pine.GSO.3.96.970404062219.9600S-100000@kelly.teleport.com>

On 3 Apr 1997, Dan Ascheman wrote:

> Subject: Configuring Perl5.002 on OS2

Why are you using 5.002? More recent versions are available, and they may
even be smarter about compiling on your system. Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: 4 Apr 1997 08:33:50 GMT
From: etljhan@etlxdmx.ericsson.se (John Allen XD/BZ 832 4812)
Subject: Environment Variables
Message-Id: <5i2ede$l4p@newstoo.ericsson.se>

Hi,

I have a problem that must have been seen lots of times, so apologies if
it has been asked before...

I am trying to write a web based toolset using perl for the CGI scripts.
Unfortunately, the set of environment variables passed to perl by the
html script is rather sparse and does not include $HOME, $USER etc.

Is there any way to get at these variables?
Thanks in advance for any help...

Cheers /Yogi

John (Yogi) Allen   ETL XD/BZ         SEPG (APStools Support)
Email: etljhan@etlxdmx.ericsson.se    Memo: ETL.ETLJHAN
Burgess Hill, W.Sussex, UK            832 4812  01444 234812
"I think, therefore I can"        -   Thomas the Tank Engine




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

Date: Fri, 04 Apr 1997 13:13:50 GMT
From: pontus@se.adsanker.com (Pontus Berglund)
Subject: Expand $variables
Message-Id: <3344fbdc.4852577@sfunix2.fln.ads.se>

Hi!

I'm quite new to Perl, and I have a slight problem. I've tried finding
an answer elsewhere, but failed. My problem is best explained with an
example. I want to expand variables in lines of text that are read
from a file. What I've got is this:

I have a text file from which the lines are read:

lines.txt
---------
Today is $date.
Another line of text.



The script looks like this:

script.pl
---------
# Read the lines from lines.txt into the array @arr.
# $i is the index.
$date="Monday";
while (<INFILE>) {
	s/str/$arr{i}/g;
	print $_;
}

I want the script to replace the string str with "Today is Monday.",
but it replaces str with "Today is $date.". If I write the script like
this it works:

script2.pl
----------
$text="Today is $date.";
$date="Monday";
while (<INFILE>) {
	s/str/$arr{i}/g;
	print $_;
}

    [Pontus]



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

Date: Thu, 03 Apr 1997 17:26:25 -0500
From: Brian Lorraine <lorraine@ait.nrl.navy.mil>
Subject: guestbook (writing to the datafile)
Message-Id: <33442E91.41C6@ait.nrl.navy.mil>

hmmm I am aaaaaaalmost done writing this guestbook, but there's one
problem... here's how the datafile is set up where the entries are
stored... each record is seperated by a "&" and each field in each
record is seperated by a "##". The one script that actually does the
writing to the datafile (which is at
"http://www.ait.nrl.navy.mil/cgi-bin/lorraine/book.pl" and which is in a
text file form at "/people/lorraine/book.txt") doesn't add the new
record on the end of the string like i want it to; It skips to the next
new line in the datafile and writes the next record which totally messes
up the entire thing when you're trying to view it. As you can see I open
up the file with a ">>" in front of it... Is there i way i can open this
datafile so that this one script adds data to EXACTLY the end of the
string (which is the last "&")? PLEEEASE tell me there is a way or it
looks like i'm gonna' have to try mess around with the whole script
again.. thanks a bunch,

--------------------------------------------------------------
Brian "the BrAiN" Lorraine           lorraine@ait.nrl.navy.mil

 " ...if you want something badly enough and willing to work hard
          enough you'll get there in the end. "
						-Saffron-

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


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

Date: Fri, 04 Apr 1997 11:07:41 GMT
From: shyde@poboxes.com (Simon Hyde (aka Jeckyll))
Subject: Re: Help desperately needed.  Perl errors need decyphering.
Message-Id: <3345e0b2.1969254@news.uni-stuttgart.de>

On 4 Apr 1997 04:50:17 GMT, "Robert Pate" <robert@ctllc.com> wrote:

>Hello there.  I am pretty new to Web programming.  I have written many Perl
>scripts that run perfectly in the NT world but I have now put them on my
>new ISP's server which is Linux and they don't work right.  I get the error
>"errno is 2" and "Premature end of script header".  Can anybody give me a
>hand at figuring out what this means and a way to fix it???  I would be
>very appreciative.  Thanks
>
It would be very helpful if you actually posted the bit of the script
that prints out the headers, then we could actually see what is wrong
with them.


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

Date: Fri, 4 Apr 1997 06:10:59 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Allen May <allenm@lexis-nexis.com>
Subject: Re: Help Doing a chomp type function
Message-Id: <Pine.GSO.3.96.970404061029.9600P-100000@kelly.teleport.com>

On Thu, 3 Apr 1997, Allen May wrote:

> I want to find where each users home account is.. 

Doesn't getpwnam work for you? Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: Fri, 4 Apr 1997 12:45:57 GMT
From: dkcombs@netcom.com (David Combs)
Subject: Re: HELP: trouble "making" perl5.003_94
Message-Id: <dkcombsE8464L.A2o@netcom.com>

By the way, that's Solaris 2.5.1 on a Sparkstation 5.



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

Date: 4 Apr 1997 14:15:30 GMT
From: Jim Michael <jim.michael@gecm.com>
Subject: How to extract string starting with n characters?
Message-Id: <5i32e2$4ue@gcsin3.geccs.gecm.com>

I am looking for a function for extracting a string starting with a 
specific substring, and ending with a specific character, e.g. all names 
starting with "John", ending with a space (Johnson, Johnstone, Johns,..).
Does this already exist in Perl? Pointer to appropriate reference 
appreciated. TIA.

Jim



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

Date: Fri, 04 Apr 1997 13:58:35 +0100
From: Douglas Seay <seay@absyss.fr>
To: basj <basj@xs1.xs4all.nl>
Subject: Re: How to get key from value in a %VAR
Message-Id: <3345090B.68EA@absyss.fr>

basj wrote:
> 
> I need to get the key that belongs to a value in a %VAR. How do I do that ?
> I can get the value if I have a key but I need to do the reverse lookup.

use each() and check each key/value pair.
note that values are not necessarily unique,
so be prepared for multiple matches.

- doug


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

Date: Fri, 4 Apr 1997 06:25:06 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: I hate spam! <alweiner@clark.net.com>
Subject: Re: How to tell if a file exists?
Message-Id: <Pine.GSO.3.96.970404062432.9600U-100000@kelly.teleport.com>

On 3 Apr 1997, I hate spam! wrote:

> Is there a way (other than open) to tell whether or not a file exists?

Yes, use the -e operator documented in perlfunc(1). Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: 4 Apr 1997 14:17:38 GMT
From: schmidt@misun13.iai.fzk.de (Andreas Schmidt)
To: donovan@zaak.nl (Donovan Janus)
Subject: Re: Last modified on files: HELP NEEDED URGENTLY
Message-Id: <5i32i2$cav$1@nz12.rz.uni-karlsruhe.de>

In article <3344b90e.86999012@news.xs4all.nl>, donovan@zaak.nl (Donovan Janus) writes:
|> Hi.
|> 
|> I need to see whether a file may has become outdated by looking when
|> it was last modified. Is there any way of doing this?
|> 
|> If not, could someone please e-mail me that aswell.
|> 
|> Thanks,
|> 
|> Donovan Janus	

hi donovan

there exists some tests for files you can perform.

the tests are:
 -M filename    # age of file in days
 -A filename     # age of file in days since last access
 -C age of file in days since last inode change

example:
  my $file = "test.dbs";
  if (-M $file > 2) {
	print "the file \'$file\' is older than 2 days\n";
  }

i hope this helps

best regards
smiff

========================================================================
andreas schmidt                                email: schmidt@iai.fzk.de 
institut fuer angewandte informatik (iai)        phone: +49 7247 82 5714
forschungszentrum karlsruhe gmbh
    - technik und umwelt -       
postfach 3640                                  76021 karlsruhe (germany)
          http://www.iai.fzk.de/Institut/MI/mitarbeiter/schmidt.html


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

Date: Fri, 4 Apr 1997 05:34:58 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: carelf@demon.nl
Subject: Re: lock file necessary?
Message-Id: <Pine.GSO.3.96.970404053337.9600I-100000@kelly.teleport.com>

On Wed, 2 Apr 1997 carelf@demon.nl wrote:

> Several people are using a simple script of mine simultaneously 

> open(BACKUPF,">>$backup_file")||die "Could not open backup file: $!.\n";

> Will I need a lockfile for this?

According to my Magic 8-Ball, "My sources say yes." :-)

Don't forget to seek the end of the file after locking. Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: 4 Apr 1997 11:29:15 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Multidimensional Arrays!
Message-Id: <5i2omb$e8k$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, 
    desmond@lisa.cs.mcgill.ca (Desmond Ye-Ket NG) writes:
:I am having some trouble with 2D arrays in PERL5.

No, you're having problems with I/O.

:open (OUT, "+> file.out") || die;

Read what the open entry in the perlfunc man page says
about that mode.  It's not what you think it is.

:{  
:	@input = split (' ', $_);

How did $_ get loaded with something there?

:				$arr[$i][$counter[$i]] = $input[$i];

You've got a bracket there you surely don't want.

:				$counter[$i] = $counter[$i] + 1;
 
you mean ++ :-)

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com
You know, by the time you get done with all this, the "Swiss Army
Chainsaw" is going to be more like a Swiss Army Tactical Nuke....  :-)
    --Brandon Allbery on perl in <1991Feb21.002412.20045@NCoast.ORG> 


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

Date: Thu, 03 Apr 1997 19:48:07 -0600
From: Bill Yrle <billyrle@bayou.com>
Subject: Newbie - Help on debugging
Message-Id: <33445DD7.10CD@bayou.com>

I'm trying to test my CGI scripts (which create web pages and forms) on
my home PC running Windows95.  I have no access to a server until my
scripts are complete.  What is the best way to be able to run my scripts
and see the resulting HTML pages?  I am using CGI.PM module with
perl....


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

Date: Fri, 4 Apr 1997 13:59:17 +0100
From: cyber_surfer@nospam.wildcard.demon.co.uk (Cyber Surfer)
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <MPG.daf1494ea8b61b798974a@news.demon.co.uk>

With a mighty <8gg1x7qygz.fsf@galapagos.cse.psu.edu>,
schwartz@galapagos.cse.psu.edu.NO-SPAM uttered these wise words...

> What would be the point of mentioning them?  Lisp's reputation for
> inefficiency and immiscibility with other langauges would just scare
> away people who would otherwise be turned on to a good idea.

If myths about "efficiency" - or the lack of it - were could have this 
effect, then VB would be dead. Actually, it's far from dead, even if a 
few people might wish it were otherwise.

Note that I have no strong feelings for or against VB. It's just a 
tool, and it appears to work well enough to please large numbers of 
people. The "efficiency" issue only seems to matter to people who want 
to tell you that something "can't be used for X", where X is some app 
domain that either doesn't necessarily depend on any great quality of 
efficiency, or is so specialised that few people will care.

The same is true for Lisp, and at least a dozen other languages. There 
are even people who'll tell you how unsuitable C++ is for certain 
tasks. As Bill House said, go figure. 

My attitude is simple: use whatever works for you. The details should 
be the business of only you, and whoever pays for your time. Ideally, 
even they should take no interest in what you use, but this isn't the 
case for all of us. This is what I mean by "whatever works for you".
-- 
<URL:http://www.wildcard.demon.co.uk/> You can never browse enough
  Martin Rodgers | Programmer and Information Broker | London, UK
       Please remove the "nospam" if you want to email me.


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

Date: 02 Apr 1997 08:01:50 -0700
From: Jamie Gritton <gritton@iserver.com>
Subject: Parser gets confused with '@' in strings
Message-Id: <873et9cvtt.fsf@guppy.orem.iserver.com>

   When the perl 5 parser complains about "literal @" in a string, it
gets confused by "statement if expr" forms.  The following should be
perfectly legal (and does in fact work in perl 4):

print "@d\n" if @d = (1);

   But the parser decides that @d is not yet defined and boots me out
with:

Literal @d now requires backslash at -e line 1, within string

   Note that these alternates work without a problem:

@d = (); print "@d\n" if @d = (1);

@d = (1) and print "@d\n";

-- 
James Gritton - gritton@iserver.com - I disclaim - "


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

Date: Fri, 04 Apr 1997 06:21:15 -0600
From: RFinizio@3mail.3com.com
Subject: Re: Perl CGI Problem
Message-Id: <860122842.23950@dejanews.com>

I also have been having this problem going from Netscape 3.01 to
a Digital Unix Workstation acting as the server. Please post any
answers to the newsgroup. Thanks!!

                              Bob

> I am running IIS 2.0 on NT 4.0 server and using perl 5.001 build 110 I
> believe....I am trying to run perl scripts as cgi scripts but every time
I
> go to do that the brower goes to download the requested perl file instead
> of executing it.
> Any thoughts?  The perl install did place a mapping for .pl files to the
> perl binary in the registry..

I am having the same problem.  If I find the answer I will be sure to let
you know.

--
Mitch "SKI" Duszynski
Global Information Systems Technology, Inc.

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Fri, 4 Apr 1997 06:53:35 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Michael Friendly <friendly@hotspur.psych.yorku.ca>
Subject: Re: perl data structure for a data table with dictionary
Message-Id: <Pine.GSO.3.96.970404065240.9600Y-100000@kelly.teleport.com>

On 3 Apr 1997, Michael Friendly wrote:

> I'm looking for an example of a perl data structure for keeping track
> of a data table -- a rectangular array whose columns are variables
> together with a data dictionary -- information about variable names,
> type (char/numeric), length, etc.
> 
> Can someone point me in a useful direction?

perldsc(1), and its friends. Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: Tue, 01 Apr 1997 11:34:45 +0100
From: Kevin Woolley <kjw1@stir.ac.uk>
Subject: Re: Perl, Delphi, Linux, Windows, and databases (VB5E?)
Message-Id: <3340E4C5.720C@stir.ac.uk>

Julian McDonnell wrote:
> 
> Chris Schoenfeld wrote:
> >
> >
> > Delphi wants to use Oracle, Sybase, Informix, or Interbase.
> > From what I understand, Perl has modules for some/all of these in
> > various stages of robustness.
> > NONE of these databases support Linux - GRRRR!!!
> >

I believe there's an 'unofficial' port of Oracle to Linux.  Not tried it
myself but my impression for the correspondence I've seen on usenet is
that it's not that tricky to do, but it comes with no guarentees (of
course).

Try asking in one of the Oracle newsgroups.

Kevin

-- 
************************************************************
* Kevin Woolley *              Visual Explorer             *
*               * 3D Landscape Visualization and Modelling *
*               * Home Page: http://www.woolleysoft.co.uk  *
*               * Email    : info@woolleysoft.co.uk        *
************************************************************


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

Date: Fri, 4 Apr 1997 05:59:18 -0500
From: Po-shan Chang <pchang@pigpen.cs.columbia.edu>
Subject: Perl, HTTP, CGI
Message-Id: <Pine.GSO.3.95.970404055730.400B-100000@pigpen.cs.columbia.edu>

Hi,

I am writing a cgi script in perl. I am wondering if Perl can
call HTTP protocal, or if I should ask if cgi can call HTTP?

BTW, can someone tell me where should I post the questions
about cgi?

Thanks.

Paul.



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

Date: Fri, 4 Apr 1997 12:10:05 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Perl, HTTP, CGI
Message-Id: <ebohlmanE844Gt.F0E@netcom.com>

Po-shan Chang (pchang@pigpen.cs.columbia.edu) wrote:

: I am writing a cgi script in perl. I am wondering if Perl can
: call HTTP protocal, or if I should ask if cgi can call HTTP?

1) Yes, with the appropriate modules.  See <URL:http://www.perl.com/CPAN/>.

2) CGI is a standard for how an HTTP server should talk to external 
programs and vice-versa.  A standard can't call anything.  However, 
programs written to the standard can.

: BTW, can someone tell me where should I post the questions
: about cgi?

Would you believe that it's called comp.infosystems.www.authoring.cgi?  
What a strange name!



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

Date: Fri, 04 Apr 1997 11:07:37 GMT
From: shyde@poboxes.com (Simon Hyde (aka Jeckyll))
Subject: Re: perl-based vrml builder
Message-Id: <3344dfba.1720848@news.uni-stuttgart.de>

On Fri, 04 Apr 1997 08:23:12 +0200, Detlef Huettemann
<detman@berlin.snafu.de> wrote:

>hi !
>
>Do there are any modules helping to generate vrml-worlds ?
>
Did you think to take a look on CPAN before you posted?
http://www.perl.com/CPAN/modules/by-module/VRML/ should do you fine,
i've never used it, but I've noticed it there before now


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

Date: Fri, 4 Apr 1997 05:57:06 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Anthony John Doyle <strad@mondenet.com>
Subject: Re: PERLscript with URL redirection
Message-Id: <Pine.GSO.3.96.970404055621.9600M-100000@kelly.teleport.com>

On Wed, 2 Apr 1997, Anthony John Doyle wrote:

>   i have tried some various ways with codes 300, 301, and 302
>   for the redirection but keep getting a server error - i suspect
>   i am missing something in the equation here - can someone
>   point me in the right direction?

If you're getting a server error, it's good to find out why. Check your
server's docs, a server newsgroup, or that group's FAQ. Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: Fri, 4 Apr 1997 06:15:41 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: jsykes@tartar.ulib.albany.edu
Subject: Re: Please - need help with for loop on hostname script
Message-Id: <Pine.GSO.3.96.970404061133.9600Q-100000@kelly.teleport.com>

On Thu, 3 Apr 1997 jsykes@tartar.ulib.albany.edu wrote:

> anyway, i am a new perl person, currently trying to teach myself perl
> using the excellent perl for dummies and teach yourself perl in 21 days.

I am not certain that the word "excellent" means what you think it 
means. :-) 

> can i not tell perl to create an array beginning at 111.111.111.1 and
> ending at 111.111.111.999 and to check every number in between?

How's this? (Not that the fourth octet can really run to 999, of course!)

    @my_addresses = map "111.111.111.$_", 1..999;

Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: Fri, 04 Apr 1997 15:11:29 +0200
From: Luca Passani <lpa@sysdeco.no>
Subject: Problems with objects (Odd Number of elem. in hash list)
Message-Id: <3344FE01.5044@sysdeco.no>

Hallo,

 I'm delving into the OO features of Perl5 and I'm bumpinng my head
against this strange error.

"Odd number of elements in hash list at Dialogsys.pm"

Page 581 of the latest camel reports this to no avail for me.

Here is a screendump of a debugging session followed by my class 
declaring package.
_____________________________________________________
### perl -MDialogsys -d -e '$d = Dialogsys->new; print "\n"'
Stack dump during die enabled outside of evals.

Loading DB routines from perl5db.pl patch level 0.94
Emacs support available.

Enter h or `h h' for help.

main::(-e:1):   $d = Dialogsys->new; print "\n"
  DB<1> p $d

  DB<2> n
Odd number of elements in hash list at Dialogsys.pm line 34, <IN> chunk
2.
        Dialogsys::new called at -e line 1
main::(-e:1):   $d = Dialogsys->new; print "\n"
  DB<2> p $d
HASH=HASH(0x400a40c8)
  DB<3> $d->name(luca)
Can't locate object method "name" via package "HASH" at (eval 8) line 2,
<IN> chunk 4.

  DB<4> 
______________________________________________________

file Dialogsys.pm
______________________________________________________
package Dialogsys;
use strict;

=head1 NAME

Dialogsys - Class describing a bla bla..

=head1 SYNOPSIS

    use Dialogsys;
    $diag = new;
    $name = $diag->name;
    @parts = $diag->components;

    $diag->name($name);
    $diag->components($c1, $c2, $c3);
    $diag->add_component($c1);

=head1 DESCRIPTION

bla bla cla bla...

=head1 AUTHOR

Luca Passani <lpa@sysdeco.no>

=cut

# Dialog constructor
sub new {
    my $name_or_ob = shift; #name of the class or reference to object
    my $class = ref{$name_or_ob} ||  $name_or_ob;
    my $self = {};
    $self->{NAME} = {};    #name of the dialog
    $self->{COMPONENTS} = []; #will contain the list of components
    bless($self,$class);      #making an object out of a reference
}

sub name {
    my $self = shift;
    if (@_) {
	$self->{NAME} = shift @_;
    }
    return $self->{NAME};
}

sub components {
    my $self = shift;
    if (@_) { @{ $self->{COMPONENTS} } = @_}
    return @{ $self->{COMPONENTS} };
}


sub add_component {
    my $self = shift;
    if (@_) { push(@{ $self->{COMPONENTS} }, @_);}
    return @{ $self->{COMPONENTS} };
}

1; #keeps use and require happy
__________________________________________________________

I am sorry if I'm being a bit vague about the problem, but I'm clueless
too, 
right now.

BTW What the hell is a chunk?

BTW2 is there a suggested strategy for debugging OO applications in
Perl?

thanx for attention

Luca

-- 

======================================================================
Luca Passani.          | Sysdeco AS, http://www.sysdeco.no
Email: lpa@sysdeco.no  | Trondheimsveien 184, 0570 Oslo, Norway
Tel: (+47) 22 09 66 06 | Fax: (+47) 22 09 65 03
======================================================================


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

Date: Thu, 03 Apr 1997 11:18:14 -0800
From: "Khile T. Klock" <klockk@wsadmin2.cv.hp.com>
Subject: Solid Calls
Message-Id: <33440276.2907@wsadmin2.cv.hp.com>

Howdy Ho!

  I'm looking into using perl to connect with a remote database using
the SOLID libraries which are compiled into my version of Perl. Problem
is I have NO documentation on how to make use of these routines. Does
anybody have any examples of perl code with SOLID calls?

  Does anybody have any BETTER method of connecting to remote INFORMIX
databases?

					Thanx'
					  Khile Klock

-- 
        ____    ________________________________________________________
       ___   /     __________ Khile T. Klock    Software Technician  __
      __    /          _____ FirstFab Technical Information Support __
     _     /            __  E-Mail:  klockk@wsadmin2.cv.hp.com     __
    .     __  /  __  / __  US Mail: Hewlett Packard Mailstop MOB1 __
   __    /   /  /   /  .           1000 NE Circle                __
  ____ _/  _/  ____/  _           Corvallis, OR  97330          __
 _____        /     __ Phone: 541-715-1466 Pager: 541-924-5575 __
__________  _/ _________________________________________________
WWW:http://www-b3ws.cv.hp.com/Home/klockk - http://www.klock.com


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

Date: 3 Apr 1997 14:48:33 GMT
From: rmuchala@osf1.gmu.edu (Reshma Muchalambkar)
Subject: Re: Suggestions: notation for RE lookbehind
Message-Id: <5i0g01$ukj@portal.gmu.edu>

Ilya Zakharevich (ilya@math.ohio-state.edu) wrote:
: > Lookahead is currently (?=) and (?!), make suggestions for notations
: > for positive and negative lookbehind.
: > 
: > If you suggestions are good enough, it may be even implemented some
: > time ;-).

: The intermediate winner is Tom Phoenix, with his
: 	(?<=...) and (?<!...)

Can you make (?>=...) and (?>!...) alias to the current (?=) and (?!) to 
suggest that they are lookahead?

: I doubt something better can be made :-(.

: Ilya

--
---			            -oOo-
Reshma Muchalambkar
Email: rmuchala@osf1.gmu.edu
     : rmuchala@site.gmu.edu
---				     -oOo-


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

Date: Fri, 4 Apr 1997 05:46:20 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Ilya Zakharevich <ilya@math.ohio-state.edu>
Subject: Re: Suggestions: notation for RE lookbehind
Message-Id: <Pine.GSO.3.96.970404054247.9600L-100000@kelly.teleport.com>

On 2 Apr 1997, Ilya Zakharevich wrote:

> > Lookahead is currently (?=) and (?!), make suggestions for notations
> > for positive and negative lookbehind.

> The intermediate winner is Tom Phoenix, with his
> 	(?<=...) and (?<!...)
> 
> I doubt something better can be made :-(.

I fear you're right and hope you're wrong. But no RE yet has been outlawed
due to its lack of aesthetics, try as we may.... :-)

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: 4 Apr 1997 10:38:28 GMT
From: pdcawley@aladdin.net (Piers Cawley)
Subject: Re: TPJ: Nukes
Message-Id: <5i2ln4$224$3@gunnar.aladdin.net>

In article <v67mitz0gh.fsf@colon.dev.ampersand.com>,
	Mark Atwood <zot@ampersand.com> writes:
> 
> Please tell me this story was a joke...
> 
> (In TPJ #5, "Perl and Nuclear Weapons Don't Mix", Ray F. Piodasoll
> relates that he had written real nuclear missile guidance software in
> Perl, that ultimately ended up burned into the ROMs of real nuclear
> missiles...)

I'd just like to point out that

Ray F. Piodasoll is an anagram of
April Fool's Day


-- 
Piers Cawley


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

Date: Fri, 04 Apr 1997 13:41:23 GMT
From: agruskin@melbpc.org.au (Andrew Gruskin)
Subject: Re: Using Perl with MS-Access
Message-Id: <33450457.2656304@news.melbpc.org.au>

On Tue, 01 Apr 1997 19:22:18 GMT, posenj@lancet.co.za (Kevin Posen)
wrote:

>Hi.
>
>I've been requested to use a Perl CGI script to receive data from an HTML form
>and to add this to a database maintained in MS-Access.
>
>I have no idea where to start as I haven't used Access (or any other database
>maintenance system) much at all.
>
>Any ideas?
>
I can only suggest you go for my ol' favourite, OLE Automation.

Your Win32 port of Perl will come with some documentation - try
looking for oleauto.htm.  Then have a look in the MSAccess help for
OLE Automation Server.

You can drive Access from Perl using all the VBA methods available in
Access.

IMHO, this type of Perl application is cool!



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

Date: 4 Apr 1997 11:34:50 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Where is the FAQ list?
Message-Id: <5i2p0q$e8k$2@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, 
    Allen May <allenm@lexis-nexis.com> writes:
:I just picked up the camel book and there is a reference to
:a FAQ on comp.lang.perl.misc.  I didn't see it listed here...
:I whent to www.perl.com/perl/faq and didn't have much luck.
:Can someone re-post it so I can take a look?

You should have found it at the URL above.  You can also
try these:

    http://www.perl.com/CPAN/doc/manual/html/pod/perlfaq.html
    http://www.perl.org/CPAN/doc/manual/html/pod/perlfaq.html

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com


I'm not writing any more tapes, ever.  --Andrew Hume


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

Date: Fri, 04 Apr 1997 07:21:34 -0600
From: mikee@spindle.net
Subject: Win32 DDE module?
Message-Id: <860158792.7192@dejanews.com>

I'm trying to send commands (keystrokes) from a perl script into a
windows application and for all I know about windows (not much :) this
must be done through DDE, so I'm looking for a perl DDE module.

Is this the right way to do what I need?
Is there a DDE module available?
Is there another way to do what I need?

TIA

Mike

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.  

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

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