[13117] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 527 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Aug 14 16:07:49 1999

Date: Sat, 14 Aug 1999 13:05:11 -0700 (PDT)
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, 14 Aug 1999     Volume: 9 Number: 527

Today's topics:
        Another newbie brain fart... <bryon@planet-ink.net>
    Re: code references to builtin functions (Anno Siegel)
        Comparing Python and Perl <tchrist@mox.perl.com>
    Re: How to develope CGI scripts with ActivePerl for Win <jeff@vpservices.com>
        HTTP redirect..not working <acinader@panix.com>
    Re: HTTP redirect..not working (brian d foy)
    Re: Known Issues with perl <cassell@mail.cor.epa.gov>
    Re: Looking for a good Perl Book <uri@sysarch.com>
    Re: Major pack() gripe (Larry Rosler)
        mod_perl is in the Fortune 500 (brian d foy)
    Re: My program is not exiting why?? (Eric Bohlman)
        mylib.pl now MyLib.pm <nead@neadwerx.com>
    Re: New User Q: Shell script to Perl Equivalent <elaine@chaos.wustl.edu>
    Re: Perl penetration into Fortune 500? <jeff@vpservices.com>
    Re: Perl penetration into Fortune 500? <cassell@mail.cor.epa.gov>
    Re: Perl penetration into Fortune 500? (Bbirthisel)
    Re: Perl Script + Sending Mail <cassell@mail.cor.epa.gov>
        PointEdit Help dodli@my-deja.com
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Sat, 14 Aug 1999 11:53:21 -0600
From: Bryon Bean <bryon@planet-ink.net>
Subject: Another newbie brain fart...
Message-Id: <37B5AD08.CA408493@planet-ink.net>

Hi,

 I have a newbie question (and I hope it's not too detailed). I'm
passing a list of inventory property names and a list of inventory
property values to my package Inventory via the following:

$part_number{"$prop_value[2]"} =
Inventory::new(\@prop_name,\@prop_value);

The Inventory constructor looks like this:

sub new {

 my ($names,$values) = @_;
 my $this = {};
 bless $this;
 $this->Initialize($names,$values);
 return $this;
}

And my Initialize method looks like this:

sub Initialize{

 my ($this,$property_name,$property_value) = @_;
 my $i=0;

 foreach(@$property_name) {

  $this->{"@$property_name[$i]"} = @$property_value[$i];
  $i++;

 }
 return $this;
}

The thing that I can't figure out is, in my %part_number hash I have I
have two scalars for each inventory item. One being the value of
$prop_value[2] and the other being a reference. So if I wanted to print
I would have to use something like the following:

foreach $item(%part_number) {

 if(ref($item)) {

  print ("$item->{'descrptn'}\n");
  print ("$item->{'wieght'}\n");
  print ("$item->{'price'}\n");

 }
}

My question is, what am I doing wrong that I have to use, if
(ref($item)) { #print };. It makes me wonder if I'm going about all of
this wrong. Thank you for your time and any response is sincerely
appreciated.

Best Regards,
Bryon Bean
--
bryon@planet-ink.net



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

Date: 14 Aug 1999 19:37:49 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: code references to builtin functions
Message-Id: <7p4gid$u3f$1@lublin.zrz.tu-berlin.de>

Abigail <abigail@delanet.com> wrote in comp.lang.perl.misc:
>Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMCLXXIII
>September MCMXCIII in <URL:news:7p1e2m$smt$1@lublin.zrz.tu-berlin.de>:
>\\ Abigail <abigail@delanet.com> wrote in comp.lang.perl.misc:
>\\ >Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMCLXXIII
>\\ >September MCMXCIII in <URL:news:7p1aho$si5$1@lublin.zrz.tu-berlin.de>:
>\\ >'' 
>\\ >'' Of course you can wrap your trig functions in a hash of anonymous
>\\ >'' subs like this:
>\\ >'' 
>\\ >'' my %trigtab = (
>\\ >''   sin => sub { sin shift},
>\\ >''   cos => sub { cos shift},
>\\ >''   # etc
>\\ >'' );
>\\ >'' 
>\\ >'' Call them via
>\\ >'' 
>\\ >'' my $some_angle = 3.14159*4/100;
>\\ >'' my $func = shift; # shifts @ARGV
>\\ >'' 
>\\ >'' my $val = $trigtab{ $func}->( $some_angle);
>\\ >
>\\ >
>\\ >What's the purpose of the hash? You get an extra level of indirection,
>\\ >more characters to type, and you lose many of the features 'use strict;'
>\\ >gives you. 
>\\ 
>\\ While I'm sure you have a point, I'm not sure I get it.  It's another
>\\ way to call builtins by their name given as a string (look, no eval).
>\\ And it works fine under strict as far as it goes.
>
>Which part of the following example didn't you understand?
>
>\\ >    my %trigtab = (
>\\ >        sin => sub { sin shift},
>\\ >        cos => sub { cos shift},
>\\ >    );
>\\ >
>\\ >    # Oops, didn't create.
>\\ >    $trigtab {tan} -> ($some_angle);
>\\ >
>\\ >That gives a runtime error, while the following gives a compile time error:
>\\ >
>\\ >    $sin = sub {sin shift};
>\\ >    $cos = sub {cos shift};
>\\ >
>\\ >    # Oops, didn't create.
>\\ >    $tan -> ($some_angle);
>\\ 
>\\ Is that the Californian melanoma-be-dammed attitude towards tan?
>\\ Who wants it anyway?  But seriously, you lost me here.
>\\ 
>\\          tan => sub { my $x = shift; sin( $x)/cos( $x) },
>
>Indeed. But somehow, you forgot to define it. Or you typed 'tna'.
>What's your point?
>
>\\ but whom am I telling that...
>
>
>Oh well, perhaps you only have one variable in your programs, %big_hash.

I'm sorry, we must be talking about different things.  I could
belaborate but prefer to confess my bafflement and let it go.

Anno


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

Date: 14 Aug 1999 13:24:39 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Comparing Python and Perl
Message-Id: <37b5c277@cs.colorado.edu>

Please ignore the obstinate trolls.  Mostly they have religion, and
they damned well expect you to, too.  Learning another language is good
for you.  Try to stop making value judgments while you're doing it,
and actually learn something.  Here is a quick reimplementation of
my one of my geekwords programs.  The datafile follows this posting.
Here it is in Perl:

    #!/usr/bin/perl 
    # geekspeak correspondence lister, perl version
    # tchrist@perl.com

    open(DATAFILE, "< /tmp/geekwords")  or die "can't open /tmp/geekwords: $!";

    while (<DATAFILE>) {
        chomp;
        ($us, $them) = split(/\s*=\s*/, $_, 2);
        push @{ $us2them{$us} }, $them;
        push @{ $them2us{$them} }, $us;
    }

    for $word (sort keys %us2them) {
        next unless $them2us{$word};
        $ours = join(" or ", sort @{ $us2them{$word} } );
        $theirs = join(" or ", sort @{ $them2us{$word} } );
        print("When I say $word, I mean what you would call $ours, "
                . "but for you $word means what I would call $theirs.\n");
    }

    for $word (sort keys %us2them) {
        unless ($them2us{$word}) {  # already mentioned
            $theirs = join(" or ", sort @{ $us2them{$word} } );
            print("Where I say $word, you would say $theirs.\n");
        }
    }

    for $word (sort keys %them2us) {
        unless ($us2them{$word}) {  # already mentioned
            $ours = join(" or ", sort @{ $them2us{$word} } );
            print("Where you say $word, I would say $ours.\n");
        }
    }

And here is a Python version, which I don't pretend to be optimal,
because I'm not a serpentmaster:

    #!/usr/bin/env python
    # geekspeak correspondence lister, python version w/ regexes
    # by tchrist@perl.com

    import string, regex, regsub

    us2them = {}
    them2us = {}

    datafile = open("/tmp/geekwords", "r")
    pat = regex.compile("[ \t]*=[ \t]*")

    while 1: 
        line = datafile.readline()
        if not line: break

        us,them = regsub.split(line[:-1], pat)

        if not them2us.has_key(them): them2us[them] = []
        them2us[them].append(us)

        if not us2them.has_key(us): us2them[us] = []
        us2them[us].append(them)

    ourkeys = us2them.keys()
    ourkeys.sort()
    for word in ourkeys:
        if not them2us.has_key(word): continue

        wordlist = us2them[word]
        wordlist.sort()
        ours = string.joinfields(wordlist, " or ")

        wordlist = them2us[word]
        wordlist.sort()
        theirs = string.joinfields(wordlist, " or ")

        print("When I say %s, I mean what you would call %s " +
                "but for you %s means what I would call %s."
             ) % ( word, ours, word, theirs )

    for word in ourkeys:
        if not them2us.has_key(word): 
            wordlist = us2them[word]
            wordlist.sort()
            theirs = string.joinfields(wordlist, " or ")
            print "Where I say %s, you would say %s." % (word, theirs)

    theirkeys = them2us.keys()
    theirkeys.sort()

    for word in theirkeys:
        if not us2them.has_key(word): 
            wordlist = them2us[word]
            wordlist.sort()
            ours = string.joinfields(wordlist, " or ")
            print "Where you say %s, I would say %s." % (word, ours)

If you don't care to use regexes and can count on your
well-formed data, you can use this version:

    #!/usr/bin/env python
    # geekspeak correspondence lister, python version w/ strings
    # by tchrist@perl.com

    import string

    us2them = {}
    them2us = {}

    datafile = open("/tmp/geekwords", "r");

    while 1: 
        line = datafile.readline()
        if not line: break

        us,them = string.splitfields(line[:-1], " = ")

        if not them2us.has_key(them): them2us[them] = []
        them2us[them].append(us)

        if not us2them.has_key(us): us2them[us] = []
        us2them[us].append(them)

    ourkeys = us2them.keys()
    ourkeys.sort()
    for word in ourkeys:
        if not them2us.has_key(word): continue

        wordlist = us2them[word]
        wordlist.sort()
        ours = string.joinfields(wordlist, " or ")

        wordlist = them2us[word]
        wordlist.sort()
        theirs = string.joinfields(wordlist, " or ")

        print("When I say %s, I mean what you would call %s " +
                "but for you %s means what I would call %s."
             ) % ( word, ours, word, theirs )

    for word in ourkeys:
        if not them2us.has_key(word): 
            wordlist = us2them[word]
            wordlist.sort()
            theirs = string.joinfields(wordlist, " or ")
            print "Where I say %s, you would say %s." % (word, theirs)

    theirkeys = them2us.keys()
    theirkeys.sort()

    for word in theirkeys:
        if not us2them.has_key(word): 
            wordlist = them2us[word]
            wordlist.sort()
            ours = string.joinfields(wordlist, " or ")
            print "Where you say %s, I would say %s." % (word, ours)

I don't pretend that those are optimal, but they are reasonably
straight-forward.

Here are code counts, if this matters:

    % perl -lne '$c += /\S/ && ! /^\s*#/; END{print $c}' gkwd-perl
    26

    % perl -lne '$c += /\S/ && ! /^\s*#/; END{print $c}' gkwd-pyth-rx
    40

    % perl -lne '$c += /\S/ && ! /^\s*#/; END{print $c}' gkwd-pyth-str
    39

The python code count was driven up for several reasons:

    1) Python's lack of assignment operator causes a "fake" while(1) 
       loop that hides its end condition down in the loop as an 
       extra step.

    2) Python's requirement of explicit allocation caused an
       extra check before storing new words.

    3) Python's lack of a built-in sort that actually returns
       a useful value.

Here are timings:

    gkwd-perl           0.03u 
    gkwd-pyth-rx        0.20u 
    gkwd-pyth-str       0.15u

Obviously that's so little that a good deal of variance is to be expected.
Here it is again with the same input file replicated tenfold:

    gkwd-perl           0.22u
    gkwd-pyth-rx        0.88u 
    gkwd-pyth-str       0.47u

--tom

CD = CD-ROM
CD drive = CD
CGI scripts = CGIs
CORBA = ActiveX
DNS = domain name system
Evil Empire = AT&T
Evil Empire = Microsoft
Evil One = Bill Gates
FAQ = boring stuff
GUI = Windows
GUI annoyance = wizard
HTML = HTM
HTTP = web
IP = intellectual property
IP = internet protocol
IRC channel = chat room
IRC client = IRC browser
IT = tech-support
Internet Exploder = Internet Explorer
January 1, 2000 = next millennium
MS-ASCII = text
MS-HTML = HTML
Mordor = Redmond
Netscape = Internet
PC = home computer
PC = program counter
TCP/IP = IP
UBE = spam
Unix = UNIX
Unix programmer = elitist
WAN = Intranet
Web-based = Internet technology
Windoze = Windows
Wintel box = PC
a.out = EXE
access the web = surf the net
account = shell
alpha = beta
alpha = new technology
arithmetic = math
beggarware = shareware
beginner = newbie
beta = production
big business = enterprise
binaries = programs
binaries = shareware
binary = EXE
binary = eight-bit
binary edit = patch
bloatware = application
bloatware = apps
box = computer
break into = hack
brittle = optimized
browser = Internet
bug fix = upgrade
buggy = beta
buy = get
cat = type
challenging = impossible
check mail = logon to email
clean = simple
client = browser
code = software
coding = creating/making a file
command = system call
commercial network = Extranet
commonplace = ubiquitous
competence = elitism
compile = build
computer = server
computer scientist = engineer
computer scientist = mathematician
computer secretary = admin
condescending = elitist
configurable = confusing
configure = edit a file and rebuild
connect = logon
connect to http://www.foo.com/ = logon to foo.com
console = main monitor
control-C = interrupt
controller = hard drive
copy = download
copy = upload
coredump = blue screen
couldn't care less = could care less
cracker = hacker
criminal = hacker
crippleware = shareware
customer = client
daemon = server
data = some data
data file = binary file
datum = a data
delete = backspace
digital nervous system = DNS
directory = folder
disconnected from the Internet = offline
disk = CD-ROM
disk = hard drive
disk controller = hard drive
disk drive = hard drive
disk space = memory
diskette = disk
distracting = flashy
drive = hard drive
editor = text editor
elite = competent
elite = professional
elite = top-notch
enterprise = that spaceship from Star Trek
executable = program
executables = programs
expert-hostile = user-friendly
exploited design flaws = viruses
eye trash = banner ads
file = binary file
file = text file
file system = drive letter
file system = hard drive
fix = hire a consultant for
fleeceware = commercial software
fleeceware = software
flexible = difficult
floppy = disk
floppy disk = disk
folder = e-mail folder
function = command
functional = plain
garbage = attachment
get = download
grab = download
greatest common factor = least common denominator
grep = search
guru = god
hack = code up
hacker = coder
hard to read = encrypted
hide = protect
install = load
internal network = Intranet
interrupt = IRQ
kernel + libraries + daemons + tools + GUI = operating system
kernel = OS
kernel = kernal
keyword = command
kill = stop
launch a GUI = configure
legal extortion = per-seat licensing
limited = simple
load = build
log into = logon to
logical disk = drive letter
logical disk = hard drive
login = logon
login = shell
login = shell account
ls = dir
luser = non-programmer
luser = surfer
luser = user
lying = marketing
mail = e-mail
mail messages = e-mails
mails = sends e-mails
manpage = documentation
mark-up language = programming language
math = advanced math
memory = RAM
message board = chat room
messages = e-mails
messy = good-looking
millennium = millenium
moderate = censor
monitor = computer
monolithic program = application
mount = load
mount point = drive letter
mount point = hard drive
net = web
netiquette = useless manners
network = web
newfs = format
newsgroup = chat room
newsgroup = board
IRC channel = board
newsreader = Usenet client
newsreader = news browser
next millennium = January 1, 2001
obscurity = security
obvious = subtle
offline = away from the computer
offline = in real life
on a web server = remote
online = cyberspace
open source = freeware
open source = shareware
open source = source code
operating system = kernel
paid bug fixes = updates
partition = drive letter
partition = hard drive
patch = source edit
physical disk = drive letter
physical disk = hard drive
pirate = copy
pirate = get
plonk = censor
professionalism = elitism
program = binary
program = command
program = script
program crash = program exited prematurely
program loader = DOS
programmer = scripter
programmer = software engineer
programming = scripting
put = upload
rc file = INI file
read the docs = help file
reboot the computer = program crash
remote = on a different computer
root = Administrator
run = double-click
screen = monitor
script kiddie = hacker
scripting = configuring
search = research
secretary = HTML programmer
security = authentication and authorization
separated = delimited
shared library = DLL
shell command = system call
shell script = shell
snob = elitist
snobs = elite
spamvert = advert
stdin = console
stdout = console
stop = suspend
superuser = Administrator
symbolic link = shortcut
sysadmin = sysop
system call = operating system function
tarball = zip archive
transfer = download
transfer = upload
trojan = virus
unlink = delete
unmount = eject
unusual = unique
user = screen
user = screen name
vi = notepad
video card = monitor
web page = home page
wizard = guru
worm = virus
www.foo.com = foo.com
pop-up menu = drop-down menu
edit = open
execute = open
electronic = cyber-
-- 
I've got plenty of inputs and outputs.  I don't need the video. --Andrew Hume


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

Date: 14 Aug 1999 18:38:39 GMT
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: How to develope CGI scripts with ActivePerl for Windows?
Message-Id: <37B5B6DB.BF616F26@vpservices.com>

nati wrote:
> 
> I want to write CGI scripts in Perl, so I have downloaded and installed
> ActivePerl. Now I want to tryout scripts in Perl on my computer (mailing
> lists and stuff). When I install them on server, they are working without
> problems. But what do I have to do when I want that offline? Do I have to
> simulate (and how) server on my computer

You can test your scripts from the command line without a server just by
opening a DOS console window and typing "perl scriptname".  If you are
using CGI.pm you can even use this method to simulate form entries. 
This will tell you if your script is working but won't show the actual
environment of a webserver and will just print out the html codes on the
screen rather than showing it to you formatted in a browser.  If you
want a full "simulation" including the webserver environment and the
formatted pages in a browser, just download and install a webserver --
it's free and easy to do.  Check out http://www.apache.com/, or
http://www.xitami.com/, or http://www.omnicron.ab.ca/httpd/ for
webservers that will work fine in windoze.

-- 
Jeff


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

Date: Sat, 14 Aug 1999 15:14:03 -0400
From: "Arthur Cinader" <acinader@panix.com>
Subject: HTTP redirect..not working
Message-Id: <7p4f60$phi$1@news.panix.com>

When a form succeeds, I wan to redirect to another url.  I wan to avoid
having to use any separate modules, etc.

Here is what I am putting now:

print "HTTP/1.0 302 Found\n";
print "Location: http://www.foo.com/index.html\n\n";

I'm getting the following error in my weblogs:

apache: [Sat Aug 14 15:09:51 1999] [error] [client 204.90.78.7] [server
www.foo.com] malformed header from script. Bad header=HTTP/1.0 302 Found:
/htdocs/cgi-bin/fooform.cgi

Thanks for any help!

Arthur




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

Date: Sat, 14 Aug 1999 15:35:44 -0400
From: brian@pm.org (brian d foy)
Subject: Re: HTTP redirect..not working
Message-Id: <brian-ya02408000R1408991535440001@news.panix.com>

In article <7p4f60$phi$1@news.panix.com>, "Arthur Cinader" <acinader@panix.com> posted:

> When a form succeeds, I wan to redirect to another url.  I wan to avoid
> having to use any separate modules, etc.

> print "HTTP/1.0 302 Found\n";
> print "Location: http://www.foo.com/index.html\n\n";

you need a no-parsed header script to do that.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


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

Date: Sat, 14 Aug 1999 12:28:13 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Known Issues with perl
Message-Id: <37B5C34D.1158A371@mail.cor.epa.gov>

neptune19@my-deja.com wrote:
[snip of previous post]

> In my case a small script I wrote for Perl5 running on a Unix platfrom
> generated this error message:
> comma not allowed in filehandler line 15
> my only line of code with a comma was:
> print header, start_html;
> which seems innocent enough

Your question really has nothing to do with this thread.
And your question was answered in your *own* thread by
Michael Fuhr.  If you failed to import header(), then
Perl would think you were trying to give it a filehandle
followed by a comma before your list of outputs, which 
is verboten.

HAND,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: 14 Aug 1999 14:43:07 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Looking for a good Perl Book
Message-Id: <x7btca430k.fsf@home.sysarch.com>

>>>>> "DC" == David Cassell <cassell@mail.cor.epa.gov> writes:

  DC> Ala Qumsieh wrote:

  >> Plus of course the FAQs. Everything should reside in different
  >> directories, to make life simpler. Also, maybe a sort of graphical
  >> perldoc might help. It shouldn't be too hard writing one in
  >> Perl/Tk. Or maybe something like that already exists.

  DC> See the perlman program from Advanced Perl Programming.  With
  DC> a few minor additions, it would be a rival to Tkman.  It does
  DC> use Tk.

it would need a lot to equal tkman these days. i would love to see that
in perl. it would be faster and easier for me to debug and hack. i have
conversed with the author of tkman and he would never rewrite it in
perl. :-(

if you set up MANPATH correctly, tkman is great for the perl docs. even
when i add new modules i just do a quick man database rebuild and i see
the new docs in tkman. also having the glimpse full text search beats
perldoc anyday. 

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: Sat, 14 Aug 1999 11:09:57 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Major pack() gripe
Message-Id: <MPG.121f50b4f5e52bff989e5c@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <7p2atm$mqr$1@nnrp1.deja.com> on Fri, 13 Aug 1999 23:49:12 
GMT, Brundle <brundlefly76@hotmail.com> says...
> Why do I need to specify length($string) + 1 after the 'a' for every
> null-terminated string I want packed?
> 
> Perl knows the length of my scalars, so why can't I just say 'a' and
> have the function do this simple calculation?
> 
> This is the only part of my pack string I need to form dynamically. it
> makes an already ugly coded string even more ugly.
> 
> Is there a more elegant way to do this?

Possibly you are using the wrong tool.  The purpose of the 'a', 'A', and 
'Z' formats is to produce fixed-width output fields regardless of the 
lengths of the input arguments.

Simply concatenating the null-terminated strings into the output string 
would do what you seem to want.  This is certainly simpler and therefore 
more elegant.

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


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

Date: Sat, 14 Aug 1999 16:12:52 -0400
From: brian@pm.org (brian d foy)
Subject: mod_perl is in the Fortune 500
Message-Id: <brian-ya02408000R1408991612520001@news.panix.com>


after a quick server of the web servers of the Fortune 500 companies,
i found several using mod_perl:

RANK | COMPANY NAME          | WEB ADDRESS                      | mod_perl
 37    Merck                   http://www.merck.com                1.16
 52    BellSouth               http://www.bellsouthcorp.com        1.00
232    Marsh & McLennan        http://www.marshmac.com             1.20
310    MBNA                    http://www.mbnainternational.com    1.18
353    Litton Industries       http://www.littoncorp.com           1.03
418    Estee Lauder            http://www.elcompanies.com          1.16
421    Consolidated Natural    http://www.cng.com                  1.16
479    Phelps Dodge            http://www.phelpsdodge.com          1.18
481    Fleetwood Enterprise    http://www.fleetwood.com            1.19


if you are interested, the web servers broke down roughly like this:

Netscape Enterprise:    194   38.8%
Microsoft IIS:          174   34.8%
Apache:                  72   15.6% (including Stronghold servers)
Domino:                  12
Stronghold:               6
NCSA:                     5
WebSitePro                4
Open-Market-Secure        4
Oracle_Web_View           3
WebSTAR                   2
Other                     2
Unknown                  22    4.4% unknown

[again, with a little bit of Perl and LWP, collecting this data was a
piece of cake.  here's a little tool i wrote to grab the server string
from an HTTP response - just feed it HTTP addresses one per line:

#!/usr/bin/perl

use LWP::UserAgent;
$ua = new LWP::UserAgent;

while( <> )
        {
        chomp;

        my $res = $ua->request(new HTTP::Request GET => $_);

        if ($res->is_success)
                {
                my $server = $res->header('Server');
                print "$_\t$server\n";
                }
        else
                {
                print "Could not determine server for $_\n";
                }
        }
__END__

]

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


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

Date: 14 Aug 1999 19:57:00 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: My program is not exiting why??
Message-Id: <7p4hmc$4dg@dfw-ixnews17.ix.netcom.com>

harish (harish@blr.sni.de) wrote:
:     I am trying to implement a POP3 mail reader in perl. Program is not
: exiting. Can any one help me

How come you're reinventing the wheel instead of using Net::POP3?

: while(<$remote>)
: {
:  print;
: }

This loop will continue until the remote server closes the socket as a 
result of a timeout.  POP3 servers don't normally disconnect unless you 
ask them to.  Once the server has finished sending the output from the 
last command you gave it, <$remote> is going to sit there blocking until 
either the server sends something or the connection is lost.  

: close $remote;


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

Date: 14 Aug 1999 19:22:05 GMT
From: "Nick Downey" <nead@neadwerx.com>
Subject: mylib.pl now MyLib.pm
Message-Id: <01bee68a$66c47920$73463d80@r52h83>

David,

Thanks for the pointers on how to get my module of the ground, it is
beginning to come together.

This question may seem rather simple, however I've yet to figure it out. I
have the 3 constants shown below, 

use constant CONST_STR1 = "nick";
use constant CONST_STR2 = " e ";
use constant CONST_STR3 = "downey";

and rather than doing

@EXPORT = qw( &sub1 &sub2 CONST_STR1 CONST_STR2 CONST_STR3  )

I would like to do

@EXPORT = qw( &sub1 &sub2 @list )

I have tried

@list = ( CONST_STR1, CONST_STR2, CONST_STR3 ),

but this does not work, I've also tried variations in the positioning of
the list creation (stabbing at the dark) and other such silliness, all much
to no avail.

Can someone point the way ?


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

Date: Sat, 14 Aug 1999 14:15:13 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: New User Q: Shell script to Perl Equivalent
Message-Id: <37B5B21D.DDED1656@chaos.wustl.edu>

Uri Guttman wrote:

> just use system and here docs:

or the infamous...sh2p :)

e.


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

Date: 14 Aug 1999 17:32:47 GMT
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Perl penetration into Fortune 500?
Message-Id: <37B5A76B.63A5334C@vpservices.com>

brian d foy wrote:
> 
> Perl Mongers is putting together a survey to measure Perl's
> penetration into the Fortune 500 companies.

First a tip and then a plea.

The tip: check out the DBI-USERS listserv archives for a very extensive
thread on uses of DBI in large institutions, many of which are fortune
500 companies.

The plea: I think it's great that PM is doing research on the actual use
of Perl in large institutions and I understand that the fortune 500 is a
nice easy list to start from as well as the one most likely to impress
those who are impressed by such things.  But let me urge you to include
large not-for-profit and public sector institutions in your research.  I
say this both to round out the picture of what Perl is actually used for
and to round out the picture of potential employers for Perl consultants
and programmers.  It strikes me that the complexity and nature of
research uses of Perl is much broader if one includes not-for-profit and
public sector uses of it.  Consider Lincoln Stein's work with the Genome
project or Paul Lindner's or mine at the U.N. or the hundreds of
Perlites working (for pay and pro bono) at schools, libraries, social
action projects etc.  

And say, didn't a certain Larry Wall do some work on/with Perl at the
Jet Propulsion Lab some years back?

-- 
Jeff Zucker
JAPPH (Just Another Public-Sector Perl Hacker, or actually expert if you
go by TC's list of who is a perl hacker and who ain't)


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

Date: Sat, 14 Aug 1999 11:59:34 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Perl penetration into Fortune 500?
Message-Id: <37B5BC96.E083EB31@mail.cor.epa.gov>

brian d foy wrote:
> 
> Perl Mongers is putting together a survey to measure Perl's
> penetration into the Fortune 500 companies.
[snip]
> any help is appreciated.  there is a list of Fortune 500 companies
> (as of today) at http://www.pm.org/fortune500.txt.  please send
> responses to fortune500@perlmongers.org.

Hmmm.  Hewlett-Packard is #13 on the list.  Can't think of
anyone from HP ever posting here...

David, ducking rapidly
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: 14 Aug 1999 19:25:10 GMT
From: bbirthisel@aol.com (Bbirthisel)
Subject: Re: Perl penetration into Fortune 500?
Message-Id: <19990814152510.09614.00001065@ng-bg1.aol.com>

Hi Jeff and brian:

>brian d foy wrote:
>> 
>> Perl Mongers is putting together a survey to measure Perl's
>> penetration into the Fortune 500 companies.

[snip]

>The plea: I think it's great that PM is doing research on the actual use
>of Perl in large institutions and I understand that the fortune 500 is a
>nice easy list to start from as well as the one most likely to impress
>those who are impressed by such things.

I'm not sure Fortune 500 is an easy list to track. I have done Perl
projects for various divisions of such companies - but not via the
"Corporate IS Department" entry point. If you ask at the top, you
will get a different answer than if you actually look in the "trenches".

It might be more interesting to discover of any of  those companies
do not use Perl anywhere - due to mandate or whatever. Except
for any actively prohibiting Perl's use (if any are still so backward),
I suspect the list of non-users among large organizations is rather
tiny.

-bill
Making computers work in Manufacturing for over 25 years (inquiries welcome)


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

Date: Sat, 14 Aug 1999 11:51:21 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Perl Script + Sending Mail
Message-Id: <37B5BAA9.8DDAF003@mail.cor.epa.gov>

Jason Smith wrote:
> 
>  I'm having a problem with a perl script. The problem
[snip]
>                                                  the "From"
> field reads not "John", but "John@whsun626.webhosting.com"

Jason, you've asked this question, what, about eight times
in this newsgroup, right?  Haven't any of the answers been
clear?  This is not a Perl issue at all.  Your MTA is putting
the full e-mail address in while it is transferring the
e-mail for you.  The only way around this is to talk to
your sysadmin who handles your $mailprog [sendmail, or qmail,
or blat, or whatever] and ask him/her to turn this 
feature off for your specific purposes.

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Sat, 14 Aug 1999 18:38:05 GMT
From: dodli@my-deja.com
Subject: PointEdit Help
Message-Id: <7p4d2d$14b$1@nnrp1.deja.com>

I am trying to get the PointEdit perl script to work. Currently when I
run the script from the browser, it brings up the form which asks for
the file I want to Edit. After I insert the file, it jumps over the
editing form and goes directly to the password submission box. It never
allows me to update the file. I inserted the correct Html tags in the
file I want to edit but for some reason they are overlooked. Has anyone
experienced this problem or perhaps able to shed some light on a way of
dealing with it.
Thank you for any help
Eran



Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 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.  

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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu. 

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


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