[16855] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4267 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 8 21:06:25 2000

Date: Fri, 8 Sep 2000 18:05:18 -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: <968461518-v9-i4267@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 8 Sep 2000     Volume: 9 Number: 4267

Today's topics:
        .NET in One Day <training@eiffel.com>
    Re: .NET in One Day <care227@attglobal.net>
    Re: [PREANNOUNCE] perldoc =~ s/old/new()/geewhizbang (Gwyn Judd)
    Re: accessing a shared folder within Intranet <bcaligari@my-deja.com>
    Re: Commercial websites using perl <brian+usenet@smithrenaud.com>
    Re: Commercial websites using perl (Gwyn Judd)
        Copying a directory from the network <mark_shutt@hotmail.com>
    Re: Does PERL(Version 5.005 or greater) supports UNIX_S (Chris Fedde)
    Re: Environment variables - how to list them all? <godzilla@stomp.stomp.tokyo>
    Re: Environment variables - how to list them all? <brian+usenet@smithrenaud.com>
    Re: Environment variables - how to list them all? (Gwyn Judd)
    Re: Environment variables - how to list them all? <flavell@mail.cern.ch>
    Re: Environment variables - how to list them all? (Craig Berry)
    Re: Environment variables - how to list them all? <uri@sysarch.com>
    Re: Environment variables - how to list them all? <godzilla@stomp.stomp.tokyo>
    Re: Environment variables - how to list them all? <lr@hpl.hp.com>
        Expert Question on: Https + Proxy andkovacs@my-deja.com
    Re: fgrep -i  "greek_word" DOES NOT WORK (Håkon Alstadheim)
    Re: How? Read a file from another server? <webmaster@cobnet.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 8 Sep 2000 15:18:45 -0700
From: "Interactive Software Engineering, Inc." <training@eiffel.com>
Subject: .NET in One Day
Message-Id: <r7obp8.n321.ln@pompeii.ise>

NET IN ONE DAY: The Multi-Language Platform for the Age of the Internet
A one-day course by Bertrand Meyer

In July of 2000 Microsoft introduced the .NET framework, the most important
development since the introduction of Windows in 1991. The result of a $2
billion investment, .NET is a revolutionary multi-language platform
integrating all aspects of application development and closely integrating
the Web at every step.

This information-packed one-day course covers the essentials of .NET,
including both the "big picture" and a review of all major aspects of the
technology. Presented by Dr. Bertrand Meyer, one of the pioneers of modern
software technology, it is based on more than one year's advance exposure to
NET prior to the technology's official release. Dr. Meyer's team at
Interactive Software Engineering and Monash University worked with Microsoft
to integrate ISE's technology with .NET, culminating in a joint appearance
with Bill Gates at the Microsoft Professional Development Conference that
first introduced .NET.

COURSE OUTLINE
===============

1. Overview
-----------

* .NET in 15 minutes: an overview of the technology and its contributions.

2. The challenges: if .NET is the answer, what are the questions?
-----------------------------------------------------------------

* Background: The Internet and the evolution of software development.
E-commerce and its demands. Requirements of mission-critical applications.
Exposing the business model.
* Object Technology: contribution and challenges. O-O languages, GUI tools,
databases.
* Component-based development: COM, CORBA, Enterprise Java Beans. The
notion of Interface Description Language. Contributions and limitations
of pre-.NET component approaches.
* Programming for the Web and e-commerce: CGI scripts, Active Server Pages,
Java Server pages. Advantages and drawbacks.
* The state of multi-language interoperability. Approaches to portable
application development. Graphics, database issues.

3 .NET: The Vision and the Platform
-----------------------------------

* The .NET architecture: runtime, framework, platform, web services.
* The .NET runtime: architecture and goals. Comparison with the Java
Virtual Machine.
* MSIL: the intermediate language. Security issues and the concept of
verifiability. How critical is it to produce verifiable code?
* Organizing and extending your components: assemblies and metadata. An
application: equipping components with contracts.

4. The .NET object model and type system
----------------------------------------

* Classes, methods, fields, properties and events
* .NET types: reference and value types, array types, arrays
* Inheritance concepts: multiple interface inheritance, novariance
* Encapsulating behavior: delegates
* C#: a language for programming .NET
* C# versus Java
* .NET mechanisms and the dominant languages: commonalities
and mismatches. How easy is it to map an existing language
into the .NET model?

5. Language interoperability
----------------------------

* Available languages and degree of interoperability. Cross-language
inheritance; cross-language debugging
* The Common Language System: both a consumer and an extender be
Levels of compliance
* Advantages and challenges of CLS compliance
* Examples: combining components from various languages
* From a common runtime to a common development environment:
Visual Studio.NET and the concept of multi-language, pluggable
environment. GUI, browsing, debugging

6. Frameworks and applications
 ------------------------------

* Web and Win Forms
* Remoting and threading capabilities
* ASP+: Active Server Pages +. Building advanced Web sites for e-commerce
* Web services, SOAP and Building Block Services
* Database access and manipulation: ADO+

7. Summary and perspective
--------------------------

* .NET and the competition
* The significance of .NET
* Future developments
* Corporate strategies: getting ready for .NET


COURSE MATERIAL
================

The material distributed to participants includes more than 150 slides, as
well as supporting articles.

WHO SHOULD ATTEND
=================

This course presents a compact, in-depth survey of the .NET
technology over one day. It is intended for both managers
(VPs of technology, CTOs, project leaders, Web content
managers, e-commerce strategy leaders) and for software
developers who want to know about the most important technology
offering in many years. The .NET technology will affect everyone;
no one can afford to miss it.


ABOUT THE SPEAKER
==================

Dr. Bertrand Meyer has played a major role in developing modern software
technology and bringing it to software engineers working in production
environments. Bertrand is best known for his best-seller "Object-Oriented
Software Construction" (2nd edition, Prentice Hall, 1997), recipient of the
Jolt Award and one of the seminal works on modern software technology.
He is the author of 8 other books on software technology, programming
languages and object-oriented development, including "Reusable Software",
"Eiffel: The Language" and "Object Success", and of numerous widely
cited articles. He is a columnist for Software Development magazine,
the Journal of Object-Oriented Programming and was Department Editor
for IEEE Computer. He is the series chair for the international TOOLS
conferences (USA, Europe, Pacific), devoted to component and object
technology.
He is also the editor of the Prentice Hall Object and Component Technology
Series.
As head of ISE's development team, he has led the design of tools and
environments used routinely by major corporations worldwide for their
mission-critical applications.

LOCATIONS
==========
AUSTRALIAN AND EUROPEAN LOCATIONS:

Melbourne, Australia: September 19
Canberra, Australia: September 21
Oslo, Norway: September 29
Stockholm, Sweden: October 3
Antwerp, Belgium: October 5
Amsterdam, Netherlands: October 6
Stuttgart, Germany: October 9

US LOCATIONS:

Boston, MA: October 16
New York, NY: October 17
Washington, DC: October 18
Chicago, IL: October 20
Palo Alto, CA: October 25
Denver, CO: October 26
Tampa, FL: November 13
Austin, TX: November 14

FEE
===

USA: USD 695.00 or USD 645.00*
United Kingdom: 495 GBP or 455 GBP*
Belgium: 32995 BEF or 29995 BEF*
Sweden: 6490 SEK or 5990 SEK*
The Netherlands: 1795 NLG or 1695 NLG*
Switzerland: 1295 CHF or 1225 CHF*
Australia: 695 AUD or 645 AUD*
Norway: 6295 NOK or 5865 NOK*
Germany: 1495 DM or 1395 DM*

* if paid three weeks prior to the session.

A 10% discount will be applied to registrations
for 3 or more people from the same company registering at the same time.

A 20% discount will be applied to registrations
for 5 or more people from the same company registering at the same time.

REGISTRATION FORM
==================
The registration is available on-line, by phone at 805-685-1006, or using
the form below by fax at 805-685-6869 or by email at
training@dotnet.experts.com:

I am registering for:

___Melbourne, Australia: September 19
___Canberra, Australia: September 21
___Oslo, Norway: September 29
___Stockholm, Sweden: October 3
___Antwerp, Belgium: October 5
___Amsterdam, Netherlands: October 6
___Stuttgart, Germany: October 9
___Boston, MA: October 16
___New York, NY: October 17
___Washington, DC: October 18
___Chicago, IL: October 20
___Palo Alto, CA: October 25
___Denver, CO: October 26
___Tampa, FL: November 13
___Austin, TX: November 14

***ALL PAYMENTS (Credit Card, International Money Order and
Bank Transfer) MUST BE MADE IN US DOLLARS.***

Address:
Company__________________________________________________

Department or Division ____________________________________

Street Address___________________________________________

City _____________________Zip Code ______________________

State _____ _____________________________________________

Country ____________________________

Telephone ______________________ Fax ____________________

Email ___________________________________________________

Names of Participants:

______________________________________________

______________________________________________

______________________________________________

______________________________________________

______________________________________________

Method of Payment (check one):
_____Check enclosed (amount) ___________________________
(make check payable to Interactive Software Engineering, Inc.)
_____Credit Card
Number____________________________Exp. Date__________

Authorized Signature____________________________________














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

Date: 08 Sep 2000 22:31:09 GMT
From: Drew Simonis <care227@attglobal.net>
Subject: Re: .NET in One Day
Message-Id: <39B96644.2AECEBC5@attglobal.net>

"Interactive Software Engineering, Inc." wrote:
> 
> NET IN ONE DAY: The Multi-Language Platform for the Age of the Internet
> A one-day course by Bertrand Meyer
> 
> In July of 2000 Microsoft introduced the .NET framework, the most important
> development since the introduction of Windows in 1991. The result of a $2
> billion investment, .NET is a revolutionary multi-language platform
> integrating all aspects of application development and closely integrating
> the Web at every step.

What exactly does this drivel mean?  Keep your spam to yourself.

dha???


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

Date: Fri, 08 Sep 2000 22:24:07 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: [PREANNOUNCE] perldoc =~ s/old/new()/geewhizbang
Message-Id: <slrn8ripo4.8ll.tjla@thislove.dyndns.org>

I was shocked! How could Tom Christiansen <tchrist@perl.com>
say such a terrible thing:
>For those who like to stand on the cutting edge of the future

[gwyn@thislove:~/perlman/etc]$ perlman --man
Use of uninitialized value in length at
/home/gwyn/perlman/lib/Pod/Tools/podpath.pm line 163.
Use of uninitialized value in length at
/home/gwyn/perlman/lib/Pod/Tools/podpath.pm line 163.
Use of uninitialized value in length at
/home/gwyn/perlman/lib/Pod/Tools/podpath.pm line 163.
Use of uninitialized value in length at
/home/gwyn/perlman/lib/Pod/Tools/podpath.pm line 163.



PERLMAN(1)     User Contributed Perl Documentation     PERLMAN(1)

I think you want to use defined() rather than length there.

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
The Vulcan Neck Pinch is not half so powerful as the Vulcan Groin Kick,
but it's more politically correct.
		-- William White


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

Date: Fri, 08 Sep 2000 23:10:38 GMT
From: Brendon Caligari <bcaligari@my-deja.com>
Subject: Re: accessing a shared folder within Intranet
Message-Id: <8pbrl1$u61$1@nnrp1.deja.com>

In article <xq8u5.5980$JY2.1551591@typhoon.nyroc.rr.com>,
  "David Prowak" <dprowak@ci.syracuse.ny.us> wrote:
> Hi,
>
> I'm trying to automate a transfer of a document (.doc) from a shared
folder
> on someone's PC to our web server.
>
> The IP of the PC where the document located is known.
>
> I'd like to write a Perl program that will be run from the web server
> and transfer the file from the shared folder to the web server.
>
> How can I go about "getting" the document from the shared folder?
>
> Are there any Perl modules that would facilitate such a program?
>
> TIA,
>
> Dave
>
>

you might be better off writing a batch file that copies the file from
one place the other

eg

copy \\johnpc\HisShare\HisFile.doc c:\rubbish\John /y

Brendon


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


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

Date: Fri, 08 Sep 2000 18:35:33 -0400
From: brian d foy <brian+usenet@smithrenaud.com>
Subject: Re: Commercial websites using perl
Message-Id: <brian+usenet-BD6C8B.18353308092000@news.panix.com>

In article <Pine.LNX.4.20.0009081355070.9810-100000@aztec.zanshin.com>, 
Bart Schaefer <schaefer@zanshin.com> wrote:

> I'd like to identify some commercial websites that are using perl as their
> "web application server" -- as opposed to Microsoft SiteServer, WebLogic,
> Dynamo, BroadVision, StoryServer, XPedio, etc. etc.

see http://perl.apache.org

-- 
brian d foy


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

Date: Sat, 09 Sep 2000 00:29:12 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Commercial websites using perl
Message-Id: <slrn8rj12m.8ll.tjla@thislove.dyndns.org>

I was shocked! How could Bart Schaefer <schaefer@zanshin.com>
say such a terrible thing:
>I'd like to identify some commercial websites that are using perl as their
>"web application server" -- as opposed to Microsoft SiteServer, WebLogic,
>Dynamo, BroadVision, StoryServer, XPedio, etc. etc.

http://www.slashdot.org

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
The person who's taking you to lunch has no intention of paying.


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

Date: Fri, 08 Sep 2000 23:28:51 GMT
From: Mark <mark_shutt@hotmail.com>
Subject: Copying a directory from the network
Message-Id: <srithjbiljn61@corp.supernews.com>

I am writing a utility with a web interface which includes copying a 
user's directory (including all subdirectories and is specified by the 
user) to a directory on the network. I am using Perl CGI scripts on a 
Windows server to accomplish this. I have two questions...

1) How do I get the path to the root of the directory I want to copy? I am 
currenty using a form text field and am prompting the user to enter the 
directory (i.e., c:\directory). I was wondering if there is a way to have 
a browse button used. The HTML <input type=file> tag needs a specific file 
entered, not just a directory path, and doesn't send the path of the file 
as far as I know.

2) Once I have the path of the user's directory, how do I access it? If I 
use C:\directory it will assume the c: drive is the server, not the user's 
c: drive. If it comes down to it, is it possible to temporarily map a 
user's drive? This is on an internal network and the server will have 
access to the user's drive.

Once I am able to access the user's drive and directory, I can use the DOS 
command XCOPY to copy the directory to the server.

Any help is greatly appreciated. Thanks.

Mark

--
Posted via CNET Help.com
http://www.help.com/


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

Date: Fri, 08 Sep 2000 22:55:16 GMT
From: cfedde@u.i.sl3d.com (Chris Fedde)
Subject: Re: Does PERL(Version 5.005 or greater) supports UNIX_SV (NCR) platform?
Message-Id: <o7eu5.30$W3.170617344@news.frii.net>

In article <8pblp0$5mk1@emcnews1.lss.emc.com>, api <zyang@emc.com> wrote:
>Does anyone know if PERL(Version 5.005 or greater) supports UNIX_SV (NCR)
>platform?
>I couldn't build perl successfully using source code.
>You advice is appreciated!
>
>~api~
>

I've not seen a unixoid platform where perl does not compile "out
of the box" or with a few minor changes to Configures command
line. Can you share what went wrong so that maybe we will be able
to make suggestions?

chris
-- 
    chris fedde
    303 773 9134


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

Date: Fri, 08 Sep 2000 15:19:51 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Environment variables - how to list them all?
Message-Id: <39B96607.F900F6D3@stomp.stomp.tokyo>

Craig Berry wrote:

> Godzilla! (godzilla@stomp.stomp.tokyo) wrote:

> : Speaking of cute and sort, this short script produces a
> : very pretty sorted output and exceptionally nice document
> : source for those looking to use an html interface.

(snipped)
 
> : @Array = sort(@Array);
 
> ...but there's a problem with doing the sort here.  Consider that env
> variables may contain (e.g.) '-' characters, a character which
> sorts lexically before '='.  If you form the full "name=value" string and
> then sort the results, you end up with 'foo-bar=baz' before 'foo=quux' in
> the output, which violates the usual sort order.  Better to sort the keys
> and then iterate over the results.


Alright Mr. Berry, I have come to trust you. I am willing
to listen and learn. What enviromental variables available
at a server contain a hyphen ??? I am being sincere, I really
don't know and, am truly confused. This sorts on alphabetical
letters, that is, the first letter of each key value and 
outward from there through each string, individually.

I've provided an output below, with some sensitive
information deleted. How would a hyphen affect this
output created by my script? 

You are talented at effective communication. If you
wouldn't mind, help me to understand this hyphen problem
and, in turn, you will certainly help others as well.
Otherwords, what am I doing wrong in my script?


Godzilla!
-- 
Bark Bent - Ace News Reporter
  http://la.znet.com/~callgirl/android/news.cgi


These are my environmental variables,
sorted alphabetically by my script:


DOCUMENT_ROOT = [deleted] 
GATEWAY_INTERFACE = CGI/1.1 
HTTP_ACCEPT = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png,
*/* 
HTTP_ACCEPT_CHARSET = iso-8859-1,*,utf-8 
HTTP_ACCEPT_ENCODING = gzip 
HTTP_ACCEPT_LANGUAGE = en 
HTTP_CONNECTION = Keep-Alive 
HTTP_HOST = la.znet.com 
HTTP_REFERER = http://la.znet.com/~callgirl/test.cgi? 
HTTP_USER_AGENT = Mozilla/GODZILLA! GO GO GODZILLA! 
PATH = [deleted] 
QUERY_STRING =  
REMOTE_ADDR = 207.167.96.141 
REMOTE_HOST = lats3-141.znet.net 
REMOTE_PORT = 1464 
REQUEST_METHOD = GET 
REQUEST_URI = /~callgirl/test.cgi? 
SCRIPT_FILENAME = [deleted] 
SCRIPT_NAME = /~callgirl/test.cgi 
SCRIPT_URI = http://la.znet.com/~callgirl/test.cgi 
SCRIPT_URL = /~callgirl/test.cgi 
SERVER_ADDR = 207.167.96.1 
SERVER_ADMIN = support@znet.com 
SERVER_NAME = la.znet.com 
SERVER_PORT = 80 
SERVER_PROTOCOL = HTTP/1.0 
SERVER_SOFTWARE = [deleted]
TZ = US/Pacific


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

Date: Fri, 08 Sep 2000 18:34:07 -0400
From: brian d foy <brian+usenet@smithrenaud.com>
Subject: Re: Environment variables - how to list them all?
Message-Id: <brian+usenet-A250B4.18340708092000@news.panix.com>

In article <39B96607.F900F6D3@stomp.stomp.tokyo>, "Godzilla!" 
<godzilla@stomp.stomp.tokyo> wrote:

> Craig Berry wrote:

> > Godzilla! (godzilla@stomp.stomp.tokyo) wrote:

> > : @Array = sort(@Array);
>  
> > ...but there's a problem with doing the sort here.  Consider that env
> > variables may contain (e.g.) '-' characters, a character which
> > sorts lexically before '='.

> Alright Mr. Berry, I have come to trust you. I am willing
> to listen and learn. What enviromental variables available
> at a server contain a hyphen ?

the "X-" headers contain a hyphen, for instance. HTTP is extensible.
the user can add headers, and those headers might have hyphens
in them. a field name is a token, and a token is any character
save for control characters and separators.  here is an extract
from the header BNF in the HTTP specification:


       message-header = field-name ":" [ field-value ]
       field-name     = token
       field-value    = *( field-content | LWS )
       field-content  = <the OCTETs making up the field-value
                        and consisting of either *TEXT or combinations
                        of token, separators, and quoted-string>


       token          = 1*<any CHAR except CTLs or separators>
       separators     = "(" | ")" | "<" | ">" | "@"
                      | "," | ";" | ":" | "\" | <">
                      | "/" | "[" | "]" | "?" | "="
                      | "{" | "}" | SP | HT

       CTL            = <any US-ASCII control character
                        (octets 0 - 31) and DEL (127)>

-- 
brian d foy


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

Date: Fri, 08 Sep 2000 23:12:05 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Environment variables - how to list them all?
Message-Id: <slrn8risi3.8ll.tjla@thislove.dyndns.org>

I was shocked! How could Steve Drewell <bd83h@bedford.waii.com>
say such a terrible thing:
>I'm new to perl and would like to know how to get a list of ALL
>environment variables and their values from within a perl script.
>Something equivalent to the "env" command in a c-shell is what
>I'm after.

use Data::Dumper;

print Dumper \%ENV;

will do what you want and it gives nicer output than the other
suggestions I think.

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
In good speaking, should not the mind of the speaker know the truth of
the matter about which he is to speak?
		-- Plato


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

Date: Sat, 9 Sep 2000 00:55:46 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Environment variables - how to list them all?
Message-Id: <Pine.GHP.4.21.0009090054211.22034-100000@hpplus03.cern.ch>

On Fri, 8 Sep 2000, brian d foy wrote:

> the "X-" headers contain a hyphen, for instance. HTTP is extensible.
> the user can add headers, and those headers might have hyphens
> in them. 

Sure, but the corresponding CGI environment variables contain
underscores.




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

Date: Fri, 08 Sep 2000 23:21:32 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Environment variables - how to list them all?
Message-Id: <srit3sqpljn79@corp.supernews.com>

Godzilla! (godzilla@stomp.stomp.tokyo) wrote:
: Alright Mr. Berry, I have come to trust you. I am willing
: to listen and learn.

Coolness.

: What enviromental variables available
: at a server contain a hyphen???

I think you may be thinking that the space of available environment
variables is restricted to those defined for use by a CGI script, which is
not the case.  Others are frequently present and useful.  And these may
contain hyphens.  Observe:

  /usr2/people/cberry > setenv foo-bar baz
  /usr2/people/cberry > setenv foo quux
  /usr2/people/cberry > perl -e 'print join "\n", sort map { "$_=$ENV{$_}" }
    grep /^f/, keys %ENV'

That is, grab all the env variable names which start with 'f' (just to
limit the output size to the ones I'm using as a demo), turn each of these
into a "name=value" string, and sort the resulting array lexically,
printing the result.

Output:

  foo-bar=baz
  foo=quux

Note that dictionary sort on the names alone would place them in the
opposite order, but the artifact of comparing against the purely
syntactical '=' results in this order instead.

: I am being sincere, I really
: don't know and, am truly confused. This sorts on alphabetical
: letters, that is, the first letter of each key value and 
: outward from there through each string, individually.

Yes, but it includes the '=' (and the value part that follows) as if that
is part of what you should be sorting on.  The normal practice in
dictionary-like lists (of which this is clearly and example) is to sort
lexically on the key/name values only.

: I've provided an output below, with some sensitive
: information deleted. How would a hyphen affect this
: output created by my script? 

In your case, it doesn't matter, as no values are initial substrings of
other values, much less ones which first differ in a character which sorts
lexically before '='.  I hope my briefer example above makes the danger
clear, though.

: You are talented at effective communication. If you
: wouldn't mind, help me to understand this hyphen problem
: and, in turn, you will certainly help others as well.

Thanks for the vote of confidence, and I hope this makes the issue
clearer.

-- 
   |   Craig Berry - http://www.cinenet.net/~cberry/
 --*--  "Every force evolves a form."
   |              - Shriekback


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

Date: Fri, 08 Sep 2000 23:27:02 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Environment variables - how to list them all?
Message-Id: <x7r96uihx6.fsf@home.sysarch.com>

>>>>> "AJF" == Alan J Flavell <flavell@mail.cern.ch> writes:

  AJF> On Fri, 8 Sep 2000, brian d foy wrote:
  >> the "X-" headers contain a hyphen, for instance. HTTP is extensible.
  >> the user can add headers, and those headers might have hyphens
  >> in them. 

  AJF> Sure, but the corresponding CGI environment variables contain
  AJF> underscores.

it depends on what interface you use to set the env. execve just takes a
char ** pointer which can have anything in it. so you can pass and parse
anything which deosn't have null bytes.

bash won't allow a var with - to be set.

but gnu env program works just fine:

env x-y=foo perl -le 'print for sort keys %ENV'
CC
CDPATH
DISPLAY
EDITOR

<snip>

VISUAL
WINDOWID
XFILESEARCHPATH
_
x-y


the c calls getenv/setenv use = to split the key value so you can't use
= in the key. 

and perl uses a hash and probably some form of setenv which puts = in there.

but almost any other char would work.

perl -le '$ENV{"X-y"}="foo" ;print for sort keys %ENV'
<snip>
WINDOWID
X-y


now look at this:

perl -le '$ENV{"X=y"}="=foo" ; exec "printenv X"'
y==foo

perl -le '$ENV{"X=y"}="=foo" ; exec "printenv X=y"'
=foo

perl -le '$ENV{"X=y"}="=foo" ; exec "printenv X=y="'
foo

so it is looking for the key followed by =.



the final result is moronzilla is wrong as usual. you have to sort by
the key first to guarantee properly sorted values as even = can be in
the key of an ENV var.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: Fri, 08 Sep 2000 16:58:22 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Environment variables - how to list them all?
Message-Id: <39B97D1E.D40B07BA@stomp.stomp.tokyo>

Craig Berry wrote:
 
> Godzilla! (godzilla@stomp.stomp.tokyo) wrote:
 
> Coolness.

No, it's "Koolations!" if you want to be hip
and your mind still resides in the Summer
of Love, 1967, when I was humorously, seven.
 
> : What enviromental variables available
> : at a server contain a hyphen???
 
> I think you may be thinking that the space of available 
> environment variables is restricted to those defined for
> use by a CGI script,

Yes, this is what I am doing, quite precisely.

> which is not the case.  Others are frequently present and 
> useful. And these may contain hyphens.  Observe:

(snipped)

Ok, I follow this just fine. Makes very good sense.

 
> : I am being sincere, I really don't know and, am 
> : truly confused. This sorts on alphabetical letters,
> : that is, the first letter of each key value and
> : outward from there through each string, individually.
 
> Yes, but it includes the '=' (and the value part that follows)
> as if that is part of what you should be sorting on.  The normal
> practice in dictionary-like lists (of which this is clearly and 
> example) is to sort lexically on the key/name values only.

Bingo! There is what I needed to know. So, do my sort
first, add equal signs or whatever else seems nice,
after a sort, logically, during a print loop.

This will make you roll your eyes and grimace. I am thinking
to plug in a character where I had an equal sign, plug in
a character which is ignored by sort. Later, during a print
loop, replace this special character with whatever my
choice is to sort Key and Value for visual effect. I'll 
have to first find a table of some sort which shows
precedence levels for various characters. Perhaps 
there is standard character which is equal in 
precedence to a hyphen. I enjoy pulling schizo
stunts with Perl just to see if I can.

 
> In your case, it doesn't matter, as no values are initial
> substrings of other values, much less ones which first differ 
> in a character which sorts lexically before '='.  I hope my 
> briefer example above makes the danger clear, though.
 
Oh yes, very dangerous with someone like me doing
the programming. Never know, I might cause your
monitor to blow up in your face.

I follow your thoughts and examples very well
being clear and concise. By chance, are you
Mr. Beatty, my high school civics teacher?
He was once a lawyer, during the fifties and
sixties, but was disbarred for being politically
left wing. He became an excellent teacher later,
and remained Jerry Brown left wing.

What I can do Mr. Berry, if I share this short
script of mine with others, as is, would be to
qualify it as intended to be used for extracting
available cgi environmental variables, only.

Thanks Mr. Berry. I am now better informed and
enjoy a bit more confidence in knowledge. This
is trivia I have added to my dubious scrapbook.

**

As to your other article....


> <quibble>
> Methane is odorless.  "Natural gas" as used in homes has a smelly
> chemical added to it in order to make leaks more easily detectable.
> </quibble>

Yeah.. yeah.. ever light a fart? Trust me, it's methane.
This also explains why dead pigs lying out in sunshine
often explode, after a few days have passed, like them. 

So explain why my lover makes ugly faces, even pinches
his nose then leaps out of bed, when I make funny noises?

Long ago, during the Stone Age, about when I was born,
natural gas, methane, was tainted, hmm.. tinted, well
no, made smelly by use of skunk juice. True story!

Just as odd, a crazy ol' coot lady, like myself, who 
lives or did live not far from here at home, raised 
black widow spiders during War World Two. This spun 
'silk' from black widow spiders was used to make crosshair
bomb sites for bombers, B-47 ??? Anyhow, black widow
spiders produce a silk or whatever it is, which is
resistant to physical changes due to humidity and
temperature, leading to better accuracy to bomb those
darn Nazis and everyone else down below.

Well, I never met the crazy ol' lady who milked
skunks for their juice to add to methane gas. Kinda
suspect I am fortunate to not have met her.

* gets out a can tomato juice *

Only known cure for skunk juice, short of setting
your clothes and yourself on fire. Tell ya some
more trivia. Skunk juice is more powerful than
CS gas (cry soon gas) or CN gas (cry now gas).
A good squirt of skunk juice will double you
over, blinded, sooner than right now.

I don't understand why law enforcement doesn't
simply toss an agitated skunk into a crowd
of unruly people to disperse them.


Godzilla!
-- 
Bark Bent - Ace News Reporter
  http://la.znet.com/~callgirl/android/news.cgi


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

Date: Fri, 8 Sep 2000 17:25:47 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Environment variables - how to list them all?
Message-Id: <MPG.142323696f8fd24898ad4c@nntp.hpl.hp.com>

In article <39B97D1E.D40B07BA@stomp.stomp.tokyo> on Fri, 08 Sep 2000 
16:58:22 -0700, Godzilla! <godzilla@stomp.stomp.tokyo> says...

 ...

> This will make you roll your eyes and grimace. I am thinking
> to plug in a character where I had an equal sign, plug in
> a character which is ignored by sort. Later, during a print
> loop, replace this special character with whatever my
> choice is to sort Key and Value for visual effect. I'll 
> have to first find a table of some sort which shows
> precedence levels for various characters. Perhaps 
> there is standard character which is equal in 
> precedence to a hyphen. I enjoy pulling schizo
> stunts with Perl just to see if I can.

There is no 'character which is ignored by sort'.  Further, the 
'precedence levels for various characters' are their byte values 
interpreted as ordinal numbers.

So the character that you are looking for to replace '=' in your 
machinations is "\0", which is often used to delimit concatenated 
variable-length strings for sorting purposes.

 ...

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Fri, 08 Sep 2000 23:16:47 GMT
From: andkovacs@my-deja.com
Subject: Expert Question on: Https + Proxy
Message-Id: <8pbs0g$ugv$1@nnrp1.deja.com>

Hi,

I have a difficulty with the proxy server when I try to access https
web sites.
Without the proxy my script is running perfectly !

The script is running on NT, ActivePerl and OpenSSL is installed.
The proxy is something like : http://www.domain.com
The web site is something like : https://www.domain.com

The problem is that Perl should open an http type socket on the proxy
then send the encoded data through the proxy. I don’t see anything
similar implemented in perl LWP::Protocol::http.

I traced a regular browser and the browser is able to connect to that
https web site without any problem using the proxy. The browser uses
the method described above: browser opens regular connection on proxy
=> proxy opens connection on  https web site => proxy sends message
back to browser that connection is opened  => browser sends encoded
data through the socket opened.

Is there something implemented in Perl to handle this combination of
proxy (http) and web site (https) ?


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


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

Date: 08 Sep 2000 09:32:48 -0400
From: hakon.alstadheim@oslo.mail.telia.com (Håkon Alstadheim)
Subject: Re: fgrep -i  "greek_word" DOES NOT WORK
Message-Id: <m07l8novpb.fsf@alstadhome.cyberglobe.net>

"Theodore Stassinos" <thestas@dolnet.gr> writes:

> Hi.
> I've developed a small search engine using Perl, for an ads newspaper.
> 
> Although it works fine when it is for English words I have problem when the
> user inputs greek words in the search area.
> 
> As a matter of fact the unix instruction "fgrep" does work properly only
> with english words.
> When i give "fgrep -i "greek_word" it returns the ads which contain the
> exact greek word. The -i does not word.

This is just a convoluted way of saying "fgrep has the same problem as
perl", right ?

> 
> I am using the POST method to fetch the data, and for each word i receive in
> the search area, i give the instruction fgrep -i  -n "word_to_find" .
> 

The answer can be had by entering the command "perldoc
locale". (Follow the "See Also" !) . Remember that for this to work,
the locale module must be able to pick up the Greek locale some
way. If that does not happen automatically, I have given you clues to
find out what you must do already.

> I wonder if you could suggest me a way to avoid this problem .
> 
> Thank you in advance
> 
> 
> 
> 

-- 
Håkon Alstadheim, Montreal, Quebec, Canada  


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

Date: Sat, 09 Sep 2000 00:15:34 GMT
From: leonardz <webmaster@cobnet.com>
Subject: Re: How? Read a file from another server?
Message-Id: <8pbvel$2jd$1@nnrp1.deja.com>

Ok, I was being a little lazy there.  I did get FTP to work for me.
Thanks for being so kind as to lead me in the right direction here.

It is nice to get some guidance once in awhile.

Thanks very much,
leonardz


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


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

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


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