[12949] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 359 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 4 03:07:21 1999

Date: Wed, 4 Aug 1999 00:05:09 -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           Wed, 4 Aug 1999     Volume: 9 Number: 359

Today's topics:
        << Print Command Won't Work <laoch98@yahoo.com>
    Re: [offtopic]RE:Quot St and the Jeop Gm <llornkcor@llornkcor.com>
    Re: [offtopic]RE:Quot St and the Jeop Gm <uri@sysarch.com>
    Re: Autovivification? (Abigail)
    Re: Autovivification? (Abigail)
    Re: Autovivification? (Sam Holden)
    Re: Does this make sense to anyone? (David H. Adler)
    Re: Escaping HTML tags (Larry Rosler)
    Re: Escaping HTML tags <uri@sysarch.com>
    Re: Escaping HTML tags (Larry Rosler)
    Re: Escaping HTML tags <uri@sysarch.com>
    Re: How to create "function pointers"? (Matthew David Zimmerman)
        Newbie: @INC problem with non-super-user installation <pierremart@hotmail.com>
    Re: Perl or CGI <aperrin@mcmahon.qal.berkeley.edu>
        Possible to get a HTML file from somewhere and use it a lpwong@my-deja.com
    Re: Strange STDOUT on script, any ideas? <kenhirsch@myself.com>
    Re: The question of the performence of database handle <carfield@my-deja.com>
        Using ActivePerl on Win32 (win98)  <Warren@home.com>
    Re: Using ActivePerl on Win32 (win98) (Eric Bohlman)
    Re: Using CGI.pm to Retrieve Image (Abigail)
        Vancouver BC Perl/HTML developers wanted <azzkicker@palo.com>
    Re: Vancouver BC Perl/HTML developers wanted (Sam Holden)
    Re: Web Startup Seeks Help, Programmer (Abigail)
    Re: Web Startup Seeks Help, Programmer (Eric Bohlman)
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Wed, 4 Aug 1999 14:33:10 +0800
From: "zexl" <laoch98@yahoo.com>
Subject: << Print Command Won't Work
Message-Id: <37a7df15.0@scctn03.sp.edu.sg>

Hi there,

I am running ActivePerl under WINNT. I got a program that goes somthing like
that:

print "Content-type:text/html \n\n";

print << 'End';
<html>
<head>
<title> My CGI </title>
</head>
<body>
<h1> My CGI </h1>
<em> Hello, INTERNET! </em>
</body>
</html>
End

Whenever I compiled, I got such error:
Can't find string terminator "End" anywhere before EOF ...

Can someone help me? Thx in advance...







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

Date: 03 Aug 1999 22:58:56 -0600
From: llornkcor <llornkcor@llornkcor.com>
Subject: Re: [offtopic]RE:Quot St and the Jeop Gm
Message-Id: <hfmg16r3.fsf@wind.localdomain>

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

up to here.. I thot you might be drabbling...

>When you go to someone else's culture, you politely learn 
>what is acceptable and what is not.  You don't spout off
>about how they're insisting on doing it wrong.

Unless, of course, they find it acceptable to hack people to little
tiny bits.

>have.  Have you noticed that some groups descend into total
>anarchy, with no control over the quality of the answers?

And you call this ng has quality of answers?

>Oh, you've been in alt.perl already.  Have you noticed
>that some newsgroups are a *lot* harder than here?

no, this is the worst I have been to. Everybody else seems to be able
to help without too many rude, snide remarks. Which is why I am trying
to improve things here.

>Compassionate but well-informed responses really do have
>a place here.  If you would just work with us instead of
>against us, this could be a kinder place.

hmm, I am trying to have a kinder place here. This is what I am asking for.


>It was.  I had hopes for you.  Couldn't you just try to:
>[1] check the FAQ before answering; and
>[2] post in the standard Usenet style.

[1]- The FAQ's are hopelessly inept. ( my opinion) About as bad as
Microsofts documentation. When I say that, I mean that it's about as
hard to find what I want as this newsgroup.
[2]- I hate being told what to do.  I don't dictate to you to post in
any 'style', or what you should put in your sig file.



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

Date: 04 Aug 1999 01:51:28 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: [offtopic]RE:Quot St and the Jeop Gm
Message-Id: <x7g120jdpb.fsf@home.sysarch.com>

>>>>> "l" == llornkcor  <llornkcor@llornkcor.com> writes:

  >> It was.  I had hopes for you.  Couldn't you just try to:
  >> [1] check the FAQ before answering; and
  >> [2] post in the standard Usenet style.

  l> [1]- The FAQ's are hopelessly inept. ( my opinion) About as bad as
  l> Microsofts documentation. When I say that, I mean that it's about as
  l> hard to find what I want as this newsgroup.

you should be called tommy since you are deaf, dumb and blind (i bet he
doesn't get the rocknroll reference). the perl FAQ's are among the most
complete and well written around. almost all the newbie questions are
answered there. you either can't read or search or ask a logical
question if you can't get any use out of them. comparing them to
redmonddocs is absurd and incredibly insulting. but coming from a twit
like you, it makes sense.

  l> [2]- I hate being told what to do.  I don't dictate to you to post in
  l> any 'style', or what you should put in your sig file.

obviously you have never learned from your betters. so get out of this
group and stay in alt.perl. you have been posting stuff there with the
great disclaimer "i think this works". very helpful. such confidence. i
will take a rude rtfm or correct reply over a polite and incorrect
guess. i bet most others will too.

and there are rules in usenet and in this group. conventions are
rules. those who drive on the wrong side of the road break rules and
necks. jeopardy style (i like that term!) posts are very annoying and
another virus from redmond and the crappy emailers out there. by making
it hard to edit the quote and always putting the cursor BEFORE the
quoted text, it encourages this most confusing style of replying. i see
intelligent unix users doing it where i work and i can't stand
it. people just seem to tolerate crap email. we don't tolerate it
here any more than non-perl questions, faq's and trolls.

go away, often!

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: 3 Aug 1999 23:04:06 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Autovivification?
Message-Id: <slrn7qfesd.s67.abigail@alexandra.delanet.com>

Neal Sanche (neal@nsdev.org) wrote on MMCLXIV September MCMXCIII in
<URL:news:37A79D89.AA0E396C@nsdev.org>:
;; Tom Christiansen wrote:
;; 
;; > When you use the -> dereferencing arrow (or its equivalent)
;; > on hashes or arrays, you get autovivification irrespective of
;; > the lvalue or rvalue context.
;; >
;; > Behold:
;; >
;; >     undef $r;
;; >     defined $r->{fred};
;; >     print $r;
;; >
;; > HASH(0x80d3f8c)
;; 
;; Okay, but how is this useful?


It's not. I think someone has put in some work to figure out when
autovivification can be avoided when used in rvalue context, but I
have never heard from it again. No doubt that in certain cases it can
be avoided. Very likely in many cases it either can't be avoided, or it
comes with high penalties. And if you don't autovivificate under certain
conditions, but do in others, Perls side effect behaviour becomes very
hard to predict. Which isn't a good thing.


;;                               It seems odd to me that the simple act of
;; checking whether a value is defined causes something else (unintended or
;; not) to be defined instead. If there is a good reason for it, that's fine
;; with me. It's certainly something to watch out for, because careless
;; programmers can sometimes cause these things to happen.


Not just careless programmers. Unless you happen to know this already,
or have much insight in how Perl works behind the scenes, it is an
unexpected thing to happen. Even if you have read the entire manual,
you're still likely to forget that 'if (defined $foo -> {bar} -> {baz})'
autovivificates, untill you've been bitten enough to remember.


But I wouldn't want to give autovivification up for this drawback.



Abigail
-- 
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")
                       -> define ("foldoc", "perl")) [0] -> print'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 3 Aug 1999 23:10:12 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Autovivification?
Message-Id: <slrn7qff81.s67.abigail@alexandra.delanet.com>

Matthew O. Persico (mpersico@erols.com) wrote on MMCLXIV September
MCMXCIII in <URL:news:37A7ACF8.8594554C@erols.com>:
== 
== 
== Me thinks he wants exists. I always code this test as
== 
== if (exists $WOW{here}{not} && defined $WOW{here}{not}) {
== 	...


That's redundant. If you want to avoid autovivification you
should code that as:

   if (exists $WOW{here} && defined $WOW{here}{not}) {

Otherwise, $WOW{here} autovivificates. Neither the exists, nor
the defined will autovivificate $WOW{here}{not}.



Abigail
-- 
perl -wlne '}for($.){print' file  # Count the number of lines.


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 4 Aug 1999 05:31:53 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Autovivification?
Message-Id: <slrn7qfk2t.4as.sholden@pgrad.cs.usyd.edu.au>

On Wed, 04 Aug 1999 03:32:37 +0000, Neal Sanche <neal@nsdev.org> wrote:
>Tom Christiansen wrote:
>
>> I don't necessarily expect you to like it, just understand it.
>> And consider what you'd lose without it.
>
>Okay, I'll accept it, since all hell would break loose if it weren't there.
>Well, actually, very little would happen in a Perl program if it didn't work
>that way. Thank you very much for the explanation.

Except for those the dumps of course...

And having to write code like :

$fred{bob} = {};
$fred{bob}{bill} = {};
$fred{bob}{bill}{ted} = 'john';

instead of :

$fred{bob}{bill}{ted} = 'john'

-- 
Sam

Remember that the P in Perl stands for Practical.  The P in Python
doesn't seem to stand for anything.
	--Randal Schwartz in <8cemsabtef.fsf@gadget.cscaper.com>


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

Date: 4 Aug 1999 04:51:58 GMT
From: dha@panix7.panix.com (David H. Adler)
Subject: Re: Does this make sense to anyone?
Message-Id: <slrn7qfhne.ie4.dha@panix7.panix.com>

In article <OTbo3.3235$nB.476706@news.itd.umich.edu>, Sean McAfee wrote:
>> perl -e '$a = \@b; push @{ $a }, "foo", "bar"; print "@b\n"'
>foo bar
>
>> perl -e '$a = \@b; push @{ do { $a } }, "foo", "bar"; print "@b\n"'
>Type of arg 1 to push must be array (not hash slice) at -e line 1, near ""bar";"
>Execution of -e aborted due to compilation errors.
>
>Replacing "do" with "+do" fixes the problem, but I don't see a hash slice
>anywhere in this code.  Could this be a parsing bug?

I probably have no idea what I'm talking about, but since this is
misc, rather than moderated, I figure I'll give it a shot... :-)

Could, perhaps, the 'do{$a}' be somehow treated as an anonymous hash
here, causing the outer @{} to form a hash slice?

Just a thought.  It certainly doesn't help, but it might vaguely
explain... well, something.  :-/

best,  dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Hat! Hat! Hat!	- piglet@piglet.org


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

Date: Tue, 3 Aug 1999 21:10:01 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Escaping HTML tags
Message-Id: <MPG.12115cf7e10060d3989db0@nntp.hpl.hp.com>

In article <slrn7qf7ep.s67.abigail@alexandra.delanet.com> on 3 Aug 1999 
20:57:17 -0500, Abigail <abigail@delanet.com> says...
> Karl Ahlin (karah@ida.liu.se) wrote on MMCLXIII September MCMXCIII in
> <URL:news:37A6BBD5.7070E004@ida.liu.se>:
> \\ 
> \\ Is there a way to escape HTML tags? I want the browser to display the
> \\ actual HTML tags, not interpret them and display their output. In other
> \\ words, I want <IMG SRC="blabla.gif"> to be translated to &lt;IMG
> \\ SRC=&quot;blabla.gif&quot;&gt;. Of course I can do this on my own, I was
> \\ just wondering if there is a subroutine or package already available
> \\ somewhere?
> 
> You're looking for a subroutine that does the work of a 10 char Perl program?

OK.  I give up.  Here's the best I can do at this golf game:

#!/usr/local/bin/perl -w
use strict;

$_ = '"x<y>z&w"';

s/["&<>]/&#${\ord$&};/g; # 24 characters

print;

$_ = '"x<y>z&w"';

my %h =
    ('"' => '&quot;', '&' => '&amp;', '<' => '&lt;', '>' => '&gt;' );

s/./$h{$&}||$&/eg;        # 18 characters (plus the hash initialization)

print;
__END__

Neither of those comes even near to 10 characters.  I give up.

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


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

Date: 04 Aug 1999 02:11:10 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Escaping HTML tags
Message-Id: <x7d7x4jcsh.fsf@home.sysarch.com>

>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:

  LR> OK.  I give up.  Here's the best I can do at this golf game:

  LR> my %h =
  LR>     ('"' => '&quot;', '&' => '&amp;', '<' => '&lt;', '>' => '&gt;' );

  LR> s/./$h{$&}||$&/eg;        # 18 characters (plus the hash initialization)

you're going to hate me!!

perl -0777pe 's//<xmp>/' foo.html

it does what is asked for, you get the original text all quoted with no
tag interpretation.

and the program is only 9 chars long!!

NB: xmp is obsolete/deprecated but works on my netscape 4.6

uri "tiger woods" guttman

-- 
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: Tue, 3 Aug 1999 23:40:19 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Escaping HTML tags
Message-Id: <MPG.1211802565c68a8d989db1@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <x7d7x4jcsh.fsf@home.sysarch.com> on 04 Aug 1999 02:11:10 -
0400, Uri Guttman <uri@sysarch.com> says...
> >>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
> 
>   LR> OK.  I give up.  Here's the best I can do at this golf game:
> 
>   LR> my %h =
>   LR>     ('"' => '&quot;', '&' => '&amp;', '<' => '&lt;', '>' => '&gt;' );
> 
>   LR> s/./$h{$&}||$&/eg;        # 18 characters (plus the hash initialization)
> 
> you're going to hate me!!

Independent of what follows!!

> perl -0777pe 's//<xmp>/' foo.html
> 
> it does what is asked for, you get the original text all quoted with no
> tag interpretation.
> 
> and the program is only 9 chars long!!
> 
> NB: xmp is obsolete/deprecated but works on my netscape 4.6

For the uninitiated, <xmp> means eXaMPle, and has a closing tag also.

> uri "tiger woods" guttman

Err, um, foo.html contains:

</xmp><blink>You lose!</blink>

Next sucker...

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


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

Date: 04 Aug 1999 03:02:17 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Escaping HTML tags
Message-Id: <x77lncjafa.fsf@home.sysarch.com>

>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:

  LR> 0400, Uri Guttman <uri@sysarch.com> says...

  >> perl -0777pe 's//<xmp>/' foo.html

  LR> Err, um, foo.html contains:

  LR> </xmp><blink>You lose!</blink>

i hope abigail rips out your lungs for using <blink>. wait until you get
on the dais to make your presentation. boy, will i make you look silly!

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: 4 Aug 1999 04:24:48 GMT
From: mdz4c@node9.unix.Virginia.EDU (Matthew David Zimmerman)
Subject: Re: How to create "function pointers"?
Message-Id: <7o8fag$lm1$1@murdoch.acc.Virginia.EDU>

In article <7o7gv1$3su$1@news-int.gatech.edu>,  <kirk@kaybee.org> wrote:
>I am trying to create a function pointer that I can store as a scalar
>and call at a later time.  I am trying this with no success:
>
>$MyFunction = sub { 
>    print "hello\n";
>}

Here you've created the function pointer correctly, i.e., $MyFunction
contains a reference to the anonymous sub...

>$MyFunction ("test");

but you're not dereferencing it properly. Try:

$MyFunction->("test");
&{$MyFunction}("test");

As I interpret the documentation, the pointer arrow method is recommended
to avoid any operator precedence issues.

>Also, is there an easy way to store a reference to an exsiting named
>(i.e. non-anonymous) function in a scalar?

$MyFunction = \&function();   #I think, at least, not tested. 

The perlref manpage has a whole bunch of information on this, way more
than I could digest in a sitting. 

HTH!

Matt
-- 
-- 
Matthew Zimmerman ------------  http://www.people.virginia.edu/~mdz4c
Interdisciplinary Biophysics Program --------- University of Virginia
| "You got to be very careful if you don't know where you're going, |


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

Date: Wed, 4 Aug 1999 14:39:06 +0800
From: "Pierre Mart" <pierremart@hotmail.com>
Subject: Newbie: @INC problem with non-super-user installation
Message-Id: <7o8n4q$2ck@netnews.hinet.net>

Dear all,

    I just installed perl5.004_05.  I am not super-user.
I followed the INSTALL document and sucessfully
installed it to local directory, say "/usr/home/pierre/perl5".

    The default @INC seemed not to be modified accordingly.
When I "use MakeMaker;", I got the message:

Can't locate MakeMaker.pm in @INC
(@INC contains: /usr/local/lib/perl5/i386-freebsd/5.00405
/usr/local/lib/perl5 /usr/local/lib/perl5/site_perl/i386-freebsd
/usr/local/lib/perl5/site_perl .) at - line 1.

    How can I correct this?  I don't want to put a line
@INC = ('/usr/home/pierre/perl5/lib/perl5');
in every script I wrote.  (Hey, it doesn't even work!!!)

    Thanks a lot.

Pierre Mart




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

Date: Tue, 03 Aug 1999 21:00:45 -0700
From: Andrew J Perrin <aperrin@mcmahon.qal.berkeley.edu>
Subject: Re: Perl or CGI
Message-Id: <37A7BAED.3674772B@mcmahon.qal.berkeley.edu>

elephant wrote:
> 
> Emulov writes ..
> >I'm thinking of learning Perl or CGI. But I don't have a clear idea of
> >what's the difference between them. 

Hey, this post just reminded me... we never resolved the earlier
question posted here, "Is Linux better than perl?"... the group must be
slacking off :).

ap

-- 
-------------------------------------------------------------
Andrew Perrin - NT/Unix/Access Consulting -
aperrin@mcmahon.qal.berkeley.edu  
        http://www.geocities.com/SiliconValley/Grid/7544/
-------------------------------------------------------------


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

Date: Wed, 04 Aug 1999 06:04:28 GMT
From: lpwong@my-deja.com
Subject: Possible to get a HTML file from somewhere and use it as string?
Message-Id: <7o8l59$ppe$1@nnrp1.deja.com>

Hi,

  I'm a newbie of writting Perl/CGI.  Recently i want to write a simple
CGI (hopefully) to extract some links from a HTML located in other
server.  Is it possible to get the HTML using Perl/CGI and then convert
it into a string for pre-format before display?  thanks in advance.

Rgds,
  Martin


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


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

Date: Wed, 4 Aug 1999 02:17:22 -0400
From: "Ken Hirsch" <kenhirsch@myself.com>
Subject: Re: Strange STDOUT on script, any ideas?
Message-Id: <7o8m0k$5s7$1@holly.prod.itd.earthlink.net>

Tom Kralidis <tom.kralidis@ccrs.nrcanDOTgc.ca> wrote:
> Hi,
>
> I've written a script to move files in a dir to a dir based on their
> filename.  These files come in sets of twos: one image file, with a
> matching text file for metadata.
>
> I've used a foreach on all files to check the filename, search for the
> dir path, create it if it does not exist, then move the files.
>
> The files do reach their correct destination, and dirs are made (the
> script is functional), but STDOUT returns messages of "No such file or
> directory.  It looks like it is looking for files that have been already
> moved.

Probably STDERR, actually.

>
> foreach $input (<*.txt>)
> {
>  $north = $1 and $east = $2 if $input =~ /(N\d{2})d\d{2}m(W\d{3}).*/;

If this match fails then $north and $east will have values from the previous
time through the loop.
You could replace this with:
   if ($input =~ /(N\d{2})d\d{2}m(W\d{3})/)

     $north = $1;
     $east = $2;
  # and close } down below

>  if ( -d "/user/home/img/$east/$north")
>  {
>  system("mv $north*$east* /user/home/$east/$north/");

You could check the return value and print what the actual command executed
was
system("mv $north*$east* /user/home/$east/$north/") == 0
  or warn "system 'mv $north*$east* /user/home/$east/$north/' failed: $?";






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

Date: Wed, 04 Aug 1999 04:51:16 GMT
From: Carfield Yim <carfield@my-deja.com>
Subject: Re: The question of the performence of database handle
Message-Id: <7o8gs2$n72$1@nnrp1.deja.com>

Thank for reply!

Will change the database and driver increase the speed more than
changing the script using mod_perl?

Furthermore, I would like to ask how to do the benchmark myself?


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


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

Date: Wed, 04 Aug 1999 05:07:48 GMT
From: "Alyne & Warren" <Warren@home.com>
Subject: Using ActivePerl on Win32 (win98) 
Message-Id: <EUPp3.1175$y94.8789@news1.gvcl1.bc.home.com>

Hi All!

I don't know if this question is appropriate -- please educate me if this is
the wrong forum...

I'd like to use Perl on Window98.   I have used a certain form on *nix
machines successfully and would love to put it on my desktop, too.   I
downloaded Active Perl.    I used my "form" (via IE) with a POST method and
upon execution, IE thinks I am trying to download the file instead of
posting data to it.   Any ideas as to what I'm doing wrong?  I use Perl all
the time on *nix machines but am ignorant of the changes necessary to using
it on Win32 boxes...

Thanx heaps!

--Warren





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

Date: 4 Aug 1999 05:41:56 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Using ActivePerl on Win32 (win98)
Message-Id: <7o8jr4$di5@dfw-ixnews15.ix.netcom.com>

Alyne & Warren (Warren@home.com) wrote:
: I don't know if this question is appropriate -- please educate me if this is
: the wrong forum...

It really isn't, since you'd have the same problem regardless of what 
language your CGI script was written in, but...

 : 
: I'd like to use Perl on Window98.   I have used a certain form on *nix
: machines successfully and would love to put it on my desktop, too.   I
: downloaded Active Perl.    I used my "form" (via IE) with a POST method and
: upon execution, IE thinks I am trying to download the file instead of
: posting data to it.   Any ideas as to what I'm doing wrong?  I use Perl all
: the time on *nix machines but am ignorant of the changes necessary to using
: it on Win32 boxes...

You're not running into a difference between Unix and Win32.  You're 
running into the difference between trying to run a CGI script on a 
machine that has an HTTP server set up and on one that doesn't.

There is *no* *such* *thing* as "running a CGI program from a browser."  
Browsers simply do not run CGI scripts.  HTTP *servers* run CGI scripts, 
and browsers *talk* to HTTP servers via HTTP connections.  To run a CGI 
script on your own system, you need to install an HTTP server on that 
system.  The documentation that comes with ActivePerl has some things to 
say on this matter.  If that's not adequate, see the newsgroups devoted 
to WWW servers for MS-Windows platforms.

To many people my objection to the phrase "running a CGI program from a 
browser" is going to come off as nitpicky; after all, isn't it just a 
shortcut phrase that everybody understands?  It turns out that it isn't; 
it corresponds to an *incorrect* mental model of how CGI scripts work, a 
mental model whose use has been repeatedly shown, both here and in other 
places, to lead people into traps (e.g. the script that runs fine from 
the author's command line but fails when run by the server because the 
server doesn't have access to the author's files.  If the author thinks 
that it's his *browser* that's running the script, he won't be able to 
understand why the script doesn't have access to his files).



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

Date: 3 Aug 1999 23:25:56 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Using CGI.pm to Retrieve Image
Message-Id: <slrn7qfg5g.s67.abigail@alexandra.delanet.com>

Matt (splinter@monmouth.com) wrote on MMCLXIV September MCMXCIII in
<URL:news:7o8c1o$a48$1@news.monmouth.com>:
^^ Hi,
^^ 
^^ I have a few questions about using CGI.pm to have a user upload an image to
^^ a site.
^^ 
^^ The form allows the user to pick a file off of his hard drive.
^^ The user presses submit.
^^ The image gets stored in an associative array ( say $FORM{'image'} )
^^ Now what?
^^ 
^^ I suppose I do...
^^ 
^^ use CGI;

Yeah, and I suppose you do that before assuming the image gets stored
somewhere. %FORM isn't a magical hash that always exists.

^^ but now what?  How do I save it to a specific directory as an image file?


perldoc -f open
perldoc -f print



Abigail
-- 
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Tue, 03 Aug 1999 21:09:56 -0700
From: Johan Johansson <azzkicker@palo.com>
Subject: Vancouver BC Perl/HTML developers wanted
Message-Id: <37A7BD14.15D2@palo.com>

We are hiring.

Looking for kick butting HTMLers who hand-code everything but their
breakfast cereals.

Our company's only objective is get bigger and better than agency.com.

For company info, visit http://www.internetcanada.com

Please send resume to:

att'n: J.J.
jobs@palo.com
or fax to (604) 331-4416
http://www.palo.com


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

Date: 4 Aug 1999 05:44:37 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Vancouver BC Perl/HTML developers wanted
Message-Id: <slrn7qfkqp.4as.sholden@pgrad.cs.usyd.edu.au>

On Tue, 03 Aug 1999 21:09:56 -0700, Johan Johansson <azzkicker@palo.com> wrote:
>We are hiring.
>
>Looking for kick butting HTMLers who hand-code everything but their
>breakfast cereals.

Hand code HTML... do people still do that...

All my HTML files get run through at least one script to fix something.

>Our company's only objective is get bigger and better than agency.com.

Shooting low then.

You could have at least pretended to have something to do with perl
instead of just putting it in the subject...


-- 
Sam

compiling kernels is what I do most, so they do tend to stick to the
cache ;)	--Linus Torvalds


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

Date: 3 Aug 1999 23:13:49 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Web Startup Seeks Help, Programmer
Message-Id: <slrn7qffep.s67.abigail@alexandra.delanet.com>

Dave (bisonman@optonline.net) wrote on MMCLXIV September MCMXCIII in
<URL:news:37A79A6A.548FA0C6@optonline.net>:
"" 
""           What's missing? An expert programmer (HTML, JAVA, CGI, SQL...)
"" who is like us: young, driven, and willing to go the extra mile to make
"" our dream into a reality.

Can I sue you for age discrimination?



Abigail
-- 
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
                                      print } sub __PACKAGE__ { &
                                      print (     __PACKAGE__)} &
                                                  __PACKAGE__
                                            (                )


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 4 Aug 1999 05:29:49 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Web Startup Seeks Help, Programmer
Message-Id: <7o8j4d$di5@dfw-ixnews15.ix.netcom.com>

Abigail (abigail@delanet.com) wrote:
: Dave (bisonman@optonline.net) wrote on MMCLXIV September MCMXCIII in
: <URL:news:37A79A6A.548FA0C6@optonline.net>:
: "" 
: ""           What's missing? An expert programmer (HTML, JAVA, CGI, SQL...)
: "" who is like us: young, driven, and willing to go the extra mile to make
: "" our dream into a reality.
: 
: Can I sue you for age discrimination?

No, because he isn't offering anything of value in return for your labor.



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

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". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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


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


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