[31943] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3206 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 11 14:09:28 2010

Date: Thu, 11 Nov 2010 11:09:11 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 11 Nov 2010     Volume: 11 Number: 3206

Today's topics:
        ANNOUNCE: NHI1-0.9, PLMK-1.7 und libmsgque-4.7 <aotto1968@users.berlios.de>
    Re: Foreach <kst-u@mib.org>
    Re: Foreach <glex_no-spam@qwest-spam-no.invalid>
    Re: Foreach <no@email.here.invalid>
    Re: Foreach <willem@turtle.stack.nl>
    Re: Foreach <kst-u@mib.org>
    Re: Foreach <uri@StemSystems.com>
        perl  html parser <kitenik@gmail.com>
    Re: testing whether a number is an integer <rvtol+usenet@xs4all.nl>
    Re: Using Perl to find what address bar says <jurgenex@hotmail.com>
    Re: Using Perl to find what address bar says <tadmc@seesig.invalid>
    Re: Using Perl to find what address bar says <kst-u@mib.org>
    Re: Using Perl to find what address bar says <sherm.pendley@gmail.com>
    Re: Using Perl to find what address bar says <glex_no-spam@qwest-spam-no.invalid>
    Re: Using Perl to find what address bar says <mvdwege@mail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 11 Nov 2010 19:51:38 +0100
From: Andreas Otto <aotto1968@users.berlios.de>
Subject: ANNOUNCE: NHI1-0.9, PLMK-1.7 und libmsgque-4.7
Message-Id: <ibhe3b$dau$00$1@news.t-online.com>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

Dear User,


ANNOUNCE:    Major Feature Release
====================================

  libmsgque: Application-Server-Toolkit for
             C, C++, JAVA, C#, TCL, PERL, PHP, PYTHON, RUBY, VB.NET
  PLMK:      Programming-Language-Microkernel
  NHI1:      Non-Human-Intelligence #1



LINKS
=====

  ChangeLog:
   > http://nhi1.berlios.de/theLink/changelog.htm
  libmsgque including PHP documentation:
   > http://nhi1.berlios.de/theLink/index.htm
  NHI1:
   > http://nhi1.berlios.de/
  DOWNLOAD:
   > http://developer.berlios.de/projects/nhi1/
  PHP man pages:
   > reference: msgqueforphpref.n
   > tutorial:  msgqueforphptut.n



SUMMARY
=======

This version adds the ability to:

* PHP language support.
* a new interface of the "ProcessEvent" function and the "startAs"
configuration option.
* terminate an application from a callback with the "ErrorSetEXIT" function.

The PHP language is characterized by an extensive but undocumented C
API. The number of features combined with a growing and moving language
made the extension programming difficult and lengthy. The successful PHP
extension shows the flexibility and adaptability of NHI1.


mfg

  Andreas Otto (aotto1968)
-----BEGIN xxx SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJM3Ds6AAoJEGTcPijNG3/ATywH/iguN1+96sp2RGzIz6N3I8mx
tw4YO6ac8NPT+Ztm+IXYbGlkyb2Z/3UwES7aZunYy7DK/kJBh7VBbZNGGWZlRTvm
w02uMa4dTCBye8tNkQ8dRAxjshe9taM1+54Z4k1EsFmIXOMi8bbdDuAPk2i8xGRu
vJIFC6ubIx93Sjgodcr/AIGRskjutpF29+uoaSMz+8UrTxnSoJxq8VvgWR/+MXfZ
UOb8GutVV6bGI/ylE/NgLpxvE1LUMNgMS0QzHgQHSu4E/8tW3Oyzt6FU68k51n8+
OTJaFYC7o1W9VwSoc/HNHPhVmECYONW40pRrf2P0llqiKElBAd23g1/h83iblqo=
=5U+w
-----END PGP SIGNATURE-----


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

Date: Thu, 11 Nov 2010 08:19:50 -0800
From: Keith Thompson <kst-u@mib.org>
Subject: Re: Foreach
Message-Id: <lnk4kj7ryx.fsf@nuthaus.mib.org>

"Dr.Ruud" <rvtol+usenet@xs4all.nl> writes:
> On 2010-11-10 17:29, Keith Thompson wrote:
>> "Dr.Ruud"<rvtol+usenet@xs4all.nl>  writes:
>>> On 2010-11-10 00:33, Martijn Lievaart wrote:
>>>> On Tue, 09 Nov 2010 13:24:09 -0500, Uri Guttman wrote:
>
>>>>> 	print "$_\n" foreach @ARGV ;
>>>>
>>>> Or (arguably worse)
>>>>
>>>> { $,="\n"; print @ARGV; }
>>>
>>> ITYM:
>>>
>>> {local $,=$\=$/; print @ARGV}
>>
>> That localizes $, but not $\, so the modified value of $\ is
>> retained after the block.
>
> Ah, thanks for the review.
>
>   {local($\,$,)=($/)x2;print @ARGV}
>
> also known as
>
>   print join( $/, @ARGV ), $/;
>
> (though not fully equivalent)

I'm mildly astonished that "x2" is tokenized as "x" followed by
"2" and not as a bareword.

Of course the space between "print" and "@ARGV" is unnecessary.

(Note to newbies: these are *not* examples of good style.)

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"


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

Date: Thu, 11 Nov 2010 10:34:24 -0600
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Foreach
Message-Id: <4cdc1b12$0$48229$815e3792@news.qwest.net>

Keith Thompson wrote:
> "Dr.Ruud" <rvtol+usenet@xs4all.nl> writes:
>> On 2010-11-10 17:29, Keith Thompson wrote:
>>> "Dr.Ruud"<rvtol+usenet@xs4all.nl>  writes:
>>>> On 2010-11-10 00:33, Martijn Lievaart wrote:
>>>>> On Tue, 09 Nov 2010 13:24:09 -0500, Uri Guttman wrote:
>>>>>> 	print "$_\n" foreach @ARGV ;
>>>>> Or (arguably worse)
>>>>>
>>>>> { $,="\n"; print @ARGV; }
>>>> ITYM:
>>>>
>>>> {local $,=$\=$/; print @ARGV}
>>> That localizes $, but not $\, so the modified value of $\ is
>>> retained after the block.
>> Ah, thanks for the review.
>>
>>   {local($\,$,)=($/)x2;print @ARGV}
>>
>> also known as
>>
>>   print join( $/, @ARGV ), $/;
>>
>> (though not fully equivalent)
> 
> I'm mildly astonished that "x2" is tokenized as "x" followed by
> "2" and not as a bareword.

 From perlop:

Binary "x" is the repetition operator.  [...] In list context, if
the left operand is enclosed in parentheses or is a list formed
by qw/STRING/, it repeats the list.


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

Date: Thu, 11 Nov 2010 18:02:34 +0000 (UTC)
From: Mladen Gogala <no@email.here.invalid>
Subject: Re: Foreach
Message-Id: <pan.2010.11.11.18.02.34@email.here.invalid>

On Tue, 09 Nov 2010 13:24:09 -0500, Uri Guttman wrote:


> don't use map in a void context!

Uri, I read that several times. There was even a thread on Perlmonks 
about it:


http://www.perlmonks.org/index.pl?node_id=296742


However, they say that this use is not deprecated, but "derided". Perl 
5.8 and later doesn't necessarily build an output list, unless 
specifically requested. I must confess to have written numerous code 
snippets, especially with regular expressions:

map { s/.../.../; } @array;

simply because it's shorter than foreach my $x (@array) {
                                    $x=~ s/.../.../;
                                 }

I even benchmarked one version against the other, finding the speed to be 
approximately the same. Is that disdain for  the map in void context just 
a custom or is based on some real problems caused by the code like that?
Thanks for your time and comments.



-- 
http://mgogala.byethost5.com


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

Date: Thu, 11 Nov 2010 18:07:18 +0000 (UTC)
From: Willem <willem@turtle.stack.nl>
Subject: Re: Foreach
Message-Id: <slrnidoc6m.198v.willem@turtle.stack.nl>

Mladen Gogala wrote:
) map { s/.../.../; } @array;
)
) simply because it's shorter than foreach my $x (@array) {
)                                     $x=~ s/.../.../;
)                                  }

But not shorter than:

  s/.../.../ for @array;


SaSW, Willem
-- 
Disclaimer: I am in no way responsible for any of the statements
            made in the above text. For all I know I might be
            drugged or something..
            No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT


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

Date: Thu, 11 Nov 2010 10:11:58 -0800
From: Keith Thompson <kst-u@mib.org>
Subject: Re: Foreach
Message-Id: <lnbp5v7ms1.fsf@nuthaus.mib.org>

"J. Gleixner" <glex_no-spam@qwest-spam-no.invalid> writes:
> Keith Thompson wrote:
>> "Dr.Ruud" <rvtol+usenet@xs4all.nl> writes:
>>> On 2010-11-10 17:29, Keith Thompson wrote:
>>>> "Dr.Ruud"<rvtol+usenet@xs4all.nl>  writes:
>>>>> On 2010-11-10 00:33, Martijn Lievaart wrote:
>>>>>> On Tue, 09 Nov 2010 13:24:09 -0500, Uri Guttman wrote:
>>>>>>> 	print "$_\n" foreach @ARGV ;
>>>>>> Or (arguably worse)
>>>>>>
>>>>>> { $,="\n"; print @ARGV; }
>>>>> ITYM:
>>>>>
>>>>> {local $,=$\=$/; print @ARGV}
>>>> That localizes $, but not $\, so the modified value of $\ is
>>>> retained after the block.
>>> Ah, thanks for the review.
>>>
>>>   {local($\,$,)=($/)x2;print @ARGV}
>>>
>>> also known as
>>>
>>>   print join( $/, @ARGV ), $/;
>>>
>>> (though not fully equivalent)
>> 
>> I'm mildly astonished that "x2" is tokenized as "x" followed by
>> "2" and not as a bareword.
>
>  From perlop:
>
> Binary "x" is the repetition operator.  [...] In list context, if
> the left operand is enclosed in parentheses or is a list formed
> by qw/STRING/, it repeats the list.

Yes, I know what the "x" operator is.  I'm just surprised that
    (...)x2
tokenizes as
    ( ... ) x 2
rather than as
    ( ... ) x2
where "x2" would be a bareword (and a syntax error in this context).

I'm accustomed to, for example, C's "maximal munch" rule, where
as many characters as possible are gathered into a token, even
if it would create a syntax error when the resulting token stream
is parsed.

I'm not *entirely* surprised that Perl plays tricks in this
case to avoid a syntax error, but it doesn't do so in all cases.
For example, Perl scans "$x+++++$y" as "$x ++ ++ + $y", even though
it's a syntax error and "$x ++ + ++ $y" would be valid.

As the saying goes, only perl can parse Perl.  I certainly wouldn't
count on "x2" being tokenized "correctly" if I wanted anyone to
be able to read the resulting code (obviously not a goal of what
we're doing here).

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"


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

Date: Thu, 11 Nov 2010 13:24:05 -0500
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: Foreach
Message-Id: <87mxpf3eii.fsf@quad.sysarch.com>

>>>>> "MG" == Mladen Gogala <no@email.here.invalid> writes:

  MG> On Tue, 09 Nov 2010 13:24:09 -0500, Uri Guttman wrote:
  >> don't use map in a void context!

  MG> Uri, I read that several times. There was even a thread on Perlmonks 
  MG> about it:


  MG> http://www.perlmonks.org/index.pl?node_id=296742


  MG> However, they say that this use is not deprecated, but "derided". Perl 
  MG> 5.8 and later doesn't necessarily build an output list, unless 
  MG> specifically requested. I must confess to have written numerous code 
  MG> snippets, especially with regular expressions:

  MG> map { s/.../.../; } @array;

  MG> simply because it's shorter than foreach my $x (@array) {
  MG>                                     $x=~ s/.../.../;
  MG>                                  }

and this is even shorter!

	s/.../.../ for @array;

  MG> I even benchmarked one version against the other, finding the speed to be 
  MG> approximately the same. Is that disdain for  the map in void context just 
  MG> a custom or is based on some real problems caused by the code like that?
  MG> Thanks for your time and comments.

you are missing the point. code is NOT for computers, it is for other
people to read. map is designed to make a list. if you use map in a void
context you are not making a list. regardless of whether perl makes a
list internally based on context, you are MISLEADING the reader of the
code. you are say i use map so look for a list but there IS NO LIST. the
for modifier (which you should learn) says i am doing something to each
element of the list so don't look for a return list. it tells the reader
more about your intention and doesn't mislead them. good code is making
it clear what you are doing for the reader of the code.

so to make it clear:

code is for people, NOT computers.

code is for OTHER people, not yourself.

burn those into your brain and you will instantly become a better coder.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


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

Date: 11 Nov 2010 13:06:53 GMT
From: kevin kitenik <kitenik@gmail.com>
Subject: perl  html parser
Message-Id: <4cdbea6d$0$21496$426a74cc@news.free.fr>

Hi everybody,

i have a piece of html file, that countain special if-then-else statements :
like these ones:
<if condition="$vboptions['hometitle']"><a href="$vboptions[homeurl]">$vboptions[hometitle]</a> -</
if>
<if condition="$vboptions[privacyurl]"><a href="$vboptions[privacyurl]"><else><tr><td>test here
</if>

thos i statement can be imbricated :
if ... then   ...
else 
	if  .. then ...
	fi
fi


the problem is i awant a wat to tansform these staments to :
((cond1)) ? (exec1)) : ((exec2))    styles.

how can i do this ???
i used the cpan without any succes !!

use Parse::RecDescent;
my @s=( q{<if condition="$vboptions['hometitle']"> <a href="$vboptions[homeurl]">$vboptions
[hometitle]</a> - </if>});

&pars;
sub pars {
        my $parser = new Parse::RecDescent( q{
startrule:      S
S:              if ifC '">' then S else S fi {$return="(($item[2]) ? (\"$item[5]\") : ($item[7]))";}
                | if ifC '">' then S fi {$return="(($item[2]) ? (\"$item[5]\") : (\"\"))";}
                | html {$return=$item[1];}
if:             '<if condition="'
fi:             '</if>'
ifC:            /[^"]+/
then:           ''
else:           '<else>' | '<else />'
html:          /[\w\d_\$,\[\] ="\/\<\>-]+/          });
foreach my $s (@s){
  print $s . ":\n" . $parser->startrule( $s ) . "\n"} }


i thank you in advance, for any syggestions, cause i have a headeack ;-)
-- 
thanks a lot.


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

Date: Thu, 11 Nov 2010 19:19:20 +0100
From: "Dr.Ruud" <rvtol+usenet@xs4all.nl>
Subject: Re: testing whether a number is an integer
Message-Id: <4cdc33a9$0$81478$e4fe514c@news.xs4all.nl>

On 2010-11-11 01:28, ccc31807 wrote:

> I guess my beef is that Perl lacks this kind of predicate

Bullocks:

    die "Problems in row $." if @courses % 3;

-- 
Ruud


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

Date: Thu, 11 Nov 2010 05:38:29 -0800
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Using Perl to find what address bar says
Message-Id: <bmrnd616cfmc18hg4h18c196u62uf3air2@4ax.com>

jwcarlton <jwcarlton@gmail.com> wrote:

>I have a very clear understanding of how "web apps work." 

Then I am sure you can show us this HTTP request that allows the server
to query the client for the content of the address bar.
 
>The question
>was simply to ask if you guys knew of a way to do so, since I do not.

Newsflash: there ain't no such thing in HTTP as a server sending a
request to the client.

>The thing is, you guys are under the false impression that you know
>everything. You do not. You do not know me, nor do you know my level
>of knowledge or expertise. I asked a question. That's all.

Yep. And it was a question that reveiled a lot about the person asking.

It actually reminds me of an old joke:

An [insert your favourite minority] has heard that you can cut a lot
more wood with a chain saw, so he bought one. After several days he
returned to the store, complaining that it doesn't work and that
actually it is even more difficult to cut wood with that chain saw than
with his old trusted crosscut saw.
The store clerk: "That surprises me, sir, let's see what's wrong".
Primed the chain saw, pulled the cord, pushed the trigger: wwwroooommm,
wwwwwrrrrroooomm, wwwrrrroooooommmmmmm 
The customer: "What is that noise?"

Your question was akin to the question of that customer. You don't
understand the underlying basic concept.

jue


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

Date: Thu, 11 Nov 2010 08:07:32 -0600
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Using Perl to find what address bar says
Message-Id: <slrnidnujp.m5m.tadmc@tadbox.sbcglobal.net>

Jürgen Exner <jurgenex@hotmail.com> wrote:
> jwcarlton <jwcarlton@gmail.com> wrote:
>
>>I have a very clear understanding of how "web apps work." 
>
> Then I am sure you can show us this HTTP request that allows the server
> to query the client for the content of the address bar.
>  
>>The question
>>was simply to ask if you guys knew of a way to do so, since I do not.
>
> Newsflash: there ain't no such thing in HTTP as a server sending a
> request to the client.
>
>>The thing is, you guys are under the false impression that you know
>>everything. You do not. You do not know me, nor do you know my level
>>of knowledge or expertise. I asked a question. That's all.
>
> Yep. And it was a question that reveiled a lot about the person asking.


And that person's followups reveal even more.


> It actually reminds me of an old joke:
>
> An [insert your favourite minority] has heard that you can cut a lot
> more wood with a chain saw, so he bought one. After several days he
> returned to the store, complaining that it doesn't work and that
> actually it is even more difficult to cut wood with that chain saw than
> with his old trusted crosscut saw.
> The store clerk: "That surprises me, sir, let's see what's wrong".
> Primed the chain saw, pulled the cord, pushed the trigger: wwwroooommm,
> wwwwwrrrrroooomm, wwwrrrroooooommmmmmm 
> The customer: "What is that noise?"
>
> Your question was akin to the question of that customer. You don't
> understand the underlying basic concept.


He had an opportunity to fix his misunderstanding here and advance
his knowledge of his profession, but seems determined to maintain 
arrogant ignorance instead.


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.


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

Date: Thu, 11 Nov 2010 08:28:47 -0800
From: Keith Thompson <kst-u@mib.org>
Subject: Re: Using Perl to find what address bar says
Message-Id: <lnfwv77rk0.fsf@nuthaus.mib.org>

Mart van de Wege <mvdwege@mail.com> writes:
> jwcarlton <jwcarlton@gmail.com> writes:
[...]
>> I have a very clear understanding of how "web apps work." 
>
> No you don't.
>
> You *cannot*, by definition, know what happens on the client. Not even
> with client-side scripting. You have to trust the client for that.

I admit that *I* don't have a very clear understanding of how
web apps work, so the following is likely to be completely wrong.
I'd be interested in knowing what's wrong about it.

Perl generally runs on the server side, and therefore doesn't
have access to the browser's (client's) internal information (in
this case, the contents of the address bar).  Javascript generally
runs on the client side: the browser downloads Javascript code and
executes it locally.  Have I got that right so far?

Would it be possible for some Javascript code, running in the
browser, to query the contents of the address bar and then send
that information to code running on the server?

My first thought is that this could open up serious security holes,
and that there are measures already in place to prevent it, but I
don't know the details.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"


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

Date: Thu, 11 Nov 2010 11:38:26 -0500
From: Sherm Pendley <sherm.pendley@gmail.com>
Subject: Re: Using Perl to find what address bar says
Message-Id: <m2aalflssd.fsf@sherm.shermpendley.com>

Keith Thompson <kst-u@mib.org> writes:

> Perl generally runs on the server side, and therefore doesn't
> have access to the browser's (client's) internal information (in
> this case, the contents of the address bar).  Javascript generally
> runs on the client side: the browser downloads Javascript code and
> executes it locally.  Have I got that right so far?

Generally, although there are exceptions. IE will run any language
the Windows Scripting Host supports, and ActiveState's Perl includes
a WSH "PerlScript." And Netscape's HTTP server (back when Netscape
made one) supported using JavaScript on the server to produce dynamic
content.

Basically, the protocols and techniques are language-agnostic, although
it's certainly true that some languages are more popular for particular
pieces of the puzzle.

> Would it be possible for some Javascript code, running in the
> browser, to query the contents of the address bar and then send
> that information to code running on the server?

Possible, I suppose, but why jump through such hoops when document.URL
is a standard property that doesn't depend on the presence of an address
bar, or on what would undoubtedly be browser-specific hacks for accessing
its contents?

sherm--

-- 
Sherm Pendley
                                   <http://camelbones.sourceforge.net>
Cocoa Developer


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

Date: Thu, 11 Nov 2010 11:02:24 -0600
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Using Perl to find what address bar says
Message-Id: <4cdc21a1$0$87064$815e3792@news.qwest.net>

Keith Thompson wrote:
[...]
> Would it be possible for some Javascript code, running in the
> browser, to query the contents of the address bar and then send
> that information to code running on the server?

Yes. Instead of posting that here, you could find out for
yourself by simply searching the Internet on Javascript
and address bar (hint:location.href or document.url)
and you'll find how to get the value in a few seconds.

Sending information from browser to a server is typically done
via AJAX or possibly on form.submit, also done in Javascript.


> 
> My first thought is that this could open up serious security holes,
> and that there are measures already in place to prevent it, but I
> don't know the details.
> 

Referer might also be what you're after, but can be easily disabled
from the browser.


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

Date: Thu, 11 Nov 2010 19:27:27 +0100
From: Mart van de Wege <mvdwege@mail.com>
Subject: Re: Using Perl to find what address bar says
Message-Id: <867hgju35c.fsf@gareth.avalon.lan>

Keith Thompson <kst-u@mib.org> writes:

> Mart van de Wege <mvdwege@mail.com> writes:
>> jwcarlton <jwcarlton@gmail.com> writes:
> [...]
>>> I have a very clear understanding of how "web apps work." 
>>
>> No you don't.
>>
>> You *cannot*, by definition, know what happens on the client. Not even
>> with client-side scripting. You have to trust the client for that.
>
> I admit that *I* don't have a very clear understanding of how
> web apps work, so the following is likely to be completely wrong.
> I'd be interested in knowing what's wrong about it.
>
> Perl generally runs on the server side, and therefore doesn't
> have access to the browser's (client's) internal information (in
> this case, the contents of the address bar).  Javascript generally
> runs on the client side: the browser downloads Javascript code and
> executes it locally.  Have I got that right so far?
>
> Would it be possible for some Javascript code, running in the
> browser, to query the contents of the address bar and then send
> that information to code running on the server?

Perhaps.

However, you still run up against the fundamental problem: you're
trusting the client. You cannot *know* for sure that the information is
correct, because the client is in control of the information being sent
to you.

Mart

-- 
"We will need a longer wall when the revolution comes."
    --- AJS, quoting an uncertain source.


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

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


Administrivia:

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

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#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 V11 Issue 3206
***************************************


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