[16574] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3986 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 11 11:10:26 2000

Date: Fri, 11 Aug 2000 08:10:15 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <966006615-v9-i3986@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 11 Aug 2000     Volume: 9 Number: 3986

Today's topics:
    Re: Problem With AT Command, DBI ODBC on NT4 <pgunreben@lucent.com>
    Re: Problems with adding 1 <bart.lateur@skynet.be>
    Re: Putting data into a form. emavres@my-deja.com
    Re: Putting data into a form. <godzilla@stomp.stomp.tokyo>
    Re: s/// and symbolic references (Greg Bacon)
        Sending back HTTP info before script ends...... ()
    Re: Sharing a cookie between two domains..? <kperrier@blkbox.com>
    Re: Sharing a cookie between two domains..? (Keith Calvert Ivey)
    Re: Were are all the executibles? <mjcarman@home.com>
    Re: what does foreach (0...10) do ??? (Martien Verbruggen)
        Where can I find Basic Perl Definitions? <lincolnmarr@europem01.nt.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 11 Aug 2000 15:02:54 +0200
From: Peter Gunreben <pgunreben@lucent.com>
Subject: Re: Problem With AT Command, DBI ODBC on NT4
Message-Id: <3993F97E.C5AAD7D3@lucent.com>

The AT executes jobs using a different username.
Just check the setting of the ENV{'USERNAME'} while
the script is executed from AT and set the rights
accordingly.


Jonathan Stowe wrote:
> 
> On Mon, 07 Aug 2000 18:02:40 GMT bayers@my-deja.com wrote:
> > Here's a curious problem.  Logged on as administrator, I can run the
> > program below from the command prompt, but when I try to run it with
> > the AT command, it fails with no error messages.  For testing, I am
> > running the scedule service as administrator.
> >
> 
> The schedule service usually runs as the System user with a very limited
> range of rights.  When you say you are running this as administrator do
> you mean you have changed this in the Service Control Panel (or whatever
> it calls itself - I havent had to use NT for more than a year :).
> 
> In the end of the day you almost certainly have an NT configuration issue
> with regard to the user rights of the schedule service and you will almost
> certainly be better served asking in some group that discusses NT.
> 
> /J\
> --
> yapc::Europe in assocation with the Institute Of Contemporary Arts
>    <http://www.yapc.org/Europe/>   <http://www.ica.org.uk>


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

Date: Fri, 11 Aug 2000 15:03:15 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Problems with adding 1
Message-Id: <e758ps8594kulgkjbjomcf9dqghrm56hmq@4ax.com>

Tim Hammerquist wrote:

>Nice simple solution, but doesn't it get a bit unwieldy when hits get
>into the thousands?

Thousands? A day? Yes. Thousands a month? So what. So you've got a
useless garbage file of a few k. Big deal. If you don't have millions of
visitors a year, it would still work with no problem.

n.b. when was the last time that you got rid of your webserver log file?
Now there's a fastgrowing logfile.

p.s. You may categorize my solution under "bowling": longwinded and
farfetched. Good for a chuckle, i hope.

-- 
	Bart.


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

Date: Fri, 11 Aug 2000 13:24:02 GMT
From: emavres@my-deja.com
Subject: Re: Putting data into a form.
Message-Id: <8n0upd$h1o$1@nnrp1.deja.com>

In article <39933E5A.41D3241A@la.znet.com>,
  "Godzilla!" <callgirl@la.znet.com> wrote:
> emavres@yahoo.com wrote:
>
> My word, a fake email address at yahoo, posted
> via fake dejavu through a fake proxy server. You
> must be someone famous to place so much effort
> into concealing yourself!

I see you identify yourself clearly with your address!

>
> > I would like to get data from a file and place it into
> > a form on an HTML page when the user selects a button.
> > I know how to get form data using perl but cant figure
> > out how to write data into some of the form elements.
>
> You know how to collect form data using Perl, therefore
> you also know how to include data in an html print using
> Perl. Is this not so?
>
> * laughs *
>
> > The form only has text fields.
>
> No form action tag? No submit button?
> Ok, I will meet you halfway and leave
> out submit buttons for my examples.

Yes there are actually three buttons.  The usual Submit and Clear AND a
Load button.  What I was trying to avoid was repeating all the HTML that
I had already.  After thinking about what I was asking, I came to the
realization that this was not a proper question for this group.  What
would be cool is if I could setup my original form (index.html file)
with some sort of "variables" that I could call from a Perl script when
I wanted to insert values.  The page ALWAYS comes up blank, and when the
user selects Load he should get what was entered previously for
modification.  Thank you for your help and I will review your comments.


>
> Ahem...
>
> There must be fifty ways to leave your lover and
> just as many ways print data into a form action.
> Below are three methods of many using bare bones
> skeleton scripts for examples.
>
> I like this Array method. Already enclosed in
> quotes which includes neat spaces between elements
> with no need for extra coding. Cleaned up single
> string is kinda nice as well. Personally, I loathe
> messy document sources. See these all the time.
> Most unprofessional. A messy single string is
> certainly not the way to go although it works,
> if you don't mind words running together and
> a rather shameful document source.
>
> Nothing to this, right? Just a matter of printing
> whatever data into your VALUE for a form text box.
>
> Now you know what you already knew. So what method
> of fifty will you use to do something you most likely
> have no intent of doing?
>
> Godzilla!
>
> TEST SCRIPTS:
> _____________
>
> #!/usr/local/bin/perl
>
> print "Content-Type: text/plain\n\n";
>
> print "Method One - Array within quotes:\n\n";
>
> open (DATA, "test.txt");
> @Array = <DATA>;
> close (DATA);
> chomp @Array;
>
> print "
>   <html>
>   <form action=\"test.cgi\">
>   <input type=\"text\" name=\"Data\" value=\"@Array\">
>   </form></html>";
>
> print "\n\n\nMethod Two - Messy single string: \n";
>
> $/ = "";
> open (DATA, "test.txt");
> $data = <DATA>;
> close (DATA);
>
> print "
>   <html>
>   <form action=\"test.cgi\">
>   <input type=\"text\" name=\"Data\" value=\"$data\">
>   </form></html>";
>
> print "\n\n\nMethod Three - Cleaned up single string:\n";
>
> $/ = "";
> open (DATA, "test.txt");
> $data = <DATA>;
> close (DATA);
>
> $data =~ s/\n/ /g;
> chop ($data);
>
> print "
>   <html>
>   <form action=\"test.cgi\">
>   <input type=\"text\" name=\"Data\" value=\"$data\">
>   </form></html>";
>
> exit;
> #!/usr/local/bin/perl
>
> print "Content-Type: text/plain\n\n";
>
> print "Method One - Array within quotes: \n";
>
> open (DATA, "test.txt");
> @Array = <DATA>;
> close (DATA);
> chomp @Array;
>
> print "
>   <html>
>   <form action=\"test.cgi\">
>   <input type=\"text\" name=\"Data\" value=\"@Array\">
>   </form></html>";
>
> print "\n\n\nMethod Two - Messy single string: \n";
>
> $/ = "";
> open (DATA, "test.txt");
> $data = <DATA>;
> close (DATA);
>
> print "
>   <html>
>   <form action=\"test.cgi\">
>   <input type=\"text\" name=\"Data\" value=\"$data\">
>   </form></html>";
>
> print "\n\n\nMethod Three - Cleaned up single string: \n";
>
> $/ = "";
> open (DATA, "test.txt");
> $data = <DATA>;
> close (DATA);
>
> $data =~ s/\n/ /g;
> chop ($data);
>
> print "
>   <html>
>   <form action=\"test.cgi\">
>   <input type=\"text\" name=\"Data\" value=\"$data\">
>   </form></html>";
>
> exit;
>
> CONTENTS OF TEST.TXT:
> ____________________
>
> line one
> line two
> line three
>
> PRINTED RESULTS:
> ________________
>
> Method One - Array within quotes:
>
>   <html>
>   <form action="test.cgi">
>   <input type="text" name="Data" value="line one line two line three">
>   </form></html>
>
> Method Two - Messy single string:
>
>   <html>
>   <form action="test.cgi">
>   <input type="text" name="Data" value="line one
> line two
> line three
> ">
>   </form></html>
>
> Method Three - Cleaned up single string:
>
>   <html>
>   <form action="test.cgi">
>   <input type="text" name="Data" value="line one line two line three">
>   </form></html>
>


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 11 Aug 2000 06:54:32 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Putting data into a form.
Message-Id: <39940598.847CAA7D@stomp.stomp.tokyo>

emavres@my-deja.com wrote:
 
> In article <39933E5A.41D3241A@la.znet.com>,
>   "Godzilla!" <callgirl@la.znet.com> wrote:
> > emavres@yahoo.com wrote:

> > My word, a fake email address at yahoo, posted
> > via fake dejavu through a fake proxy server. You
> > must be someone famous to place so much effort
> > into concealing yourself!

 
> I see you identify yourself clearly with your address!

callgirl@la.znet.com seems rather clear, yes.

* thinks this one must be another functional illiterate *

So why are you investing so much time and effort
into concealing who you are? Whatcha hiding?
 


> Yes there are actually three buttons.  The usual Submit
> and Clear AND a Load button.  What I was trying to avoid
> was repeating ....

(snipped)

Ahh... I see what you are hiding. You are this newsgroup's
Few Man Chew, man/woman of a thousand ugly mugs, a person
who enjoys harassing and making fools of these fools, by 
changing your parameters each time an answer is provided.
Well, they are fools certainly easy to fool. I am neither.
However, these fools deserve what they get, in the end.

Godzilla!


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

Date: Fri, 11 Aug 2000 14:12:34 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: s/// and symbolic references
Message-Id: <sp82eio8n4t50@corp.supernews.com>

In article <8n0se4$8je$1@newsg4.svr.pol.co.uk>,
    Daniel Foster <daniel@blackomega.com> wrote:

: I'm trying to parse a text file and insert the value of any named
: variables where they appear in the text file, and print the result.
: This is actually being called from CGI, but I don't think that's
: relevant.  Here's some code...
: 
: while (<$element_filehandle>) { #previously opened correctly
:     my $testvar = 'test';
:     s/(\$)(\w+)/$$2/g;
:     print;
:     print " $testvar";
: }

Have you read the appropriate FAQ entry in Section 4 of the FAQ?  It
makes a difference when you're trying to expand lexicals in a string.

Greg
-- 
Atheism is a non-prophet organization.
    -- George Carlin


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

Date: Fri, 11 Aug 2000 15:03:07 GMT
From: "Nullspace():" <nullspace@hotmail.com>
Subject: Sending back HTTP info before script ends......
Message-Id: <LAUk5.106$HN6.11690@sapphire.mtt.net>

Hi,
Can anyone point me in the right direction with regards to sending back my
HTTP information before my script ends. Right now,(I believe) my header info
does get returned to my browser until after my script is complete.

I want to send back the page, wait for 30 seconds, then perform a CHMOD on a
file on the server. Any help would be appreciated.

Thanks,
Nullspace();




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

Date: 11 Aug 2000 09:05:16 -0500
From: Kent Perrier <kperrier@blkbox.com>
Subject: Re: Sharing a cookie between two domains..?
Message-Id: <E27A98439347CB2B.F93F50AA1D20AAA7.67C0CB5D2E88B47D@lp.airnews.net>

mat@designsolution.co.uk (Mat) writes:

> Hi,
> 
> 	I am having a few problems trying to share a cookie between
> two domains 

have read the cookie spec?  It is not possible to share cookies between
two different cookie domains.  Cookies were designed so that machines in
cookie domain .domainA.com cannot access cookies set by machines in 
cookie domain .domainB.com

Kent
-- 
We are in fact well and truly doomed.
				-- Jamie Zawinski
				   http://www.jwz.org/gruntle/nscpdorm.html


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

Date: Fri, 11 Aug 2000 13:32:33 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: Sharing a cookie between two domains..?
Message-Id: <3993fed4.39799329@news.newsguy.com>

mat@designsolution.co.uk (Mat) wrote:

>	I am having a few problems trying to share a cookie between
>two domains using Matt Wrights cookie.lib.  As far as I can
>understand, this is possible by using the function
>&SetCookieDomain('.host.xxx').

Matt Wright doesn't determine how cookies work (fortunately).
The cookie specification (along with the way it's implemented by
browsers) does.

If you can read cookies from other domains, it indicates that
the browser being used has a serious security flaw.  Think about
it -- do you really want any site to be able to read cookies
from any other site?

The function in question presumably is designed to allow you to
share cookies between hosts in a single domain, not between
domains.

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC


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

Date: Fri, 11 Aug 2000 08:29:04 -0500
From: Michael Carman <mjcarman@home.com>
Subject: Re: Were are all the executibles?
Message-Id: <3993FFA0.EAF13DDA@home.com>

john_s_brown@my-deja.com wrote:
> 
> Why is Perl a scripting language? Why one can't make executibles (this
> is, *.exe files)? Wouldn't compiling be much more intelligent than
> interpreting? That way anybody could drive a perl program without
> having perl interpreter!

That way you'd have to compile your scripts for every platform you
wanted to run them on!

That way you'd have to compile your scripts before you could run them!

Seriously, it's a trade-off. The first issue effects portability - by
porting the interpreter, most scripts are made pretty much platform
independant. (Kind of like what Java was supposed to be -- write once,
run anywhere, but Perl's been at it longer.) Another benefit is
development speed; there's no intermediate compilation step, just write
and run.

There are downsides: you have to have an interpreter, you have the
overhead of an intermediate compilation step before your program starts
up, etc. Since perl is free, making it necessary for people to have the
interpreter isn't a big deal. And there are ways of getting around the
compilation overhead: mod_perl for web servers, and for non-CGI scripts
you can compile them into an *.exe if you really want to.

-mjc


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

Date: 11 Aug 2000 13:06:05 GMT
From: mgjv@martien.heliotrope.home (Martien Verbruggen)
Subject: Re: what does foreach (0...10) do ???
Message-Id: <slrn8p7ukg.ee0.mgjv@martien.heliotrope.home>

On 08 Aug 2000 17:37:17 +0100,
	nobull@mail.com <nobull@mail.com> wrote:
> Jonathan Stowe <gellyfish@gellyfish.com> writes:
> 
> > the two and three dot versions only behave differently in a scalar
> > context, they behave the same in a list context.
> 
> Eh, actually as far as I can see the behaviour of ... in a list
> context is undefined.

Nothing in Perl is undefined, unless specifically stated so. Perl is not,
unlike C, a defined language. It's implementation, in perl, is it's
definition. This is something that has long been a problem, and
continues to be one until Perl, the language, gets formally defined.
Until then, the word 'undefined' as it is normally used in a C language
context, just becomes 'undocumented'. That is, if you don't count perl's
source code as docuemntation :)

perl says:

# perl -MO=Deparse -e '@a = (1...3)';
@a = (1, 2, 3);
-e syntax OK

It is however interesting that there is a test for ... in t/op/flip.t,
but none in t/op/range.t.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | I'm just very selective about what I
Commercial Dynamics Pty. Ltd.   | accept as reality - Calvin
NSW, Australia                  | 


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

Date: Fri, 11 Aug 2000 16:57:28 +0200
From: "Marr, Lincoln [HOOF:4713:EXCH]" <lincolnmarr@europem01.nt.com>
Subject: Where can I find Basic Perl Definitions?
Message-Id: <39941458.364CCEA8@europem01.nt.com>

I'm getting reasonable at programming perl/CGI stuff by now but I am
still fairly new to Perl. I am enjoying the perl community and their
willingness to help each other, but I haven't yet managed to find a
website or any other documentation which defines clearly how to use the
perldoc command, or which defines basic programming things such as
classes, packages, modules etc and what ActivePerl is etc.

I don't expect everyone here to tell me about these things I was
wondering whether you could tell us newbies where to find some
documentation like this, I'm sure a lot of people would find it
useful... don't you remember what your first few weeks of programming
Perl were like?? (well for me I've been thrown in the deep end ... my
boss says to learn perl and make a huge database driven website within 3
months...)

Thanks, Lincoln.



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

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


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 3986
**************************************


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