[9892] in Perl-Users-Digest
Perl-Users Digest, Issue: 3485 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 19 17:07:30 1998
Date: Wed, 19 Aug 98 14:00:26 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 19 Aug 1998 Volume: 8 Number: 3485
Today's topics:
CGI Editng and posting on the fly stabor548@my-dejanews.com
Re: CGI Editng and posting on the fly (Steve Linberg)
changing parents environment <pwhst+@pitt.edu>
Re: COBOL and Perl <jdporter@min.net>
Re: COBOL and Perl <jdporter@min.net>
Re: COBOL and Perl <jdporter@min.net>
Re: COBOL and Perl (Michael J Gebis)
Re: creating a nt service with perl <kingm@vmicro.com>
Dumb Windows Question <rlosee@unlinfo.unl.edu>
Re: example for sending mail with perl under win32 (Steve Linberg)
Re: How do I execute perl from html program (Josh Kortbein)
Re: how to handle a plsql table returned by a stored pr (Steve Linberg)
Re: Javascript becoming quite similar to perl <yong@shell.com>
Re: Kermit Speaks (Steve Linberg)
Re: Last_modified (help with configureing date output) (Steve Linberg)
newbie to CGI and WWW using Perl <gt1900b@prism.gatech.edu>
Re: newbie to CGI and WWW using Perl (Steve Linberg)
Passing data from HTML to a Perl Script <stewart@xcs.com.au>
Re: Period.pm or any other time module <anthony@nc.com>
Re: Perlis.dll and SSI (Martin Vorlaender)
Re: printf question - newbie <barnett@houston.Geco-Prakla.slb.com>
Re: printf question - newbie <jdw@dev.tivoli.com>
Protecting a data struc with local or my? <mmurdock@mail.Globalserve.net>
Re: Protecting a data struc with local or my? (Craig Berry)
Re: Recommend a good editor (Blake Hyde)
Re: Recommend a good editor rkprasad@my-dejanews.com
Re: request for comments... droby@copyright.com
Re: request for comments... <sneaker@sneex.fccj.org>
Re: request for comments... (Michael J Gebis)
Samba anyone??? rkprasad@my-dejanews.com
The @INC path <knguyen@ab.bluecross.ca>
Re: Very newbie question (Steve Linberg)
Re: Why dont people read the FAQs <murrayb@vansel.alcatel.com>
Win 32: passing parameters as STDIN ? <rdmacmillan@hotmail.com>
Re: wtf is the obsession with "foo" and "bar" <dan@fearsome.net>
Re: wtf is the obsession with "foo" and "bar" (Craig Berry)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 19 Aug 1998 18:48:48 GMT
From: stabor548@my-dejanews.com
Subject: CGI Editng and posting on the fly
Message-Id: <6rf6mg$554$1@nnrp1.dejanews.com>
Hello, Let me start by saying That I am making a web site for concert hall,
What I want to happen is, That a user can input there Ticket #, than it iwll
look it up and give back y and x cordiates on a picture, The picture being
the seating chat of the hall, and the cordinates being where the seat is
located on that picture... Than I red dot to be placed on the cordinates..
Than the image regenerated and displayed showing the users exect seat
location.. I hope I explained my self enough.... Please help me out, I
would very much apreachate it... Please e-mail stabor@gfn.org
Thank you much
Scott Tabor
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 19 Aug 1998 15:48:20 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: CGI Editng and posting on the fly
Message-Id: <linberg-1908981548200001@projdirc.literacy.upenn.edu>
In article <6rf6mg$554$1@nnrp1.dejanews.com>, stabor548@my-dejanews.com wrote:
> Hello, Let me start by saying That I am making a web site for concert hall,
> What I want to happen is, That a user can input there Ticket #, than it iwll
> look it up and give back y and x cordiates on a picture, The picture being
> the seating chat of the hall, and the cordinates being where the seat is
> located on that picture... Than I red dot to be placed on the cordinates..
> Than the image regenerated and displayed showing the users exect seat
> location.. I hope I explained my self enough.... Please help me out, I
> would very much apreachate it... Please e-mail stabor@gfn.org
What kind of help are you looking for? Are you asking for someone to
write this script for you? Do you have a partial script with bugs or
problems?
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Wed, 19 Aug 1998 16:12:54 -0400
From: "Paul W. Hanbury, Jr." <pwhst+@pitt.edu>
Subject: changing parents environment
Message-Id: <Pine.GSO.3.96L.980819155525.20620C-100000@unixs-eval.cis.pitt.edu>
Is it possible (in a unix environment) to change the value of a
variable in the shell.
It seems kinda dopey to source a file that says
if ( myscript >/dev/null ) then ## runs myscript for return value
## myscript is a perl script and I don't like running it twice
setenv MYVAR "`myscript`" ## sets MYVAR to output of myscript
else
unset MYVAR ## but unsets MYVAR if appropriate
endif
So, what I want to know is, "Can I set an environment variable and send it
back to the shell from within my perl script??"
------------------------------
Date: Wed, 19 Aug 1998 15:15:33 -0400
From: John Porter <jdporter@min.net>
Subject: Re: COBOL and Perl
Message-Id: <35DB2455.1579@min.net>
DavidM wrote:
>
> IBM will very soon allow COBOL to do everything that JAVA can.
It's "Java", for the capslock-impaired out there.
--
John Porter
------------------------------
Date: Wed, 19 Aug 1998 15:53:02 -0400
From: John Porter <jdporter@min.net>
Subject: Re: COBOL and Perl
Message-Id: <35DB2B55.40FE@min.net>
DavidM wrote:
>
> Abigail wrote:
> >
> > Well, you can always write equivalent programs in Perl.
> >
> You absolutely CANNOT write all COBOL programs in PERL.
> PERL has no equivalent to many of COBOL features.
Having certain features in a language A and not in language B
doesn't mean that equivalent programs cannot be written in
the two languages, even if those special features are used.
Where feature X might be used directly (and succintly) in the
language A program, it might require building up from more
primitive language features in the language B program.
So the challenge for you is to come up with a program in COBOL
for which you think no equivalent Perl program can be written.
Use unique features of COBOL, if necessary.
One positive example will vindicate you.
> > ++ I saw a thread in comp.lang.cobol where someone indicated that
> > ++ a three page COBOL program could be rewritten in AWK in five
> > ++ lines, so I wonder if this might be the same with Perl.
>
> Impossible.
No, not impossible. Apocryphal, perhaps; irrelevant, maybe.
But do you doubt that Perl has features which COBOL lacks?
And which would thus require substantial building up from more
primitive language constructs, in COBOL?
Does COBOL have a regular expression engine? (I don't know.)
How powerful is it?
> Can you dynamically call subroutines in Perl?
> Can you do SORT's in PERL?
> Can PERL use different collating sequences?
> Can you write CICS programs in PERL?
> Can you write IMS programs in PERL?
I assume you don't know Perl, or these would have been statements,
not questions.
. What do you mean, exactly, by "dynamically call" a subroutine?
To call a subroutine, but which one is determined at run-time?
Perl can do this. Let me ask you: does COBOL support the
notion of closures? Or partial evaluation? Or continuations?
. Is a SORT an operation to reorder the elements of a
list/array/vector? If so, then I refer you to the Perl
intrinsic function 'sort', which does exactly that.
As for collating sequences, Perl's sort can be made to sort
according to any arbitarily complex comparison/ordering
function.
. re CICS and IMS: if a C language binding exists for these
(or any other) environments/packages, a Perl interface to
them can be made. The only other necessary thing is for a
Perl binary to exist in that environment. Given these two
thing, can you think of anything else which would preclude,
in your professional estimation, the use of Perl with those
environments/packages?
FYI, modules for Perl to interface with the following database
systems have been released to the public, and more are
under development:
Altera DB2
Documentum EDMS Faircom's CTREE+, DTREE
Fame Fulcrum SearchServer
Informix QBase
Solid Ingres
Sybase Datascope
Lotus Notes Msql
Mysql ObjectStore
Postgres Stanza
Xbase
--
John Porter
------------------------------
Date: Wed, 19 Aug 1998 15:59:02 -0400
From: John Porter <jdporter@min.net>
Subject: Re: COBOL and Perl
Message-Id: <35DB2DDA.16C7@min.net>
John Porter wrote:
>
> Altera DB2
> Documentum EDMS Faircom's CTREE+, DTREE
> Fame Fulcrum SearchServer
> Informix QBase
> Solid Ingres
> Sybase Datascope
> Lotus Notes Msql
> Mysql ObjectStore
> Postgres Stanza
> Xbase
Oracle too.
(I had it in there; but my editor must have eaten it.)
--
John Porter
------------------------------
Date: 19 Aug 1998 19:52:22 GMT
From: gebis@fee.ecn.purdue.edu (Michael J Gebis)
Subject: Re: COBOL and Perl
Message-Id: <6rfadm$3qd@mozo.cc.purdue.edu>
John Porter <jdporter@min.net> writes:
}DavidM wrote:
}> IBM will very soon allow COBOL to do everything that JAVA can.
}It's "Java", for the capslock-impaired out there.
Just when I thought there wasn't anything lamer than posting spelling
corrections.
ObPerl: And yes, I don't understand csh-style quoting, so this is
probably uglier than it needs to be:
# doh = Decimal Octal Hex
alias doh 'perl -e "while("\$_"=shift){"\$_"=oct if/^0/;printf qq/%8.1d %.10o 0x%.8X\n/,"\$_,\$_,\$_";}"'
ObCobol: Um..did you hear the one about the cobol programmer and the
green golf ball?
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: Wed, 19 Aug 1998 13:44:41 -0700
From: "Michael A. King" <kingm@vmicro.com>
Subject: Re: creating a nt service with perl
Message-Id: <35db39bf.0@news.vmicro.com>
Use the instsrv.exe and srvany.exe that come with the Windows NT Resource
kit to install any program (including a PERL app) as a service.
It goes something like this -- go into the directory where your perl code
is:
c:\path to file\instsrv YOURPERLCODENAME c:\path to file\srvany.exe
Then, start Registry Editor and look for:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\YOURPERLCODENAME
Select Edit, New, Key and create a "Parameters" key.
Select Edit,New,String Value and create the following keys:
Application c:\perl\bin\perl.exe
AppParameters c:\path to file\yourperlcode.pl
AppDirectory c:\path to file
Then go to the Control Panel, Services. Find YOURPERLCODENAME, select it,
and click on Startup. Make the Startup type AUTOMATIC and make Log On As:
administrator (or another user with comparable access).
That's the way to do it!
--Michael King
--VM Online / VM2000
--Temecula, CA USA
Brett Lawrence wrote in message
<903535551.29596.0.nnrp-06.c3ad0896@news.demon.co.uk>...
>Hi
>Can anybody tell me if you can create a service for nt using perl?
>If so could you point me to some information on how to do this.
>
>
>Thanks Brett
>
>
>
------------------------------
Date: Wed, 19 Aug 1998 15:39:51 -0500
From: Robert Losee <rlosee@unlinfo.unl.edu>
Subject: Dumb Windows Question
Message-Id: <35DB3816.68EDEEAB@unlinfo.unl.edu>
Maybe I'm dumb, or maybe Windows. I'm hoping you can tell me.
I've associated the .pl extensions with perl.exe by going to "My
Computer" --> "View" --> "File Options" --> "File Types" --> "New Type"
--> putting .pl in the associated extension --> making a new Open action
that then runs the perl.exe.
I guess it all works OK but I can't tell because the window it executes
in closes immediately. How do I keep it open after the execution? In
OS/2 I would have right clicked the perl.exe and in one minute have
associated the files and kept the window open. I can't figure out how
it's done in Windows. Is there some option I can put in the action line?
Thanks for you help.
Bob Losee
------------------------------
Date: Wed, 19 Aug 1998 15:55:09 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: example for sending mail with perl under win32
Message-Id: <linberg-1908981555090001@projdirc.literacy.upenn.edu>
In article <35DB1712.3182BE68@informatik.uni-marburg.de>, "K.Posern"
<posern@informatik.uni-marburg.de> wrote:
> Hi.
>
> I am hardly interested in an example, how to send a short email with
> perl under a win32-System by direct connecting to the mailhost and using
> the SMTP-Protokoll-commands.
"sehr interresiert," nicht "wenig interresiert," ja? :)
(Unschuldigungen, ich spreche nur Shei_deutch...)
Check the source of form2mail.pl at http://www.liquidsilver.com/scripts
for an example of one way to do this.
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: 19 Aug 1998 20:47:05 GMT
From: kortbein@iastate.edu (Josh Kortbein)
Subject: Re: How do I execute perl from html program
Message-Id: <6rfdk9$sce$1@news.iastate.edu>
Todd Smith (tbsmith@viper.net) wrote:
: where you want the script's output, put
: <!--exec cmd="script.pl" -->
: guys- just answer the question!
Given that SSI isn't available everywhere, and need not be enabled
even if it is installed at a site, yours wasn't much of an answer anyway.
Josh
--
"The best students always are flunking. Every good teacher knows that."
-Robert Pirsig, Zen and the Art of Motorcycle Maintenance
------------------------------
Date: Wed, 19 Aug 1998 15:57:10 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: how to handle a plsql table returned by a stored procedure
Message-Id: <linberg-1908981557100001@projdirc.literacy.upenn.edu>
In article <TDEC1.430$nY4.178061359@newsreader.digex.net>, "Padma
Junuthula" <pjunuthula@hq.caci.com> wrote:
> I wrote a stored procedure which returns a pl/sql table. My question is how
> to access pl/sql table in perl using dbi. thanks for any responses
Perhaps you can be a little more specific in your question; you have read
the DBI documentation that is installed with your version of Perl, I
assume? If a driver exists for pl/sql (not familiar with it myself),
there should be examples on your system. If not, my apologies and ignore
this message.
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Wed, 19 Aug 1998 13:42:48 -0500
From: Yong Huang <yong@shell.com>
Subject: Re: Javascript becoming quite similar to perl
Message-Id: <35DB1CA8.A38D1B17@shell.com>
The Web site you pointed to says taint and untaint are not implemented any more
in Navigator 4. The for (i in fooObj) is only implemented in Navigator 2.0 and
LiveWire 1.0. The function "unshift" is not found in there. Do you suggest they
are new features? I don't know whether it's because that Netscape article is
plain wrong.
Yong Huang
Email:yong@shell.com
------------------------------
Date: Wed, 19 Aug 1998 15:44:02 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Kermit Speaks
Message-Id: <linberg-1908981544020001@projdirc.literacy.upenn.edu>
In article <6r7055$sl6$1@strato.ultra.net>, sowmaster@juicepigs.com (Bob
Trieger) wrote:
> Kermit is Hitler. (hoping this still works.)
Nice try! ;) It never seems to work for me anymore.
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Wed, 19 Aug 1998 15:50:09 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Last_modified (help with configureing date output)
Message-Id: <linberg-1908981550090001@projdirc.literacy.upenn.edu>
In article <35DB1FBF.DD8FEDD9@ix.netcom.com>, Jeff Litwiller
<jeffinfl@ix.netcom.com> wrote:
> I have been struggling with this but have not found the answer. I want
> to configure how the date is displayed when I ask for LAST_MODIFIED. I
> am able to configure the date when I put it in as a SSI :
> <!--#config timefmt="%A, %B %e %Y %I:%M %p"-->
> <!--#echo var="LAST_MODIFIED"-->
> The first part configures my date output.
> Now I want to do that in a cgi with a page count and call it through SSI
> like :
> <!--#exec cgi="/cgi-bin/count_lstmod.cgi"-->
> The best answer so far was :
> #!/usr/bin/perl
>
> require "ctime.pl";
>
> $last_updated = &ctime (time);
> print "Last updated $last_updated\n";
>
> It prints out a easier to read date and time.
>
> Please post and email me with an answer.
What's the problem with the answer you were given?
You understand that #config and #echo are webserver process that have
nothing to do with Perl, right?
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Wed, 19 Aug 1998 15:21:59 -0400
From: "News groups" <gt1900b@prism.gatech.edu>
Subject: newbie to CGI and WWW using Perl
Message-Id: <6rf8gq$kjl$1@news-int.gatech.edu>
This is a multi-part message in MIME format.
------=_NextPart_000_0019_01BDCB85.1BFD0EA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I'm new to CGI and web stuff using Perl, and for some reason my =
guestbook won't A:) print out the entries that have been made or B:) =
display any images. The guestbook page is at =
http://baker323e.gtri.gatech.edu/cgi-bin/guestbook.pl (the coding for =
the script is at http://baker323e.gtri.gatech.edu/guestbook.txt)=20
------=_NextPart_000_0019_01BDCB85.1BFD0EA0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>I'm new to CGI and web stuff using =
Perl, and for=20
some reason my guestbook won't A:) print out the entries that have been =
made or=20
B:) display any images. The guestbook page is at <A=20
href=3D"http://baker323e.gtri.gatech.edu/cgi-bin/guestbook.pl">http://bak=
er323e.gtri.gatech.edu/cgi-bin/guestbook.pl</A>=20
(the coding for the script is at <A=20
href=3D"http://baker323e.gtri.gatech.edu/guestbook.txt">http://baker323e.=
gtri.gatech.edu/guestbook.txt</A>)=20
</FONT></DIV></BODY></HTML>
------=_NextPart_000_0019_01BDCB85.1BFD0EA0--
------------------------------
Date: Wed, 19 Aug 1998 16:04:16 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: newbie to CGI and WWW using Perl
Message-Id: <linberg-1908981604160001@projdirc.literacy.upenn.edu>
In article <6rf8gq$kjl$1@news-int.gatech.edu>, "News groups"
<gt1900b@prism.gatech.edu> wrote:
> This is a multi-part message in MIME format.
Please don't post to Usenet in MIME. It's practically unreadble. Please
fix your newsreader.
> I'm new to CGI and web stuff using Perl, and for some reason my =
> guestbook won't A:) print out the entries that have been made or B:) =
> display any images. The guestbook page is at =
> http://baker323e.gtri.gatech.edu/cgi-bin/guestbook.pl (the coding for =
> the script is at http://baker323e.gtri.gatech.edu/guestbook.txt)=20
I assume your question is "why doesn't it work?" Without spending lots of
time digging into the source, I'd suggest using CGI.pm instead of
CGI-lib.pl, which is archaic and falling into disuse. No idea if
ActiveState 5.005 supports it anymore.
May be off-base, but that's where I'd start. Rewrite it using CGI.pm.
I'd say there's an 80% chance your problem is related to that.
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Thu, 20 Aug 1998 06:14:13 +1000
From: "Stewart Pitt" <stewart@xcs.com.au>
Subject: Passing data from HTML to a Perl Script
Message-Id: <903557792.349446@kermit.netlink.com.au>
Folks
sorry if this is duplicate posting I could not find the first
I am new to Perl & CGI. The task I want to complete is to pass data from an
HTML document (that is not a form) to my Perl CGI script.
Is this possible if so how do I accomplish it.
Thanx
Stewart vandenBerg-Pitt
stewart@xcs.com.au
X-IT Computer Services P/L
------------------------------
Date: Wed, 19 Aug 1998 12:30:49 -0700
From: Anthony Lee-Masis <anthony@nc.com>
Subject: Re: Period.pm or any other time module
Message-Id: <35DB27E9.552CFF2A@nc.com>
This is a multi-part message in MIME format.
--------------E647703E02836C9B5521BE3B
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Thanks all for your suggestions !! I will give it a shot : )
Jim Woodgate wrote:
> Anthony Lee-Masis <anthony@nc.com> writes:
> > I have a problem i hope you can help with. I need to somehow find out if
> > a certain day falls within a period of a week or 2 weeks.
> >
> > Example given the range 7/2/98 - 7/19/98
> > Now given the date 7/14/98 , does this date fall within the range. I
> > need to find out how to do that. I poked around CPAN and found a module
> > called Period.pm and have tried to implement that. The closest i could
>
> Using Time::Local, you could compute time for each date, then simply
> compare the time values. (I didn't check Time::Local very closely,
> but I'm guessing you have to subtract one from the month)
>
> use Time::Local;
>
> my $start_period = timelocal (0, 0, 0, 2, 6, 98);
> my $stop_period = timelocal (0, 0, 0, 19, 6, 98);
>
> my $check_date = timelocal (0, 0, 0, 14, 6, 98);
>
> if ( $check_date >= $start_period &&
> $check_date <= $stop_period ) {
> # insert code here...
> }
>
> --
> Jim Woodgate
> Tivoli Systems
> E-Mail: jdw@dev.tivoli.com
>
--------------E647703E02836C9B5521BE3B
Content-Type: text/x-vcard; charset=us-ascii;
name="alee.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Anthony Lee-Masis
Content-Disposition: attachment;
filename="alee.vcf"
begin:vcard
n:Lee-Masis;Anthony
x-mozilla-html:TRUE
org:Network Computer Inc.
adr:;;;Redwood Shores;CA;94065;USA
version:2.1
email;internet:anthony@nc.com
title:Technical Support Engineer
x-mozilla-cpt:;0
fn:Anthony Lee-Masis
end:vcard
--------------E647703E02836C9B5521BE3B--
------------------------------
Date: Wed, 19 Aug 1998 20:22:45 +0200
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: Perlis.dll and SSI
Message-Id: <35db17f5.524144494f47414741@radiogaga.harz.de>
wlchai (wlchai@watercolours.com) wrote:
: I am runing my perl script using perlis.dll which execute .plx files. I need
: to run a perl script which required Server Side Incuded environmemt and i
: had problems, the eror are as below
: HTTP/1.1 200 OK Date: Wed, 19 Aug 1998 07:33:37 GMT Server:
: Microsoft-IIS/4.0 Content-type: text/html
: 'E:\InetPub\wwwroot\Tan\cgi-bin\banner2\ad.shtml' script produced no output
The meaning of this error message is "something has gone wrong" ;-)
You could
- perl -c yourscript
to find out whether your script is syntactically correct.
- use CGI::Carp qw(fatalsToBrowser);
near the top of your script to have run-time errors show up in the
browser.
cu,
Martin
--
| Martin Vorlaender | VMS & WNT programmer
OpenVMS: Where do you | work: mv@pdv-systeme.de
want to BE today? | http://www.pdv-systeme.de/users/martinv/
| home: martin@radiogaga.harz.de
------------------------------
Date: Wed, 19 Aug 1998 14:36:24 -0500
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
Subject: Re: printf question - newbie
Message-Id: <35DB2938.B570D76E@houston.Geco-Prakla.slb.com>
horseyride@hotmail.com wrote:
>
> Whats the proper way to replace the leading spaces from the %10s with leading
> zeroes?
>
> printf log2 "%10s","$count";
>
> I read the FAQ. I read the FM. Maybe I'm just dumb.
perhaps
printf log2 "%010s", "$count";
would provide you what you wanted?
perldoc -f sprintf
provides information regarding the formats available. See the section
that starts with:
Perl permits the following universally-known flags between the C<%>
and the conversion letter:
Cheers,
Dave
--
Dave Barnett Software Support Engineer (281) 596-1434
"Security through obscurity is no security at all."
-- comp.lang.perl.misc newsgroup posting
------------------------------
Date: 19 Aug 1998 13:02:42 -0500
From: "Jim Woodgate" <jdw@dev.tivoli.com>
Subject: Re: printf question - newbie
Message-Id: <obww84j1dp.fsf@alder.dev.tivoli.com>
horseyride@hotmail.com writes:
> Whats the proper way to replace the leading spaces from the %10s with leading
> zeroes?
>
> printf log2 "%10s","$count";
you probably want printf log2 "%010d", $count; (assuming $count is a
number), but printf log2 "%010s", $count; did work for me as well.
you might want to see if your system has a man page for
printf/sprintf, where it would explain all the "features" of format.
--
Jim Woodgate
Tivoli Systems
E-Mail: jdw@dev.tivoli.com
------------------------------
Date: Wed, 19 Aug 1998 15:52:33 -0400
From: Matt Murdock <mmurdock@mail.Globalserve.net>
Subject: Protecting a data struc with local or my?
Message-Id: <35DB2D00.BA634040@mail.Globalserve.net>
I have a program which repeatedly passes a complex data structure to
a subroutine by reference. The struc is essentially a list of hashes of
arrays. The subroutine needs to check the 'defined'ness of the arrays
referenced by the hash keys. It seems that in so doing the hash keys
are created. The next time the structure is passed to the sub, the once
undefined hash keys are suddenly defined! How can I avoid this
behaviour? For example:
sub mySub {
my $searchStruc_ref = shift;
# Have also tried: 'local $searchStruc_ref = shift'
# Several statements which determine the 'defined'ness of references
if (defined @{ $searchStruc_ref->[1]{'Optional'}) {
...
}
}
# Build the data structure
@search = (
{ # First list element
},
{ # Second list element
# Hash may contain 'Required', 'Optional', or 'Forbidden'
keys
Required => [ "term1", "term2" ]
}
);
# At this time, @search[0] does not have any hash keys,
# @search[1]{'Optional'} does not exist, or does {'Forbidden'}
$my_condition = 'true';
while ($my_condition) {
mySub( \@search );
}
# Now @search[1]{'Optional'} is suddenly defined!!
Obviously the code above is less than complete, but the problem should
be evident! (I hope!)
Any suggestions are welcome!
Matt
------------------------------
Date: 19 Aug 1998 20:05:53 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Protecting a data struc with local or my?
Message-Id: <6rfb71$8ah$3@marina.cinenet.net>
Matt Murdock (mmurdock@mail.Globalserve.net) wrote:
: I have a program which repeatedly passes a complex data structure to
: a subroutine by reference. The struc is essentially a list of hashes of
: arrays. The subroutine needs to check the 'defined'ness of the arrays
: referenced by the hash keys. It seems that in so doing the hash keys
: are created. The next time the structure is passed to the sub, the once
: undefined hash keys are suddenly defined! How can I avoid this
: behaviour?
Use 'exists' to check for the existence of the key, and iff it exists
proceed to check for the defined-ness of its value. E.g,
if (exists $myhash{foo} && defined $myhash{foo}) {
...
}
Thanks to short-circuiting, if $myhash{foo} doesn't exist, the second part
won't be evaluated, and $myhash{foo} won't spring into existence.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: Wed, 19 Aug 1998 19:52:03 GMT
From: oulqr@pbaarpgh.arg (Blake Hyde)
Subject: Re: Recommend a good editor
Message-Id: <D1GC1.191$Cr4.2598212@ralph.vnet.net>
On 19 Aug 1998 11:58:07 GMT, scott@softbase.com (scott@softbase.com) dared to utter:
>Zenin (zenin@bawdycaste.org) wrote:
>> scott@softbase.com wrote:
>> : Since this thread has degenerated into naming editors at random, I have
>> : to mention Multi-Edit, my favorite: although it is a commercial
>> : product, it is only $100, and has many important features that make it
>> : worth the price. The main one is printing support, which Emacs and
>> : probably none of the other UNIX ports have in Windows. (Yes, I am aware
>> : Emacs can generate PS files, but printing those is convoluted and
>> : certainly not as good as File/Print....)
>
>> Convoluted? Does emacs not have a simple way to pipe that
>> output (postscript, text, or otherwise) into lpr...?
>
>Remember, we're talking about Windows. There is no lpr.
No, but there is a prn. In vim, for instance, you can print the
text of the current file by doing this:
:w
:!type filename.txt > prn
This will save the file, and then copy it to the printer (prn). I
believe that in pre-7.0 DOS versions, it was lpt1, though I can't
remember whether prn worked..
HTH.
--
Blake Hyde (ROT13: oulqr@pbaarpgh.arg)
-==(UDIC)==-
Novan Dragon
--------------
d+ e- N+ T--- Om-- U1347'!S'8!K u uC++ uF uG++ uLB+ uA nC+ nR nH- nP nI--
nPT nS+ nT wM wC+ wS- wI++ wN- o oA++ y a666
--------------
------------------------------
Date: Wed, 19 Aug 1998 20:34:23 GMT
From: rkprasad@my-dejanews.com
Subject: Re: Recommend a good editor
Message-Id: <6rfcsf$d6t$1@nnrp1.dejanews.com>
> > What could be better than emacs?
I heard of an Editor called "samba" that has the look and feel of a windows
based IDE but resides in UNIX..
Can anyone throw some light on this?
thanks,
ram prasad
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 19 Aug 1998 19:30:39 GMT
From: droby@copyright.com
Subject: Re: request for comments...
Message-Id: <6rf94v$8fl$1@nnrp1.dejanews.com>
In article <6rcq56$5cr$1@pegasus.csx.cam.ac.uk>,
mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote:
> Bill Jones, FCCJ Webmaster <bill@astro.fccj.cc.fl.us> wrote:
> > $first = (((rand(time)) >> (11 + 1 - 8)) & ~(~0 << 7));
> ^^^^
>
> What's all this nonsense? time() can't ever be a sensible argument to
> rand().
>
Sure it can, if you're looking for a random moment in time since the epoch.
The interesting question is whether this odd computation generates better
pseudo-random pairs of alphanumerics than simply choosing a pair of
pseudo-random numbers from 1 to 62 (by more standard use of rand), and mapping
to the character set. Or if you like, choosing a single pseudo-random number
from 1 to 62**2 and mapping to the square of the set.
The answer: I doubt it, though I'm not sure I can mathematically justify my
doubt. Perhaps Abigail will analyze this...
I give points for obfuscation of constants though. I would have just used 4
and 127 instead of dreaming up these interesting expressions.
--
Don Roby
<droby@copyright.com>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 19 Aug 1998 16:28:49 -0400
From: Bill 'Sneex' Jones <sneaker@sneex.fccj.org>
Subject: Re: request for comments...
Message-Id: <35DB3581.A75FB436@sneex.fccj.org>
droby@copyright.com wrote:
>
> In article <6rcq56$5cr$1@pegasus.csx.cam.ac.uk>,
> mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote:
> > Bill Jones, FCCJ Webmaster <bill@astro.fccj.cc.fl.us> wrote:
> > > $first = (((rand(time)) >> (11 + 1 - 8)) & ~(~0 << 7));
> > ^^^^
> >
> > What's all this nonsense? time() can't ever be a sensible argument to
> > rand().
> >
>
> Sure it can, if you're looking for a random moment in time since the epoch.
>
> The interesting question is whether this odd computation generates better
> pseudo-random pairs of alphanumerics than simply choosing a pair of
> pseudo-random numbers from 1 to 62 (by more standard use of rand), and mapping
> to the character set. Or if you like, choosing a single pseudo-random number
> from 1 to 62**2 and mapping to the square of the set.
>
> The answer: I doubt it, though I'm not sure I can mathematically justify my
> doubt. Perhaps Abigail will analyze this...
>
> I give points for obfuscation of constants though. I would have just used 4
> and 127 instead of dreaming up these interesting expressions.
>
> --
> Don Roby
> <droby@copyright.com>
:] A small follow-up -
The Right and Left shifting is something from an old
Programming C book (1978 or so) and the operation was to
return the requested 'masked' bits, the code fragment
was called 'getbits'.
However, I have found it does return some interesting
starting salt combos, but no, not completely random.
There's been talk in the past and recently about generating
passwords, et al, I thought I would try to put that question
to rest for at least another month or two...
:]
-Sneex-
__________________________________________________________________
Bill Jones | FCCJ Webmaster | USENET would be a better laboratory
if there were more labor and less oratory. -- Elizabeth Haley
------------------------------
Date: 19 Aug 1998 20:34:12 GMT
From: gebis@fee.ecn.purdue.edu (Michael J Gebis)
Subject: Re: request for comments...
Message-Id: <6rfcs4$4n2@mozo.cc.purdue.edu>
droby@copyright.com writes:
}> > $first = (((rand(time)) >> (11 + 1 - 8)) & ~(~0 << 7));
}> ^^^^
}Sure it can, if you're looking for a random moment in time since the epoch.
}The interesting question is whether this odd computation generates better
}pseudo-random pairs of alphanumerics than simply choosing a pair of
}pseudo-random numbers from 1 to 62 (by more standard use of rand), and mapping
}to the character set. Or if you like, choosing a single pseudo-random number
}from 1 to 62**2 and mapping to the square of the set.
}The answer: I doubt it, though I'm not sure I can mathematically justify my
}doubt. Perhaps Abigail will analyze this...
Write out the bitstrings for 0x0 - 0xF. Are the bits evenly
distributed? (In other words, did you write as many "0"s as "1"s?)
Yup.
Now, write out the bitsrings for 0x0 - 0x9. Are the bits evenly
distributed? Nope. Just look at the three lower-order bits. Are
they evenly distributed? Nope. How about the two lower-order bits.
Nope. How about just the lowest bit? Well, yes, it's half 0's and
half 1's, but I've got a 50% chance of that happening.
You've got to be very careful when generating random bits.
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: Wed, 19 Aug 1998 20:40:44 GMT
From: rkprasad@my-dejanews.com
Subject: Samba anyone???
Message-Id: <6rfd8c$dqc$1@nnrp1.dejanews.com>
Has anyone heard about "samba"? I believe it is an Unix editor but with a
IDE look..Any info on this is very much appreciated.
thanks ,
rkp
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 19 Aug 1998 14:28:17 -0600
From: Ky Nguyen <knguyen@ab.bluecross.ca>
Subject: The @INC path
Message-Id: <35DB3561.5FED16FE@ab.bluecross.ca>
Hello all,
After installing Perl5, DBD-Oracle-0.46, DBI-0.88, I ran a test:
$ perl bind.pl # simple lookup program
And it had the following error msg:
Can't locate DynaLoader.pm in @INC (@INC contains:
/opt/perl5/lib/PA-RISC1.1/5.0
0404 /opt/perl5/lib /opt/perl5/lib/site_perl/PA-RISC1.1
/opt/perl5/lib/site_perl
.) at /opt/perl5/lib/site_perl/DBI.pm line 141.
BEGIN failed--compilation aborted at /opt/perl5/lib/site_perl/DBI.pm
line 141.
BEGIN failed--compilation aborted at /opt/perl5/lib/site_perl/Oraperl.pm
line 25
.
BEGIN failed--compilation aborted at (eval 1) line 1.
Well, the problem is there is /opt/perl5/lib/PA-RISC1.1/5.004 but we
dont have
/opt/perl5/lib/PA-RISC1.1/5.00404
1. Could someone pls tell me how could the extra "04" possibly got to
the @INC
path? This will help me to determine whether I should reinstall or patch
the
some files.
2. My 2nd question is how do I change @INC path? I looked into
Oraperl.pm
DBI.pm and didnt see obvious clue.
Thanks in advance!
------------------------------
Date: Wed, 19 Aug 1998 15:51:46 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Very newbie question
Message-Id: <linberg-1908981551470001@projdirc.literacy.upenn.edu>
In article <6rf5sc$mgb@news.euro.net>, "Mr. Molotov" <molotov@gmx.net> wrote:
> Hi,
>
> I'm really new to Perl, just installed ActivePerl 5.02, but with the online
> documentation, all the examples fail (don't show anything that shows that
> Perl works)... I'm using Win98 (so the browser is IE4.0). Please? Can
> someone help me out? Thanks!
>From the command line, type:
c\> perl -v
You should get information about the version of Perl you have installed.
If it doesn't work, it isn't installed correctly. (Check your path, etc,
reinstall if necessary.) If it does, everything's fine as far as Perl
goes, and your question needs to be more refined: what exactly doesn't
work?
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: 19 Aug 1998 12:14:51 -0700
From: Brad Murray <murrayb@vansel.alcatel.com>
Subject: Re: Why dont people read the FAQs
Message-Id: <u7m04aims.fsf@vansel.alcatel.com>
cberry@cinenet.net (Craig Berry) writes:
> This is a great example of my favorite regex hint: If specifying what you
> *do* want is getting too complicated, give specifying what you *don't*
> want a try, and vice versa; it's often the case that one is a lot easier
> than the other.
A related technique occurs whenever you're trying to get at a backreference
that is particularly cumbersome: sometimes split will do the job painlessly.
--
A picture is only worth a thousand words. Language is worth
all of the words. Hieroglyphics and pictograms are obsolete
for a reason.
Brad Murray -*- Software Analyst -*- Alcatel Canada
------------------------------
Date: Wed, 19 Aug 1998 16:47:39 -0300
From: Richard <rdmacmillan@hotmail.com>
Subject: Win 32: passing parameters as STDIN ?
Message-Id: <35DB2BDA.7E2FE60B@hotmail.com>
Hi,
I am running a perl cgi script which accepts input from a hyperlink such
as
http://apollo/cgi-bin/locate.pl?k2-seat-1
where k2-seat-1 is obviously the desired input.
The perl script looks like this:
$in = <STDIN>;
print "HTTP/1.0 200 OK\n";
print "Content-type: text/html\n\n";
print "<APPLET code=\"imgexp3_try.class\">\n";
print "<PARAM name=\"CENTERSTRING\" value=$in>\n";
print "</APPLET>\n";
If run like this, it does not execute at all, but if the first line is
removed, it will run, but won't accept the input. I am using IIS 4.0 on
an NT server. Any thoughts on what the problem is with the syntax ?
Thanks,
Richard
------------------------------
Date: Wed, 19 Aug 1998 20:12:36 +0100
From: "Daniel Adams" <dan@fearsome.net>
Subject: Re: wtf is the obsession with "foo" and "bar"
Message-Id: <903555571.16821.1.nnrp-02.c2deb1c5@news.demon.co.uk>
I think there is a definite connection to the military term (fictional or
otherwise) FUBAR.
FUBAR is, of course, Fucked Up Beyond All Rescue/Recognition. Add this to
the term "foo fighters" and you have a curious double-pun incorporating
"unkown" and "probably messed up", both of which apply to my Perl scripts if
no-one else's.
Dan Adams
dan@fearsome.net
Grinch wrote in message <35e0153d.143980538@news.shore.net>...
>On Wed, 19 Aug 1998 11:07:57 -0500, Yong Huang <yong@shell.com> wrote:
>
>>I remember reading an answer to this question probably at comp.lang.c.
It's said
>>"foo" and "bar" originate from the military. As for the details, I didn't
care to
>>remember.
>
>WWII fighter pilots reported seeing a number of unknown flying
>objects, and referred to these objects as "Foo Fighters."
>
>This could be taken as evidence that the use of the term "foo" to
>refer to an unknown actually predates its use in the computer
>industry.
>
>-grinch
>
------------------------------
Date: 19 Aug 1998 19:46:27 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: wtf is the obsession with "foo" and "bar"
Message-Id: <6rfa2j$8ah$1@marina.cinenet.net>
Daniel Adams (dan@fearsome.net) wrote:
: I think there is a definite connection to the military term (fictional or
: otherwise) FUBAR.
:
: FUBAR is, of course, Fucked Up Beyond All Rescue/Recognition.
I've also seen the R mapped to 'Repair'.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 3485
**************************************