[9774] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3367 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 5 13:06:19 1998

Date: Wed, 5 Aug 98 10:00:21 -0700
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, 5 Aug 1998     Volume: 8 Number: 3367

Today's topics:
    Re: Array or hash question ? webmaster@vaticanmuseumtreasures.com
        can't serve image from Perl + NT + IIS casperbc@hotmail.com
    Re: comp.lang.perl.announce redux <merlyn@stonehenge.com>
    Re: comp.lang.perl.announce redux <jdporter@min.net>
        curious about shmat in Perl5, Solaris 2.5.1 and 2.6 chrisoc@ans.net
        curious about shmat in Perl5, Solaris 2.5.1 and 2.6 chrisoc@ans.net
        E-mail elektrobank@mailexcite.com
    Re: file modification <adam@fastfare.co.uk>
    Re: flock and/or fcntl on solaris <jimbo@soundimages.co.uk>
        Frames <norman.bunn@mci.com>
    Re: Frames <norman.bunn@mci.com>
    Re: hiding user input <jdporter@min.net>
    Re: hiding user input (Greg Bacon)
    Re: hiding user input (Gary L. Burnore)
        HTPASSWD / HTACCESS <gswank@beckerinc.com>
        Perl 4 compile on Solaris 2.6 <jmarans@nortel.ca>
    Re: Perl recipes <thomas@daimi.aau.dk>
    Re: Perl recipes <tchrist@mox.perl.com>
    Re: perl5 bug? <dan@dont.spam.me.please.missionrec.com>
    Re: perl5 bug? (Mark-Jason Dominus)
    Re: perlfaq - frequently asked questions about Perl (pa <p-fein@uchicago.edu>
    Re: perlfaq - frequently asked questions about Perl (pa <upsetter@ziplink.net>
    Re: perlfaq - frequently asked questions about Perl (pa <jdf@pobox.com>
    Re: Please Help - Perl on the Web <filmguy@bellsouth.net>
    Re: Reading in one file and writing to another <aqumsieh@matrox.com>
    Re: Regexp question (Craig Berry)
    Re: Retrieving file from REMOTE_ADDR ... HELP! <flavell@mail.cern.ch>
    Re: strange results from tied hash <jdporter@min.net>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Wed, 05 Aug 1998 16:25:55 GMT
From: webmaster@vaticanmuseumtreasures.com
Subject: Re: Array or hash question ?
Message-Id: <6qa12j$9c5$1@nnrp1.dejanews.com>

Just wanted to drop a line and say thanks for all those who helped me out
with my question. I got my problem to work and I seem to have a better
understanding of Hashes & lists.

Thanks!

Jason LaFosse

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Wed, 05 Aug 1998 16:29:39 GMT
From: casperbc@hotmail.com
Subject: can't serve image from Perl + NT + IIS
Message-Id: <6qa19j$9g1$1@nnrp1.dejanews.com>

I'm having trouble getting Perl to serve an image.

The following fragment supposedly outputs an image file whose path is $image,
along with the appropriate HTTP headers:

--8<---------------------------------------------------
print "Refresh: 3", "\n";
print "Content-type: $cont_type", "\n";
print "Content-length: $img_len", "\n\n";

binmode ($image);
binmode (STDOUT);
if (open (IMG, "<" . $image)) {
  while (<IMG>) {
    print;
  }
}
--------------------------------------------------->8--

However, what I get is the first 59 bytes:

$ ./rand_image.pl | od -cv
0000000 377 330 377 340  \0 020   J   F   I   F  \0 001 001 001  \0   `
0000020  \0   `  \0  \0 377 333  \0   C  \0 006 004 004 005 004 004 006
0000040 005 005 005 006 006 006  \a  \t 016  \t  \t  \b  \b  \t 022  \r
0000060  \n 016 025 022 026 026 025 022 024 024 027
0000073
$

Here's how this particular file begins:

0000000 377 330 377 340  \0 020   J   F   I   F  \0 001 001 001  \0   `
0000020  \0   `  \0  \0 377 333  \0   C  \0 006 004 004 005 004 004 006
0000040 005 005 005 006 006 006  \a  \t 016  \t  \t  \b  \b  \t 022  \r
0000060  \r  \n 016 025 022 026 026 025 022 024 024 027 032   ! 034 027
0000100 030 037 031 024 024 035   ' 035 037   "   #   %   %   % 026 034

The last byte of the first sample is missing.

Can someone help me? I've tried numerous methods to accomplish this simple
task, but I'm defeated every time. I'm using (here it comes) Perl 5.003_07 for
Win 32, build 316. I have <ahem> Windows NT 4.0 + SP3, running Internet
Information Server 4.0. I also have the latest Perl for ISAPI installed. Any
more details, please ask.

Hurrying away frustrated,
Casper Boden-Cummins

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Wed, 05 Aug 1998 16:03:54 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <8cww8ne7q7.fsf@gadget.cscaper.com>

>>>>> "Chris" == Chris Nandor <pudge@pobox.com> writes:

Chris> # 
Chris> # Your straw man is singing "If I only had a brain..." :)

Chris> I admit my argument is imperfect, but I think it is relevant.  Moderators
Chris> don't have to fully grok what they approve.  OTOH, they cannot approve
Chris> something they don't have some idea about.

Sorry... was just going for the joke.  I need to do that sometimes.

I agree with you on both parts.

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Wed, 05 Aug 1998 12:35:13 -0400
From: John Porter <jdporter@min.net>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <35C889C1.F38@min.net>

Paddy Spencer wrote:
> 
> (...usually all one has to do to unearth Americans
> on a newsgroup is be critical of some facet of the United States and then
> they're just _too_ keen to show themselves...)

The (false) implication being that Brits are too self-confident to stoop
to such squabbling.  Heh.


> The last time I looked speakers of English used prepositions: we'd say "Mr
> Blair lied to the country again on Tuesday" rather than "President Clinton
> played hide the salami again Tuesday."

I'd be interested to know where you get the utterly bizarre notion
that American speakers of English do not use prepositions.
Our newspapers routinely say "Congress lied to the American people again
yesterday".


> I imagine [American] could be described as a dialect.

Possibly.  A dialect of the English language.

> However, I'm not a linguist by profession and the precise point at which a
> dialect becomes a language in its own right is not something I know, nor
> something I'd claim to know.

You're double-talking.  You make a slew of claims, then say you're not
claiming anything.  Stick to what you know (which apparently isn't
linguistics -- or logic).

-- 
John Porter


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

Date: Wed, 05 Aug 1998 15:48:04 GMT
From: chrisoc@ans.net
Subject: curious about shmat in Perl5, Solaris 2.5.1 and 2.6
Message-Id: <6q9urk$59l$1@nnrp1.dejanews.com>



I've been reading about Solaris's implementation of Shared Memory
(article by Jim Mauro in SunWorld Sept. 1997).  It discusses the
efficiencies of ISM or "Intimate Shared Memory" segments, which
you can get only by using a flag SHM_SHARE_MMU in the shmflg arg
to shmat.

How can I see whether or not Perl is doing that?
Is it handled at the library level or in each Perl script?

Chris O'Connor

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Wed, 05 Aug 1998 16:35:48 GMT
From: chrisoc@ans.net
Subject: curious about shmat in Perl5, Solaris 2.5.1 and 2.6
Message-Id: <6qa1l4$acs$1@nnrp1.dejanews.com>



I've been reading about Solaris's implementation of Shared Memory
(article by Jim Mauro in SunWorld Sept. 1997).  It discusses the
efficiencies of ISM or "Intimate Shared Memory" segments, which
you can get only by using a flag SHM_SHARE_MMU in the shmflg arg
to shmat.

How can I see whether or not Perl is doing that?
Is it handled at the library level or in each Perl script?

Chris O'Connor

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Wed, 05 Aug 1998 12:35:37 -0500
From: elektrobank@mailexcite.com
Subject: E-mail
Message-Id: <elektrobank-0508981235370001@129.10.172.122>

Is there a way to check an e-mail account from a perl script?


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

Date: Wed, 05 Aug 1998 15:52:12 +0000
From: Adam Ipnarski <adam@fastfare.co.uk>
To: wilgro@my-dejanews.com
Subject: Re: file modification
Message-Id: <35C87FAC.ABD7E80F@fastfare.co.uk>

Hi,

wilgro@my-dejanews.com wrote:
> 
> Hello,
> 
>   I am looking for a program that will take a text file and add a line to it
> at the beginning without needing to pull the whole file in, modify it and
> then save it again.  
> -[snip]-

As fare as I am aware, you can't just append to the beginning of a file
and 'bump' the rest of the file forward (if you want to replace the
first line, just
open(FILE, "+<filename.txt"); seek(FILE, 0, 0); print FILE $line; close
(FILE);

	However, if it only resources you are worried about, that isn't a
problem.  Just open a new file, print out your line, and then copy the
other file over sequentially, eg.

open (OLD, "from.txt") || die ("foo");
open (NEW, ">new.txt") || die ("bar");

print NEW $new_line_to_add."\n";

while (<OLD>) {
	print NEW $_;
}

close(OLD); close(NEW);

This shouldn't use much resource, since you're simply reassigning to the
same variable over and over, and you're not slurping an entire file.
Speed may be a different matter for big files :-)

> Also, I need a parser that will read the first line of the file in order to extract
> the written information once the file has been closed.  Any help will be
> greatly appreciated.

??? Once the file has been closed ???  I suppose you could use some
heavy wizadry and ioctl to talk to the disk controller, but I don't
think this is what you want (plus you'll be putting your data in
danger).  Alternatively you could use 

$firstline = qx!head -n 1 myfile.txt!;

But it would be a lot easier to do:

open(FILE, "myfile.txt") || die("foo"); $firstline = <FILE>;
close(FILE);
## Parse up $firstline.

Hope this helps!

-- adam

Aadm Ipnarski
Project Leader, Faresearch.
adam@fastfare.co.uk | www.travelselect.com


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

Date: 05 Aug 1998 17:50:05 +0100
From: Jim Brewer <jimbo@soundimages.co.uk>
Subject: Re: flock and/or fcntl on solaris
Message-Id: <uogtzxtj6.fsf@jimbosntserver.soundimages.co.uk>

Tom Phoenix <rootbeer@teleport.com> writes:

> 
> On 30 Jul 1998, Jim Brewer wrote:
> 
> > (409): About to lock TP_fcntl.plx!
> > Can't lock: 269241252 at TP_fcntl.plx line 28.
> 
> Yep, looks as if your perl is miscompiled. That big number seems to be
> from $!, which is a sign of serious dain bramage. Solaris should be able
> to lock files just fine, so try compiling again. Good luck!

Tom, how does NFS affect the situation? Will flock() and/or fcntl
behave oddly or not at all? Will fcntl overcome the problem?

Thanks for your help thus far.

-- 
Jim Brewer
e-mailed courtesy copies are unappreciated, please refrain.


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

Date: Wed, 05 Aug 1998 16:24:12 GMT
From: "Norman Bunn" <norman.bunn@mci.com>
Subject: Frames
Message-Id: <MG%x1.1247$4r2.567500@news.mci2000.com>

When I run a perl program to generate HTML for frames, I receive:

CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:

<html>
<head>
<title>my title</title>
</head>
<frameset cols='23%,77%'>
   <frameset rows='66%,*'>
     <frame src=ordermenu.html name=ordermenu>
     <frame src=picture.html name=picture>
  </frameset>
  <frameset rows="*,25">
    <frame src=ordermain.html name=ndsmain marginwidth=1 marginheight=1>
    <frame marginheight=0 src=/desktopindex.html name=desktopindex
scrolling=no>
  </frameset>
</frameset>
</html>

The HTML is okay, as it displays fine when copied and pulled up in a
browser.  The program works fine from the command line.  Any ideas why this
is happening under NT 4.0 and IIS 4?  Here's the source:

#!c:/perl/bin/perl

use CGI qw(:all);
#####################################################

print "<html><head><title>my title</title></head>";
print "<frameset cols='23%,77%'>";
print "<frameset rows='66%,*'>";
print "<frame src=ordermenu.html name=ordermenu>";
print "<frame src=picture.html name=picture>";
print "</frameset>";
print "<frameset rows=\"*,25\">";
print "<frame src=ordermain.html name=ndsmain marginwidth=1
marginheight=1>";
print"<frame marginheight=0 src=/desktopindex.html name=desktopindex
scrolling=no>";
print "</frameset>";
print "</frameset>";
print "</html>";

Norman
norman.bunn@mci.com




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

Date: Wed, 05 Aug 1998 16:46:41 GMT
From: "Norman Bunn" <norman.bunn@mci.com>
Subject: Re: Frames
Message-Id: <R%%x1.1252$4r2.585224@news.mci2000.com>

Found the problem.  Forgot the HTTP headers:

print header;

Norman Bunn wrote in message ...
>When I run a perl program to generate HTML for frames, I receive:
>
>CGI Error
>The specified CGI application misbehaved by not returning a complete set of
>HTTP headers. The headers it did return are:
>
><html>
><head>
><title>my title</title>
></head>
><frameset cols='23%,77%'>
>   <frameset rows='66%,*'>
>     <frame src=ordermenu.html name=ordermenu>
>     <frame src=picture.html name=picture>
>  </frameset>
>  <frameset rows="*,25">
>    <frame src=ordermain.html name=ndsmain marginwidth=1 marginheight=1>
>    <frame marginheight=0 src=/desktopindex.html name=desktopindex
>scrolling=no>
>  </frameset>
></frameset>
></html>
>
>The HTML is okay, as it displays fine when copied and pulled up in a
>browser.  The program works fine from the command line.  Any ideas why this
>is happening under NT 4.0 and IIS 4?  Here's the source:
>
>#!c:/perl/bin/perl
>
>use CGI qw(:all);
>#####################################################
>
>print "<html><head><title>my title</title></head>";
>print "<frameset cols='23%,77%'>";
>print "<frameset rows='66%,*'>";
>print "<frame src=ordermenu.html name=ordermenu>";
>print "<frame src=picture.html name=picture>";
>print "</frameset>";
>print "<frameset rows=\"*,25\">";
>print "<frame src=ordermain.html name=ndsmain marginwidth=1
>marginheight=1>";
>print"<frame marginheight=0 src=/desktopindex.html name=desktopindex
>scrolling=no>";
>print "</frameset>";
>print "</frameset>";
>print "</html>";
>
>Norman
>norman.bunn@mci.com
>
>




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

Date: Wed, 05 Aug 1998 12:09:18 -0400
From: John Porter <jdporter@min.net>
Subject: Re: hiding user input
Message-Id: <35C883AE.7277@min.net>

Gary L. Burnore wrote:
> 
> On Tue, 04 Aug 1998 16:30:43 GMT, in article <35C737B4.308C@min.net>, John
> Porter <jdporter@min.net> wrote:
> >No, not at all. I just went and searched for the relevant RFCs.
> >The earliest one, as far as I could tell, was 850.
> 
> I can't think of any that related directly to what is now known as USENET (Or
> usenet or USENet or UsEnEt) that's older than RFC-850.  I can't find the damn
> CD either so I can't look it up. (Lost it last year during a move and it
> hasn't resurfaced yet)

Hm?  CDs are nice in some ways, but the 'net holds a lot more data.
Many sites archive the RFCs and other historical 'net documents.

-- 
John Porter


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

Date: 5 Aug 1998 16:05:48 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: hiding user input
Message-Id: <6q9vss$mk7$11@info.uah.edu>

In article <35C7F678.5E655187@negia.net>,
	Dan Boorstein <danboo@negia.net> writes:
: since i've seen posts attributed to you in "the new group" (i.e.,
: comp.lang.perl.moderated), i'm going to assume that you are aware
: that it "is in place".

I'm one of the moderators, so yes, I'm very aware that it is, in
fact, in place. :-)

: In article <6h8cdr$nkk$1@info.uah.edu>, 
:              gbacon@cs.uah.edu (Greg Bacon) writes:
: > When the new group is in place, I promise never again to bitch about
: > someone asking a FAQ on comp.lang.perl.misc. :-)

To me, this thread isn't just about this group, rather newsgroups in
general.

: *sigh*, i wonder if c.l.p.moderated got any votes from people who
: thought that a vote for moderation was a vote for the end of
: FAQ (bash|bitch)ing in c.l.p.misc.

clpmod doesn't replace clpmisc.  clpmisc still has a definite purpose
as a catchall in the comp.lang.perl.* hierarchy.

Greg


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

Date: Wed, 05 Aug 1998 16:08:58 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: hiding user input
Message-Id: <35c88391.132760445@nntpd.databasix.com>

On 5 Aug 1998 15:36:26 GMT, in article <6q9u5q$mk7$10@info.uah.edu>,
gbacon@cs.uah.edu (Greg Bacon) wrote:

>In article <35d28369.67175268@nntpd.databasix.com>,
>	gburnore@databasix.com (Gary L. Burnore) writes:
>: Yep, chris. Ignore me.  Continue to let people like Abigail shit on peop
>: when someone says something about it, be sure to ignore them.
>
>Why do your protests have to be public?  Wouldn't a polite private
>message to Abigail have suited your needs just as well? 

No.
-- 
      I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
---------------------------------------------------------------------------
                  How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore                       |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH!                                  |  ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
                                      |  ][3 3 4 1 4 2  ]3^3 6 9 0 6 9 ][3
Special Sig for perl groups.          |     Official Proof of Purchase
===========================================================================


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

Date: Wed, 05 Aug 1998 16:52:09 GMT
From: Greg Swank <gswank@beckerinc.com>
Subject: HTPASSWD / HTACCESS
Message-Id: <35C88CC7.245D@beckerinc.com>

Help...!

First:  I got everything working on the password and my .htaccess file
        has multiple users in the "require user (userName)..

	I would like to be able to add new users and passwords without
        having to telnet in everytime.  Is there a short routine that
        I can add or run that would "append" the htaccess file after
	adding the user name and password...?

Second:  Because I am new to Perl, I would really like to get my hands
         on a "dummy" book or something written by third parties to get
         me up to speed on this.  Recommend..?

Thanks in advance
If you repsond - please post and email me. thank you


Greg
gswank@beckerinc.com


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

Date: 5 Aug 1998 16:20:31 GMT
From: Jeffrey Marans <jmarans@nortel.ca>
Subject: Perl 4 compile on Solaris 2.6
Message-Id: <6qa0of$cv5@bmerhc5e.bnr.ca>

First off, going to perl 5 is not an option.  Rewriting the app is not
an option.  Delivering a Y2K binary is critical path.

Period.

I put it that way to avoid having to explain why I can't use the version
of perl that makes life so much easier.

Anyway, I've got to compile perl/ingperl/oraperl for solaris 2.6 and hpux
10.20.
The latter worked, but the solaris build fails the readdir test script, as in
t/op/readdir.t.  The readdir function returns gibberish file names.

If anyone has any experience with this compile, I'd really like to know about
it.

Thanks,
Jeff Marans

 
+-----------------------------+----------------------------------+
| Jeffrey Marans              | PAS/DDME Operations              |
| jmarans@nortel.ca           | Dept 4C46, FITZ II Mailstop #34  |
| ESN           393-8418      | Nortel                           |
| Phone   (613) 763-8418      | PO Box 3511, Station 'C'         |
| Fax     (613) 763-9250      | Ottawa, Ontario  K1Y 4H7         |
+-----------------------------+----------------------------------+



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

Date: Wed, 05 Aug 1998 18:31:35 +0200
From: Thomas Jespersen <thomas@daimi.aau.dk>
Subject: Re: Perl recipes
Message-Id: <35C888E7.CFFD6250@daimi.aau.dk>

Tom Christiansen wrote:

> Actually, it's a Rocky Mountain Bighorn ram.

ohh,

"the Rocky Mountain Bighorn ram book"


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

Date: 5 Aug 1998 16:49:52 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl recipes
Message-Id: <6qa2fg$boc$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, thomas@daimi.aau.dk writes:
:"the Rocky Mountain Bighorn ram book"

Oh, I think ``The Ram Book'' suffices, don't you?

--tom
-- 
"A well-written program is its own heaven;
a poorly-written program is its own hell."


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

Date: Wed, 05 Aug 1998 15:59:13 GMT
From: "Mission A/V" <dan@dont.spam.me.please.missionrec.com>
Subject: Re: perl5 bug?
Message-Id: <lj%x1.558$ke.872425@news1.atl.bellsouth.net>


Tom Phoenix wrote in message ...

>Maybe you'll know what's happening when you see what the value of $name is
>at the time that it fails.

    it winds up being

$name = 31
$value = No

These are values taken line by line from a file. I'm not sure what the
difference could be here.
I can delete that line from the file, but then I get the error on the next
line anyway.

>But the real solution is (almost certainly) to
>stop using a hammer to install screws. Hope this helps!


    But.. I don't own a screwdriver yet <g>. Or at least I'll have to learn
what one looks like....


Thanks for the advice.

Daniel




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

Date: 5 Aug 1998 12:13:46 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: perl5 bug?
Message-Id: <6qa0bq$lld$1@monet.op.net>


In article <lj%x1.558$ke.872425@news1.atl.bellsouth.net>,
Mission A/V <dan@dont.spam.me.please.missionrec.com> wrote:
>$name = 31

Then you're trying to assign to variable $31, which is read-only.
You lose.

This is only one of several reasons why you should be putting the data
into a hash, into several unrelated variables.  Do this:

	$hash{$name} = $value;

Then you have a hash that has all the input data in it.

In June I wrote an article here titled
     Why it's stupid to `use a variable as a variable name'
     (Message-ID:  <6lnb70$lct$1@monet.op.net>)

You might want to have a look at it.  I mentioned the problem you are
having now as a specific peril.




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

Date: Wed, 5 Aug 1998 16:06:52 GMT
From: Peter A Fein <p-fein@uchicago.edu>
Subject: Re: perlfaq - frequently asked questions about Perl (part 0 of 9)
Message-Id: <opgpvefv2eb.fsf@harper.uchicago.edu>

WTF was that?!?  Thanks, I've already got my own copy of the man
pages.

-- 
Peter A Fein                                           Summering in SF!
Home: 650-571-6476                                   Work: 650-628-2172
p-fein@uchicago.edu                             pfein@us.checkpoint.com
Gilette's Razor: The best a man can get.


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

Date: 5 Aug 1998 16:27:03 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: perlfaq - frequently asked questions about Perl (part 0 of 9)
Message-Id: <6qa14n$nnd@fridge.shore.net>

Peter A Fein <p-fein@uchicago.edu> wrote:
: WTF was that?!?  Thanks, I've already got my own copy of the man
: pages.

In case you're new to Usenet, it is common practice in most groups to post
the actual FAQ regularly, rather than simply posting a pointer to it. I'd
say that this will increase the liklihood of newbies seeing (if not
actually reading)  the FAQ, and is thus a good thing. Anyone who doesn't
want to see these postings in their own newsreader can easily killfile
them. 

--Art

--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
                  http://www.agitators.com/calendar/
--------------------------------------------------------------------------


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

Date: 05 Aug 1998 12:43:56 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: Peter A Fein <p-fein@uchicago.edu>
Subject: Re: perlfaq - frequently asked questions about Perl (part 0 of 9)
Message-Id: <n29j9vdv.fsf@mailhost.panix.com>

Peter A Fein <p-fein@uchicago.edu> writes:

> WTF was that?!?  Thanks, I've already got my own copy of the man
> pages.

Following is an excerpt from a message I received today, thanking me
for some help I'd provided in this froup.  In my message I'd suggested
that the asker consult perlfaq6 and perlre.

   I didn't even realize that perlfaq6 existed until I saw Tom
   Christiansen's post of it this morning (I knew about the regular
   documentation and the faq that's on CPAN.)

Does this answer your question about WTF that was?

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf/


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

Date: Wed, 05 Aug 1998 16:10:36 GMT
From: "Majik Group" <filmguy@bellsouth.net>
Subject: Re: Please Help - Perl on the Web
Message-Id: <0u%x1.808$GM4.1568720@news2.atl.bellsouth.net>


Andy Ng wrote in message <35C09526.96589BAB@york.ac.uk>...
>Can anyone help?
>
>I want to use perl to execute a program, which is normally run from a
>unix prompt in the form of a command line. What goes into the command
>line will be collected via a 'form' and just stured in variables, but
>how do I execute a program (with a file that the user has already
>uploaded!) and then get the output of that program (which will be
>another file) back to the user.
>


It sounds like you are allowing the user to upload ".Wav" files or
another sound file and play it back to the user....

If this is correct, I would have the user upload the file (You can check
out Matt's collection for great internet upload scripts...
http://www.worldwidemart.com)

Store the name in a variable and have the "modified" upload script
"wait" until the "filename" exists on the server, then create
and HTML page that includes the "EMBED" or "BGSOUND" command
(Netscape/Explorer) to play the sound back to the user or whatever.

If you are allowing users to upload "unknown" CGI scripts that will
actually generate file output, They would have to make sure the files
that they create would output into a "specific" filename.  THIS IS
VERY DANGEROUS!!!!!! A hacker could put your server out of
business in no-time flat!

IMHO
Mike Johnston
tech@pcfix2000.com





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

Date: Wed, 05 Aug 1998 09:24:25 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Reading in one file and writing to another
Message-Id: <35C85D09.7DB9FD20@matrox.com>

Matt Grommes wrote:
> 
> Man, I'm an idiot. I never even thought of writing to another file. doh.
> Thanks alot.
> 

Hmmm... how do you explain the subject of the thread (that you wrote)
then ? ;-)

-- 
Ala Qumsieh             |  No .. not Just Another
ASIC Design Engineer    |  Perl Hacker!!!!!
Matrox Graphics Inc.    |
Montreal, Quebec        |  (Not yet!)


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

Date: 5 Aug 1998 16:33:11 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Regexp question
Message-Id: <6qa1g7$fd3$1@marina.cinenet.net>

Alan Silver (alan@find-it.furryferret.uk.com) wrote:
: Whilst I'm quite happy with all of the other very clever regexp-type
: answers that have been offered, I would like to offer a totally
: different answer. Why use regexps at all ? The following works fine ...
: 
: $string = 'hostname/result/data';
: $host = substr($string,0,index($string,'/'));
: 
: This leaves $host containing 'hostname' as required.

Yes, that's a perfectly reasonable alternative.  As I mentioned in my
earlier post on this thread, there are a zillion ways to do this, and a
large subset of *good* ways. :-)

: Pardon me for being simple, but I don't see why the simple approach is
: ignored in favour of fancy regexps.

Not ignored, just not my (and others', apparently) style.  Your way is
probably more efficient but involves more typing and is harder (for me) to
eyeball-parse.  All a matter of taste, unless you're doing this often
enough that efficiency is a concern, in which case it should be taken to
the Court of Benchmark.

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Wed, 5 Aug 1998 17:31:25 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Retrieving file from REMOTE_ADDR ... HELP!
Message-Id: <Pine.HPP.3.95a.980805172049.7660I-100000@hpplus01.cern.ch>

On Wed, 5 Aug 1998, Hector Catre wrote:

> Hello,
> 
> I'm trying to figure out how to access the REMOTE_ADDR so that I can download 
> a file from that system to the server. I can't even figure out how to access 
> the REMOTE_ADDR's directory structure so that they can choose the file to be 
> downloaded. HELP!

This is not a perl language question.  

In fact, it's hard to see just what kind of a question it is, because
(as I'm afraid so often happens) you have presented us with a
half-formed solution to some unstated problem, and we can only guess
just what it is supposed to be achieving.  

REMOTE_ADDR may be in general the address of some proxy between the
client and the server.  Even IF it were the address of the client, how
the heck do you suppose that the _server_ can do something to poke
around in the client's file hierarchy?  The WWW doesn't work that way;
thank goodness.

If the client wants to send the server a file, you can use INPUT
TYPE=FILE in a FORM: consult the appropriate CGI resources for details. 
If that isn't what you want, then choose an appropriate group (i.e not
this one) to say just what you are trying to achieve, and then a better
answer may be feasible. 

F'ups prophylactially set - please feel free to override to whatever 
seems most appropriate.  E.g the CGI authoring group.



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

Date: Wed, 05 Aug 1998 12:43:55 -0400
From: John Porter <jdporter@min.net>
Subject: Re: strange results from tied hash
Message-Id: <35C88BCB.1D88@min.net>

krupicka@tellabs.com wrote:
> 
> The point is why is Perl behaving as it is.
> Is it a bug in perl or is it a bug in my module?
> I am leaning towards a bug in perl. But I'm not sure.

If you can manage to trim your program down to a few
lines which illustrate the problem, I would love to
see it.

-- 
John Porter


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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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 V8 Issue 3367
**************************************

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