[7842] in Perl-Users-Digest
Perl-Users Digest, Issue: 1467 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Dec 13 13:07:11 1997
Date: Sat, 13 Dec 97 10:00:21 -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 Sat, 13 Dec 1997 Volume: 8 Number: 1467
Today's topics:
Re: 1st Script/Where's the bug ? (Tad McClellan)
Re: accessing a file in directory other than cgi script (Tad McClellan)
Blasted unlink on Win95 (Chris Raettig)
Re: Blasted unlink on Win95 <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Re: Detect Java, JavaScript Enabled via Perl <merlyn@stonehenge.com>
Re: Extraneous Digits From Division Operator (Tad McClellan)
Re: Help a newbie out (Tad McClellan)
Re: mkdir command <dformosa@st.nepean.uws.edu.au>
Re: mkdir command <merlyn@stonehenge.com>
Re: Need help stripping whitespace <NerveGas@nospam.com>
Re: newbie: compact an array (Tad McClellan)
Re: Only one execution in -ne (Honza Pazdziora)
perl http client via sockets <mikane@shell3.ba.best.com>
Re: pgp encrypion via perl script (Michael Budash)
Re: problem with chomp() <tchrist@mox.perl.com>
Re: Script calls embedded in web pages <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Sending FTP command using Win32:Internet <alan.sturm@enterprise.globalec.com>
Strange happenings with Win32 modules and IIS3.0 <alan.sturm@enterprise.globalec.com>
Re: Which language pays most 17457 -- C++ vs. Java? <sallen@ghgcorp.com>
Write in file from perl body <postmaster@ivan.udm.ru>
Re: Write in file from perl body (Honza Pazdziora)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 13 Dec 1997 11:03:18 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: 1st Script/Where's the bug ?
Message-Id: <m4fu66.861.ln@localhost>
Alex Craig (alexcraig@thebestjobs.com) wrote:
: Decided to move up from Prism to Perl.
: My first script is supposed to simply read a file and strip out any
: addresses ending in .uk
: Unfortunately it leaves me with a blank file.
Because you never printed anything.
: Any help would be appreciated.
: Here's the script.
: **********************************************************
: @ARGV = ("c:\\pmail\\mail\\alex\\bulk1.pml");
: $^I = ".bak";
: while (<>) {
: $where = index($_,".uk\n");
: if ($where != -1) {
: $_ = '' # or try substr($_, 0);
: }
print;
: }
: ********************************************
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 13 Dec 1997 08:46:15 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: accessing a file in directory other than cgi script?
Message-Id: <n37u66.kl.ln@localhost>
David Waring (dwaring@nwsr.com) wrote:
: I just want to reinforce what Bart says,
So far so good.
: pay no attention to others who
: tell you to go to another newsgroup,
(Bart did not say that)
Why should we pay no attention to established Usenet practices?
I'm not trying to be argumentative here, but if you are suggesting
a change, I would like to understand why the change would be
beneficial.
Could you please explain your reasoning for such a suggestion?
(what 'another newsgroup' are you referring to? I assume c.l.p.m
since it is on-topic for the other newsgroups)
: your problem is most likely the path,
: use and absolute path, (it could be permisions as another suggested but
: you probably would have figured that out yourself).
If the script was written in sh or C or Visual Basic, then
path/permissions is *not* likely the cause of the problem?
No, that is likely the cause regardless of the language used.
So I fail to see how it applies to a language specific newsgroup.
: In article <3491b70c.16915856@news.tornado.be>, bart.mediamind@tornado.be
: (Bart Lateur) wrote:
: > none@nowhere.com wrote:
: >
: > >Is it possible to open a file in a perl cgi script that is in a
: > >superdirectory (or any other directory for that matter) than the one
: > >which is in the script itself?
: >
: > The reason why it doesn't work, could be because your script is accessed
: > via a different path than you think it is (via links).
: >
: > Try this script:
: >
: > print "Content-type: text/plain\n\n";
: > print "This script is $0\n";
: >
: > I think you may be amazed about the result.
: >
: > The net result is that "..\datafile.txt" then tries to open a file in a
: > different directory than you think it does.
: >
: > Using absolute paths doesn't look as nice, but ought to work.
: >
: > HTH,
: > Bart.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 13 Dec 1997 01:59:10 GMT
From: chrisr@cheese.org (Chris Raettig)
Subject: Blasted unlink on Win95
Message-Id: <3496e95e.338858226@news.demon.co.uk>
Hi all,
I've had problems using unlink on Win32 Perl in order to delete files. The error
given was 'permission denied'. Can anyone shed any light on what might be
causing this or how it might be corrected. I can see no reason why permission
would be denied and the files in question are not in use by anything else.
Regards,
Chris.
------------------------------
Date: Sat, 13 Dec 1997 08:09:13 -0800
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: Blasted unlink on Win95
Message-Id: <66uc0k$8l5@bgtnsc02.worldnet.att.net>
The first thing to check is whether you can actually delete the files from
the shell, using the same environment in which Perl will be running. I've
gotten the same error. Here's an example: There is an obscure bug within NT
that can give you "access denied" if you assign a drive letter to a UNC and
your permissions are set in a certain order, and I ran right into it.
Deleting the file is no problem if it's a local file (say on C:) but if you
have J: assigned to C:\WINNT or \\myserver\ntfiles or something like that
this can happen.
Good luck. Errors like this can be a pain in the butt.
--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl
Chris Raettig wrote in message <3496e95e.338858226@news.demon.co.uk>...
>Hi all,
>
>I've had problems using unlink on Win32 Perl in order to delete files. The
error
>given was 'permission denied'. Can anyone shed any light on what might be
>causing this or how it might be corrected. I can see no reason why
permission
>would be denied and the files in question are not in use by anything else.
>
>Regards,
>Chris.
------------------------------
Date: 13 Dec 1997 08:01:08 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: ywang@maingate.net
Subject: Re: Detect Java, JavaScript Enabled via Perl
Message-Id: <8c7m99479n.fsf@gadget.cscaper.com>
[note: comp.lang.perl has been DEAD for TWO YEARS. Please inform your
news admin that they are operating a newsgroup graveyard. :-]
>>>>> "ywang" == ywang <ywang@maingate.net> writes:
ywang> Could anyone tell me how to detect the user's brower is
ywang> JavaScript/Java enabled via using Perl CGI program?
Well, you can do tricks like tell Javascript to go to a new page, and
if it doesn't go, Javascript isn't enabled. :-) But I hate those pages
because my "back" button doesn't work right any more.
ywang> And is there possible the enable those feature via a CGI
ywang> program?
By the Lords of Cobol, I *hope* not. I run with both Java and
JavaScript *disabled* because of the "security bug of the month" on
both of them. I *might* enable them on a very trusted or Intranet
site, but that's about it.
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 262 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Sat, 13 Dec 1997 09:16:22 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Extraneous Digits From Division Operator
Message-Id: <6s8u66.lr.ln@localhost>
Robert G. Ferrell (rferrell@usgs.gov) wrote:
: In article <66p4l5$4nl@sf18.dseg.ti.com>,
: simonsen_nospam@skopen.dseg.ti.com says...
: >But I'm just
: >wondering whether the behavior I'm getting from the division operator
: is a
: >bug or not. Opinions, anyone?
: I wouldn't call it a 'bug.' It's just that Perl uses floating points
: for division operations.
Perl uses (double) floating points for all numbers, not just for
division.
The real reason is that some base 10 numbers (what you are using)
cannot be represented exactly in base 2 (what your computer is using).
(there are even some base 10 numbers that cannot be represented
exactly in base 10!
)
For a more complete explanation, see the answer to the original
poster's Frequently Asked Question:
"Why am I getting long decimals (eg, 19.9499999999999) instead
of the numbers I should be getting (eg, 19.95)?"
: There are a lot of workarounds. For
: example: I've dropped all the right hand digits into an array, and then
: popped 'em off one at a time until I get to where I want to be, checking
: to make sure the rightmost is incremented if the next-to-last discard is
: > 4.
Gak!
: There're probably some that are easier and more elegant;
printf/sprintf
: I never
: gave it a lot of thought.
But someone has. A lot of someones, apparently, since it is included
in the Perl FAQ ;-)
"Does perl have a round function? What about ceil() and floor()?"
: It's just one of life's little sidetracks...
But that excursion takes only about two minutes.
Those FAQs sure are handy...
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 13 Dec 1997 10:55:50 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Help a newbie out
Message-Id: <mmeu66.861.ln@localhost>
[ emailed, posted ]
David Waring (dwaring@nwsr.com) wrote:
: In article <34908399.8C34649@ix.netcom.com>, Eric <ewalti@ix.netcom.com> wrote:
:
: >Hi. I'm good at HTML and i know java too. Now i figure its time to move
: >onto CGI. Right? Anyways, i dont have the slightest idea about CGI. Can
: >someone help me out? help me get started? Any good tutorials out there?
: >Somone please help!!! thanx
[snip]
: Finally I would add that I was annoyed by the response to your question (below)
And people who read the Perl newsgroup expecting to see questions about Perl
are annoyed to have to wade through posts in the Perl newsgroup that
are not about Perl.
: I don't mean to flame, but this is the kind of useless response that I
: often see.
If you ask in a newsgroup that in not connected with your question,
then you should not expect to get an answer connected to your question.
Less than half of the readers of this newsgroup (extrapolating from
the fact that less than half of all Perl programs use the CGI)
know about CGI.
The original poster is much more likely to get an answer to a CGI question
in a newsgroup where _everybody_ knows about CGI, such as:
comp.infosystems.www.authoring.cgi
: He suggests you check out the FAQ but assumes that you know
: how to find it (I do not).
1)
It comes with the Perl distribution.
You do have perl installed, yes?
2)
You are also told how to get it from the autoresponder when you make
your first post.
3)
You are also also told how to get it with the periodically posted
article with:
Subject: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
4)
The signature of the article you cite below seems to be referring
to a FAQ of some sort too.
Since he didn't get it the first four times, it seems pointless to say
it a fifth time...
: Second he suggests that you search the web --
: WHAT AN IDEA who would have ever thought of that.
Not, apparently, the original poster, else he would have already
had the answer to his question.
Brian's suggestion was indeed a way to get the answer to his question.
Finding out how to get the answer to a question seems like a
helpful thing to me...
: From my point of view
^^^^^^^^^^^^^^^^
: posting a question like yours in a forum on Perl is a very reasonable
: thing to do.
But there is no assurance that your point of view is the prevalent
point of view amongst the readers of c.l.p.m.
>From a Dejanews search, it appears that your point of view is from
someone new to the newsgroup.
Most other readers (and most certainly all of the question answerers)
do not have the same experiences that you do.
They have seen this question a few hundred times. No exaggeration,
literally _hundreds_ of times.
That is bound to change the point of view somewhat ;-)
That is why Frequently Asked Question (FAQ) lists are developed.
Many fine people have abandoned this newsgroup because they tire of
seeing the same questions yet again.
As a result, there are many Perl experts that we can no longer ask
questions of. We have squandered a valuable resource that is gone
for good.
Regular readers of this newsgroup have seen this happen time and
time again. New readers are not likely to know this.
Used to be that you could get an answer to your question here from
Larry Wall himself.
Not anymore ;-(
Brian is attempting to stem the tide of abandonment. This is a
service to the Perl community.
Posting a FAQ yet again, meanwhile, encourages folks to quit reading
the newsgroup. This is a disservice to the Perl community.
: After all anyone can start to search the web for resourses
^^^^^^
Exactly!
Even the original poster.
He could not possibly miss getting a whole bunch of pointers to CGI
tutorials from a carefully phrased search engine query.
: but why not find out if someone has already done that and found something
: useful.
Exactly again!
Someone HAS already found out something useful.
Many such useful things have even been collected into one easy to
find place!
These places are referred to as Frequently Asked Questions (FAQ) lists.
: He seems to be telling you to go somewhere else and not bother
: him.
Perhaps because he only wants to be bothered with Perl questions.
That is likely why he chooses to read the Perl newsgroup.
People that want to be bothered with CGI questions read the CGI,
not the Perl, newsgroup.
: Perhaps I am overstating his sentiments but that is how I took it -
: smiley or not. If he doesn't want to be bothered by newbies he can ignore
: them.
Most simply stop reading the newsgroup altogether (or make a killfile
entry for the FAQ asker).
Both make it less likely that you will be able to get an answer to
questions in the future.
That seems like a Bad Thing to me.
Perhaps a quote from Larry might sway you to conform to established
Usenet practice:
--------------------
In article <1995Nov9.193745.13694@netlabs.com>, lwall@netlabs.com (Larry
Wall) wrote: ...
<Larry> [snip] I view a programming language as a place to be
<Larry> explored, like Disneyland. You don't need to have a lot of preparation
<Larry> to explore a theme park. You do have to go along with the crowd
<Larry> control measures, though. In a sense, each ride has its own
<Larry> prerequisites--if you cut in line, you risk getting tossed out of the
<Larry> park.
<Larry>
<Larry> What we have here in this newsgroup is a failure in crowd control.
<Larry> Reading the FAQ is like staying in line--it's something you should
<Larry> learn in kindergarten. Usenet needs a better kindergarten.
--------------------
That was a few years ago, before he was driven from the newsgroup
by off-topic and FAQ questions...
: David Waring
: ---------------
: In article <comdog-ya02408000R1212970157380001@news.panix.com>,
: comdog@computerdog.com (brian d foy) wrote:
:
: > perhaps you could start with the CGI Meta FAQ.
: >
: > or yahoo.
: >
: > or some other search engine.
: >
: > or a CGI newsgroup.
: >
: > good luck :)
: >
: > --
: > brian d foy <comdog@computerdog.com>
: > NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
: > CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 13 Dec 1997 10:19:21 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: mkdir command
Message-Id: <882008361.563905@cabal>
In <19971211.170352.953299.NETNEWS@TWSUVM.UC.TWSU.EDU> smith@twsuvm.uc.twsu.edu (Kitty Smith) writes:
>I am having trouble with the mkdir command. I can't figure out what
>the permissions should be for the command to achieve a directory with
>770.
> mkdir("newdir", 777);
Thats 777 decimul. If you whant octal you have to go 0777 I've been
court by that one myself.
--
Please excuse my spelling as I suffer from agraphia see the url in my header.
Never trust a country with more peaple then sheep. I do not reply to mungged
Support NoCeM http://www.cm.org/ addresses.
I'm sorry but I just don't consider 'because its yucky' a convincing argument
------------------------------
Date: 13 Dec 1997 07:55:53 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: abigail@fnx.com
Subject: Re: mkdir command
Message-Id: <8cd8j147ie.fsf@gadget.cscaper.com>
>>>>> "Abigail" == Abigail <abigail@fnx.com> writes:
Abigail> Given the fact Perl often uses function names that come from
Abigail> someplace else, and Perl isn't afraid to make exceptions,
Abigail> just "to do as you expect it to do", I don't think it is
Abigail> unreasonable to expect that C<umask 022; mkdir "newdir",
Abigail> 777;> creates a directory with permissions rwxr-xr-x.
Except that both umask and mkdir[1] were system calls before they were
functions, and the system calls certainly would have required 0777
instead of 777.
In fact, come to think of it, except for "grep", I don't know of any
Perl op that derives from a command, but I know of a dozen or three
that derive from C-like system or library calls. So, if a new Perl
operator named "ulimit" came along, I'd certainly expect it to have
the syscall interface, *not* the command interface.
[1] using "before" loosely here, since it was the boyz at Bezerkley
that added mkdir(2), but you get the point...
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 262 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Sat, 13 Dec 1997 03:48:46 -0700
From: NerveGas <NerveGas@nospam.com>
Subject: Re: Need help stripping whitespace
Message-Id: <3492680E.7528@nospam.com>
> >In the meantiime, I need to write a program that wil identify and
> >remove any whitespace within the URLs - there may be more than one URL
> >per line. I'm pretty new to Perl, and this one's got me scratching my
> >head. I'm sure I could figure it out, but I need it quick! Any
> >assistance will earn my eternal gratitude, and I'll buy you dinner
This seems too simple... maybe I'm missing something, but why not
something like:
$line =~ s/ //g;
Since a URL shouldn't have any spaces in it, that should work, unless
the URL's are separated by spaces... in that case, you'd have to do
something like:
$line =~ s/ //g;
$line =~ s/http\:\/\// http\:\/\//g;
which would re-insert a space before any "http://".
Just a thought.
Steve
------------------------------
Date: Sat, 13 Dec 1997 08:58:39 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: newbie: compact an array
Message-Id: <vq7u66.jo.ln@localhost>
Xah (xah@best.com) wrote:
: Suppose @a is an array of integers. I want to compact @a, so that elements
: that are 0 get deleted. How can I do this without declaring another array @b
: such as:
: # compact array
: $j=0;
: foreach $i (@a) {if ($i) {@b[$j] = $i; $j++;};};
This does not "declare another array",
though it does (temporarily) build another list:
@a = grep $_ != 0, @a;
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 13 Dec 1997 13:30:35 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Only one execution in -ne
Message-Id: <adelton.882019835@aisa.fi.muni.cz>
Per Kistler <kistler@inf.ethz.ch> writes:
> Hi All
>
> How can one make that a command like reading a file will be
> executed only once within a perl -ne '....' statement?
> While processing files I have to read another file, which
> could stay in an array, instead of beeing read a new for
> every line of the of the files to process.
> Like in such a line:
> perl -ne 'read one time "filename"; statements for each line; print;'
> files
I guess that BEGIN is exactly what you need. Try man perlmod.
Hope this helps,
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: 13 Dec 1997 17:44:31 GMT
From: <mikane@shell3.ba.best.com>
Subject: perl http client via sockets
Message-Id: <66uhhv$5p5$1@nntp1.ba.best.com>
I want to write a perl script that will get an HTML
page off a server on the Internet using http.
I assume the way to go about it is to go the socket
route. My perl 5 book is a bit skimpy on this subject.
Can anyone suggest a reference?
Thanks
Mike
------------------------------
Date: Sat, 13 Dec 1997 03:04:16 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: pgp encrypion via perl script
Message-Id: <mbudash-1312970304160001@d67.pm2.sonic.net>
In article <34917ff8.17495498@news.scescape.net>, rgay@palmetto.net wrote:
>> Any ideas on this one...
If I'm gathering your problem correctly, I just went thru the same thing
on an Irix server, and the answer was incredibly simple:
.
.
.
chdir "path_to_dir_containing_pgpe";
$encrypted_data = `(echo "$unencrypted_data") | pgpe -at -r
$recipient_email_address`;
.
.
.
Then you can go ahead and email $encrypted_data.
NOTES: remember to escape the "@" in $recipient_email_address
Pretty simple, eh?
Michael Budash
------------------------------
Date: 13 Dec 1997 16:21:04 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: problem with chomp()
Message-Id: <66uclg$4h3$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
jcartwright@wans.net (John Cartwright) writes:
:I ran into a situation where chomp() and chop() seem to behave differently
:that I would expect.
:$a = "a\tb\t\t\t\t\n";
:@mylist = split(/\t/,$a);
What's going on is that you misunderstand split(). See perlfunc
for what split will by default do with trailling null fields.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
I think it's a new feature. Don't tell anyone it was an accident. :-)
--Larry Wall on s/foo/bar/eieio in <10911@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: Sat, 13 Dec 1997 07:53:59 -0800
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: Script calls embedded in web pages
Message-Id: <66ub43$4mi@bgtnsc02.worldnet.att.net>
Sounds to me like your Perl code is OK. You might try using
<!--#include virtual="test.cgi"-->
instead of #exec. It works for me.
Don Badowski Jr. wrote in message <34926561.CB68CF41@fedex.com>...
>Can anyone tell what if any thing I may be doing wrong or assuming in
>the following case?:
>I created a simple perl script file named"test.cgi":
>#!/usr/bin/perl/
>print "Content-type: text/html\n\n";
>
>print "hello";
>
>Next I created a HTML file called testing.shtml:
><html>
><head><title>TITLE</title></head>
><body>
>This is a test of CGI and PERL<br>
><!--#exec cgi="test.cgi"-->
></body>
></html>
>
>I upload both files into a directory that is executable and make the
>.cgi executable. When I point my browser to testing.shtml I receive
>this:
>[an error occurred while processing this directive]
>so next I point my browser to the test.cgi file itself and I get the
>desired response in the browser:
>This is a test of CGI and PERL
>hello
>Why will it not execute the cgi script from within the html file?
>Am I doing something wrong? Or is it something to do with the setup of
>the server? If so is there any way to check it out?
>Any help is greatly appreciated.
>Thanks,
>Don Badowski Jr.
------------------------------
Date: Sat, 13 Dec 1997 06:00:06 -0500
From: Alan <alan.sturm@enterprise.globalec.com>
Subject: Sending FTP command using Win32:Internet
Message-Id: <34926AB6.1798FC7E@enterprise.globalec.com>
I have the need to issue the command "quote site filetype=jes" before I
"put" my file. Is there a way to issue this command with
Win32:Internet? Other suggestions are also welcome. I am on an Intel
box running IIS3.0. Thank you.
Alan Sturm
alan@globalec.com
------------------------------
Date: Sat, 13 Dec 1997 11:27:57 -0500
From: Alan <alan.sturm@enterprise.globalec.com>
Subject: Strange happenings with Win32 modules and IIS3.0
Message-Id: <3492B78C.C1F850A2@enterprise.globalec.com>
I'm trying to put web tools in place that will allow me to remotely
manage several NT Servers worldwide. The idea is to have one tool that
I can do "everything". I have IIS3.0 running on an Intel based NT 4.0
Server.
I'm using Win32:Service to attempt to list all the services on a remote
system (stop/start features will be added later). What is happening is
that if I run the script from the browser physically located on the
webserver, it lists them out fine. However if I run it from the browser
on my workstation I get only the table headings, no services info.
Code Segment:
print "<table border>";
print "<th>Service Name / Status
Name</th><th>Status</th><th>Action</th>";
Win32::Service::GetServices($hostname, \%services);
foreach $key (sort keys %services){
print "<tr><td><b>$key, $services{$key}</b></td>";
Win32::Service::GetStatus($hostname,$services{$key},\%status);
$stat = $status{'CurrentState'};
$name = $services{$key}; .................and so on.........
The server and workstation are logged into the same NT domain as the
same user.
I get the same result using Win32::InitiateSystemShutdown. When run
from the webserver I can reboot another system, but from my workstation
it fails.
Help!! Thanks.
Alan Sturm
alan_sturm@stercomm.com
Sterling Commerce
------------------------------
Date: Sat, 13 Dec 1997 03:05:08 -0600
From: Stanley Allen <sallen@ghgcorp.com>
Subject: Re: Which language pays most 17457 -- C++ vs. Java?
Message-Id: <34924FC4.508B@ghgcorp.com>
Mix wrote:
>
> [summary: FORTRAN, Eiffel, Ada and Smalltalk are out of
> the question; Java and C++ are my only career choices]
>
> The question is, which language will pay top 17457 in the long run?
> [i.e., Java or C++ ?]
>
Ah, the perilous quandries of graduation! Young men
and women starting out to take their turn in the world,
overwhelmed with solitude, unable to foresee what all
of us can also not forsee: the FUTURE! Like death
to Hamlet it is the "undiscovered country"; its map is
continually accumulating marks and legends, each new
day adding some incremental detail -- but never is
it any more complete than the day before.
Young man (I say magnanimously from the grand age of
thirty-four), your question is fair enough but it's
not answerable in any way. It's also one of the
least interesting questions you could ask to us or
to yourself. Think instead of these questions:
"What was my favorite language(s) to study in my CS classes?"
"What was my favorite course(s) among my CS classes?"
"What was my favorite course(s) outside my major?"
"What do I like to do outside school/work?"
"What do I want to accomplish with my life & time?"
The point is that you're going to waste your life if
all you can think about is the money. Stop brooding
and think of what you're saying: "I don't really *want*
to program in C++ or Java, but I'm stuck with them, so
I will doom myself to a drab career for 10+ years in
order to pick up my fair share of the middle-class
life." If it didn't provoke a chuckle, I might feel
like weeping a bit just thinking about it.
THINK BIG! Choose not to be a pawn in the game -- do
what you *like* to do -- set some real goals for
yourself -- what you want to learn -- what kind of
things you want to be proud of doing as a software
developer -- have some guts -- take on the world and
win, man!
The most depressing thing I can imagine for myself
career-wise is the idea that I will have to hunker
down one day and bow down to that paycheck doing
some ms-windows database interface. I'll sell
vacuum cleaners first.
When I got out of school, my favorite language was Ada
and my favorite work was real-time software and network
programming. Want to take a guess what I've been doing
for the last 10 years? You got it. And it's never been
military-related, though that was an option. Also I've
never been near the bottom of the totem pole on the pay
scale. I expect keep at it for the next 10 years or so.
Don't get me wrong: there were a few things I was into
back then that I knew would be harder to parlay into a
career, like AI. But the point is that I didn't (and
you don't) have to settle for some lowest common
denominator. Assuming you are a reasonably sharp
person, you probably have some real interests within the
field of computers. And some of these real interests
will overlap with real jobs. Find a good match and make
it work for you.
--
Stanley Allen
mailto:sallen@ghg.net
------------------------------
Date: Sat, 13 Dec 1997 01:49:00 +0400
From: "Ivan Klabukov" <postmaster@ivan.udm.ru>
Subject: Write in file from perl body
Message-Id: <66tu28$l28$1@hq.mark-itt.ru>
Can anyone tell me how can i write in the file (from perl body) when i call
perl scripit from HTML document.
Ivan A. Klabukov
------------------------------
Date: Sat, 13 Dec 1997 13:33:21 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Write in file from perl body
Message-Id: <adelton.882020001@aisa.fi.muni.cz>
"Ivan Klabukov" <postmaster@ivan.udm.ru> writes:
> Can anyone tell me how can i write in the file (from perl body) when i call
> perl scripit from HTML document.
Open the file with open, print to it with print and then close it with
close. You will definitely want to check the returned values and
probably check documentation (links from www.perl.com) about CGI and
CGI and Perl and CGI and Perl and working with files.
Hope thie helps,
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
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 1467
**************************************