[7534] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1161 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Oct 11 18:07:20 1997

Date: Sat, 11 Oct 97 15:00:20 -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           Sat, 11 Oct 1997     Volume: 8 Number: 1161

Today's topics:
     Re: Best way to comma seperate a number? (Tony Bowden)
     Re: Best way to comma seperate a number? <ajohnson@gpu.srv.ualberta.ca>
     Re: Best way to comma seperate a number? (Tad McClellan)
     click on cgi script to download file (David Waters)
     Re: Include gif without <image src= <sawyer@ibm.net>
     Re: Include gif without <image src= <flavell@mail.cern.ch>
     Re: Lists of lists in Perl 4 (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
     Re: Merging Values (brian d foy)
     Re: Merging Values (Tad McClellan)
     Need help in searching a string <masroor@bga.com>
     Re: Need help in searching a string (brian d foy)
     Newbie question; how to redirect <j_ehm@hotmail.com>
     Re: Newbie question; how to redirect <flavell@mail.cern.ch>
     Re: Redirect as hidden value in form (brian d foy)
     Re: Searchable Database. (Jared Evans)
     Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
     umask and mkdir.. (Alex Krohn)
     URL checking <thelenm@cs.hope.edu>
     Re: URL checking (brian d foy)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 11 Oct 1997 17:55:54 GMT
From: tony@crux.blackstar.co.uk (Tony Bowden)
Subject: Re: Best way to comma seperate a number?
Message-Id: <61oeja$6kt$1@sparc.tibus.net>

Tad McClellan (tadmc@flash.net) wrote:
: : I just can't find a way of matching from the right rather than the left.
: : (if it's in the FAQ then I've missed it, cos I have checked ...)
 
: -----------------
: Perl FAQ, part 5:
:    "How can I output my numbers with commas added?"
: -----------------

Ack!

: Thank you for checking. That's what you are supposed to do.
: You, sir, are a good Usenet citizen.
: It was pretty easy for me to find though.

Well, I read the whole way through sections 4 and 6 looking for it, cos
they seemed the most likely place ... perhaps there should be a 
  perdoc perlfaqs
or something that actually lists all the questions with the sections that
the answers are in if you want them. There's so much documentation now
that it's getting hard to find what you're looking for unless you know
where it is!

Tony
-- 
-----------------------------------------------------------------------------
 Tony Bowden |  tony@tmtm.com / NooNoo@teletubbies.org / http://www.tmtm.com/
 Belfast, NI |  How can you be a nymphomaniac and never had sex? / I'm choosy
-----------------------------------------------------------------------------


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

Date: Sat, 11 Oct 1997 13:00:45 -0600
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: Best way to comma seperate a number?
Message-Id: <343FCCDD.24C88120@gpu.srv.ualberta.ca>

Tony Bowden wrote:
> 
> Tad McClellan (tadmc@flash.net) wrote:
> : : I just can't find a way of matching from the right rather than the left.
> : : (if it's in the FAQ then I've missed it, cos I have checked ...)
> 
> : -----------------
> : Perl FAQ, part 5:
> :    "How can I output my numbers with commas added?"
> : -----------------
> 
> Ack!
> 
> : Thank you for checking. That's what you are supposed to do.
> : You, sir, are a good Usenet citizen.
> : It was pretty easy for me to find though.
> 
> Well, I read the whole way through sections 4 and 6 looking for it, cos
> they seemed the most likely place ... perhaps there should be a
>   perdoc perlfaqs
> or something that actually lists all the questions with the sections that
> the answers are in if you want them. There's so much documentation now
> that it's getting hard to find what you're looking for unless you know
> where it is!

there is always 'perldoc perltoc'  which relatively early on lists
the questions found in each of the perlfaq pods ... and toc info
on the other pods as well.

alternatively, I've a little Perl script I made some time ago
to grep the perlfaq pods for a supplied pattern ... it prints out
all the =head lines (and the faqfile name) containing the pattern...
you can then use it with the -f option (like perldoc) with a more
specific pattern to extract the documentation chunk(s) for that pattern.
(see below)

I'd do it differently now I'm sure, its not great, but
since it appears to work ok I've never bothered --- you're
welcome to /use it|abuse it|improve it/:

example:

    [danger:ajohnson:~]$ faqgrep 'commas'
    perlfaq5.pod:=head2 How can I output my numbers with commas added?
    perlfaq7.pod:=head2 Do I always/never have to quote my strings 
    or use semicolons and commas?
    [danger:ajohnson:~]$ faqgrep -f 'commas added'
    =head2 How can I output my numbers with commas added?

    This one will do it for you:

        sub commify {
            local $_  = shift;
            1 while s/^(-?\d+)(\d{3})/$1,$2/;
            return $_;
        }

        $n = 23659019423.2331;
        print "GOT: ", commify($n), "\n";

        GOT: 23,659,019,423.2331
[snip rest of faq answer]

--- faqgrep ---
#!/usr/bin/perl -w
use strict;
my($opt,$pattern,$faqdir,@faqs,$faq);

# change the $faqdir to point to your pod directory
$faqdir="/usr/local/perl5.004_03/pod";

$opt=shift @ARGV if $ARGV[0]=~/-f/;
$pattern=$ARGV[0];
opendir(FAQDIR,$faqdir)||die "can't open $faqdir: $!";
@faqs=grep /faq/,readdir FAQDIR;
close FAQDIR;

if ($opt) {
   get_faq();
} else { 
   grep_faq_heads();
}
sub grep_faq_heads {
    foreach $faq (@faqs) {
        open(FAQ,"$faqdir/$faq")||die "can't open $faq: $!";
        while (<FAQ>) {
            print "$faq:$_" if /^=head.*?$pattern/o;
        }
        close FAQ;
    }
}

sub get_faq {
    my($n);
    foreach $faq (@faqs) {
        open(FAQ,"$faqdir/$faq")||die "can't open $faq: $!";
        while (<FAQ>) {
            $n=1 if /^=head.*?$pattern/o;
            $n=0 if /^=head(?!.*?$pattern)/o;
            print if $n;
        }
        close FAQ;
    }
}    
__END__

regards
andrew


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

Date: Sat, 11 Oct 1997 13:38:28 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Best way to comma seperate a number?
Message-Id: <43ho16.102.ln@localhost>

Tony Bowden (tony@crux.blackstar.co.uk) wrote:
: Tad McClellan (tadmc@flash.net) wrote:

: : : (if it's in the FAQ then I've missed it, cos I have checked ...)

: : Thank you for checking. That's what you are supposed to do.
: : You, sir, are a good Usenet citizen.
: : It was pretty easy for me to find though.

: Well, I read the whole way through sections 4 and 6 looking for it, cos
: they seemed the most likely place ... perhaps there should be a 
:   perdoc perlfaqs
: or something that actually lists all the questions with the sections that
: the answers are in if you want them. There's so much documentation now
: that it's getting hard to find what you're looking for unless you know
: where it is!


   grep '^=head2' perlfaq[0-9].pod  >FAQ.questions

or, if your system is so silly as to not have a command that can
search many files for a pattern, then you write your own:

   perl -ne 'print "$ARGV:$_" if /^=head2/' perlfaq[0-9].pod  >FAQ.questions


That is how I collected all of the FAQ questions into a single file...


--
    Tad McClellan                          SGML Consulting
    tadmc@flash.net                        Perl programming
    Fort Worth, Texas


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

Date: Sat, 11 Oct 1997 19:27:52 GMT
From: dwaters@delphi.co.uk (David Waters)
Subject: click on cgi script to download file
Message-Id: <3441d331.1234426@news.demon.co.uk>

Hi all,

I've seen on some web pages, where you click a script
and it downloads an appropriate file.

How is this done within the script to tell the browser
to download a file.

Preferably in perl please

Thanks

David



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

Date: Sat, 11 Oct 1997 11:06:26 -0700
From: Tim Sawyer <sawyer@ibm.net>
Subject: Re: Include gif without <image src=
Message-Id: <343FC022.17330536@ibm.net>

Tom Phoenix wrote:
> 
> On Fri, 3 Oct 1997, Tim Sawyer wrote:
> 
> > Isn't there a way, with mime types or something, to 'imbed' the gif data
> > in html without using the <image> tag? Or can the <image> tag be faked
> > into accepting gif data from STDIN?
> 
> If there is a way to do this, the HTML docs and FAQs should tell about it.
> If you can't find an answer there, the folks in a newsgroup about HTML
> should be able to give you a better and more complete answer than we can
> here. Good luck!

The solution to this was to point the image tag at a cgi program. i.e. 
<img src='something.cgi'>. Then something.cgi writes gif data to STDOUT. 
I figured it would take some cgi/perl programing. That's why I asked
here. 
The HTML Docs and FAQs never mentioned this anywhere that I could find.
I 
ended up getting the idea from looking at the way hit counters work.


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

Date: Sat, 11 Oct 1997 21:06:37 GMT
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Include gif without <image src=
Message-Id: <Pine.A41.3.95a.971011225735.36730D-100000@sp051>

On Sat, 11 Oct 1997, Tim Sawyer wrote:

> The solution to this was to point the image tag at a cgi program. i.e. 
> <img src='something.cgi'>.

Of course: that's the usual and obvious approach, but it didn't seem to
be what you were asking for. 

> Then something.cgi writes gif data to STDOUT. 

Sure, preceded by the appropriate headers

> I figured it would take some cgi/perl programing. That's why I asked
> here. 

Oh no, questions about CGI programming belong on
comp.infosystems.www.authoring.cgi, as people never tire of repeating
here.

> The HTML Docs and FAQs never mentioned this anywhere that I could find.

But it isn't an HTML question.  As far as HTML is concerned it's an IMG
tag, like any IMG tag.  If you divide the problem up into its defined
components it becomes obvious.  

If you'd consulted Nick Kew's CGI FAQ, for example, you'd have found
this:   http://www.webthing.com/tutorials/cgifaq.3.html#17




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

Date: Sat, 11 Oct 97 17:01:53 -0400
From: bsa@void.apk.net (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
Subject: Re: Lists of lists in Perl 4
Message-Id: <343fea12$1$ofn$mr2ice@speaker>

In <343DE597.42B95AC7@absyss.fr>, on 10/10/97 at 10,
   Doug Seay <seay@absyss.fr> said:
+-----
| How do you create "an anonymous list" in Perl4?  You could use eval to build
| a list named after the contents of a counter, but that isn't truely
| anonymous.  Did you have a different approach?
+--->8

That's basically it.  While Perl5 supports true anonymous lists and hashes,
you still have to use the "gensym trick" to get "anonymous" filehandles, etc.

Let's just say that building "anonymous" lists was the *least* of the
annoyances of multidimensional structures in Perl4.  :-)

-- 
brandon s. allbery              [Team OS/2][Linux]          bsa@void.apk.net
cleveland, ohio              mr/2 ice's "rfc guru" :-)                 KF8NH
Warpstock '97:  OS/2 for the rest of us!  http://www.warpstock.org
Memo to MLS:  End The Burn Scam --- Doug Logan MUST GO!  FORZA CREW!



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

Date: Sat, 11 Oct 1997 20:16:56 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Merging Values
Message-Id: <61ol2f$mgh@bgtnsc02.worldnet.att.net>

In article <343EFE93.5FACC7C1@nwu.edu>, Adam <a-grayson@nwu.edu> wrote:

> If you have two string values (i.e. $valueone = 99 and $valuetwo = 11),
> can they be merged anyway so that $valuethree = 9911?

let's see how many solutions to last week's similar thread i can 
remember :)

   1. concatenation: $valuethree = $valueone . $valuetwo;

   2. interpolation: $valuethree = "$valueone$valuetwo";
   but this gets optimized to 1.

i guess i don't remember too much, although i could go back to
DejaNews to reread the thread.  *heh*

-- 
brian d foy                                 <http://computerdog.com>
#!/usr/bin/perl
$_=q|osyrNewkecnaYhe.mlorsePptMskurj|;s;[NY.PM]; ;g;local$\=
qq$\n$;@pm=split//;while($NY=pop @pm){$pm.=$NY;$ny.=pop @pm}
$pm=join'',reverse($ny,$pm);open(NY,'>&STDOUT');print NY $pm


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

Date: Sat, 11 Oct 1997 13:30:44 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Merging Values
Message-Id: <kkgo16.6t1.ln@localhost>

Adam (a-grayson@nwu.edu) wrote:
: If you have two string values (i.e. $valueone = 99 and $valuetwo = 11),
: can they be merged anyway so that $valuethree = 9911?

: Any answer would be much appreciated.

$valuethree = $valueone . $valuetwo;

or 

$valuethree = "$valueone$valuetwo";

or

$valuethree = join '', $valueone, $valuetwo;


--
    Tad McClellan                          SGML Consulting
    tadmc@flash.net                        Perl programming
    Fort Worth, Texas


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

Date: 11 Oct 1997 19:44:35 GMT
From: masroor <masroor@bga.com>
Subject: Need help in searching a string
Message-Id: <61okv3$gee$1@news3.realtime.net>


I am having problem to find a string relative to another string.
Below is the detail.

Below is a file called abcd.txt
=======================================================

service:: catering
          food type: southwestern
          guests # : 123
          food type: american
          guests #: 200
          childrens #: 35
          food type : mexican
          guests #: 56
service:: ticketing
          destination: Acapulco
          tourist #: 67
          type of transportation : Air
          destination : Bahamas
          tourists #: 90
          children #:20
==========================================================

Basically I can search for the string "service:: catering:, now once I 
find the search string, then I need to find the string "food type:". If 
you notice the string "food type:" is in relation to the 1st string search
of "service:: catering". My question How do I tell the perl program to 
move the file pointer from the 1st string search. Normally in while loop
in checks one line by one line.

Below is my program which can find the 1st string.
     
#!/usr/lpp/bin/perl5.002
open(AA,/abcd.txt|);
while(AA)
 if (^service::catering$)
    $m=5 ;
     else
      $l=10 ;
close(AA) ;

Question, I don't know how to search the next string "food type" relative
to the 1st string search. I would very much appreciate any help.
I prefer email replies.

Thank you
Masroor Ahmed

email ==> masroor@bga.com




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

Date: Sat, 11 Oct 1997 20:52:28 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Need help in searching a string
Message-Id: <61on55$489@bgtnsc02.worldnet.att.net>

In article <61okv3$gee$1@news3.realtime.net>, masroor <masroor@bga.com> wrote:

> service:: catering
>           food type: southwestern

> Basically I can search for the string "service:: catering:, now once I 
> find the search string, then I need to find the string "food type:". If 
> you notice the string "food type:" is in relation to the 1st string search
> of "service:: catering". My question How do I tell the perl program to 
> move the file pointer from the 1st string search. Normally in while loop
> in checks one line by one line.
> 
> Below is my program which can find the 1st string.

[snip program that never could have worked with all those syntax
errors]
 

here is some pseudo-code

   1. get a line from the file
   2. is this line "service:: catering"?
      NO: go back to 1.
      YES: get the next line, which should be "food type: "
   3. was the nest line "food type: "?
      NO: do some error handling stuff
      YES: do your thang
   4. go back to 1.

now that we have a method to accomplish this task, we can translate it
into code:

#1.  get a line from the file
while( $line = <FILE> )
   {
   #2. is this the right line?
   next unless $line =~ m/service:: catering/;

   #2 YES: so get the next line:
   $next_line = <FILE>;

   #3. was it the right line?
   next unless $next_line =~ m/food type: (.*)/;

   #3 YES:  do your thing
   push @foods, $1;
   }

good luck :)

-- 
brian d foy                                 <http://computerdog.com>
#!/usr/bin/perl
$_=q|osyrNewkecnaYhe.mlorsePptMskurj|;s;[NY.PM]; ;g;local$\=
qq$\n$;@pm=split//;while($NY=pop @pm){$pm.=$NY;$ny.=pop @pm}
$pm=join'',reverse($ny,$pm);open(NY,'>&STDOUT');print NY $pm


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

Date: Sat, 11 Oct 1997 19:24:27 +0200
From: Johann Ehm <j_ehm@hotmail.com>
Subject: Newbie question; how to redirect
Message-Id: <343FB64B.4288@hotmail.com>

Hi, I have an old URL and I wan4t to redirect all accesses to my new URL
automatic so that the visitor won4t have to click a new URL-link.
I4m not at all familiar in how scripts work so I need in deepth help.
Thanxs in advance.
Johann Ehm, Sweden


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

Date: Sat, 11 Oct 1997 20:56:40 GMT
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Newbie question; how to redirect
Message-Id: <Pine.A41.3.95a.971011224858.36730C-100000@sp051>

On Sat, 11 Oct 1997, Johann Ehm wrote:

> Hi, I have an old URL and I wan4t to redirect all accesses to my new URL
> automatic so that the visitor won4t have to click a new URL-link.

You don't need to know anything about the perl language to achieve that
with most WWW servers.  Take a look at the documentation for the server
that you use.  If all else fails, try the comp.infosystems.www.server.*
group appropriate to whichever one it is.

With Apache or NCSA you're looking for the Redirect statement in, for
example, the relevant .htaccess file.  

Also the HTML FAQ mentions this:
http://www.htmlhelp.com/faq/wdgfaq.htm#27

Even if you needed to execute a script, this would be the wrong place
to ask how (this group is for questions about the Perl language).

> I4m not at all familiar in how scripts work so I need in deepth help.

You mean like locating comp.infosystems.www.authoring.cgi?  There's
FAQs and lots of helpful resources.   But for your specific query,
it's pretty unlikely that you need that.




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

Date: Sat, 11 Oct 1997 20:11:05 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Redirect as hidden value in form
Message-Id: <61okno$mgh@bgtnsc02.worldnet.att.net>

In article <343fb4a4.12619256@nntpserver.swip.net>, freddie@helsingborg.se
(Freddie Fernbrant) wrote:

> I am fairly new to Perl and have a redirection question (I know many do :) ).

> I know how to redirect a page, it is not that. The program is that my
script somehow gets ALL the vaules from
> my form page (HTML) except it only seems to get 2 HIDDEN values. Then it
skips to the "real" thing

the first thing to do is to isolate where you lose data.  

   *does it get into the POST data (you might want to change the
   method to GET to see what the browser thinks it should send)

   *are the appropriate field/value pairs in the data before you
   muck with it?

   *after?

once you know where the data get lost, you can usually easily spot the
problem. 


 
> I use this in my form.
> 
> <FORM ACTION="/cgi-bin/form/form.pl" METHOD=POST>
> <INPUT TYPE=hidden NAME="recipient" VALUE="name@domain.com">
> <INPUT TYPE=hidden NAME="subject" VALUE ="WWW Form"
> <INPUT TYPE=hidden NAME="redirect" VALUE =
"http://xxx.xx.xxx.xx/something/something.html">

that looks like fun.  is your code by any chance mailing results to
the email in the "recipient" field?  and they get to choose the 
subject too?  won't the kewl d00dZ just love that - a way to send email
from another machine...

(these sorts of scripts are not good ideas - no matter which free script
archive had an example just like it)

> and I use this perl code:

[snip standard broken query string munger]

get CGI.pm and save yourself a lot of hassle :)


good luck :)

-- 
brian d foy                                 <http://computerdog.com>
#!/usr/bin/perl
$_=q|osyrNewkecnaYhe.mlorsePptMskurj|;s;[NY.PM]; ;g;local$\=
qq$\n$;@pm=split//;while($NY=pop @pm){$pm.=$NY;$ny.=pop @pm}
$pm=join'',reverse($ny,$pm);open(NY,'>&STDOUT');print NY $pm


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

Date: 11 Oct 1997 16:53:39 GMT
From: jared@node6.cwnet.frontiernet.net (Jared Evans)
Subject: Re: Searchable Database.
Message-Id: <61oauj$cqi$1@node6.cwnet.frontiernet.net>

In article <Pine.HPP.3.95.971010155106.4175D-100000@barney.gonzaga.edu>,
Amy Dorsett  <adorsett@gonzaga.edu> wrote:
>I am working on a project which entails implementing a searchable database
>via the internet using PERL/CGI.  I have programming experience (but
>none with PERL CGI) and know my database pretty well but combinig the two
>(and learning PERL) is not working... 
>
>Do you have any suggestions at all on books, websites or anything else
>that may help me get started?
>
>thank you.
>


You might want to take a look at Sprite package.  Look on CSPAN site.


-- 
open(G,"|gzip -dc");$_=<<EOF;s/[0-9a-f]+/print G pack("h*",$&)/eg 
f1b88000b620f22320303fa2d2e21584ccbcf29c84d2258084d2ac158c84c4ece4d22d1000118a8d5491000000
EOF


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

Date: 11 Oct 1997 16:59:36 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <61ob9o$hu$1@info.uah.edu>

Following is a summary of articles spanning a 7 day period,
beginning at 04 Oct 1997 09:03:56 GMT and ending at
11 Oct 1997 06:21:39 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" e-mail address and name.
    - Original Content Rating is the ratio of the original content volume
      to the total body volume.
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.

Excluded Posters
================

perlfaq-suggestions@mox.perl.com

Totals
======

Total number of posters:  411
Total number of articles: 880 (322 with cutlined signatures)
Total number of threads:  360
Total volume generated:   1514.8 kb
    - headers:    600.9 kb (12,284 lines)
    - bodies:     847.5 kb (27,924 lines)
    - original:   612.3 kb (21,261 lines)
    - signatures: 64.3 kb (1,423 lines)
Original Content Rating: 0.7224

Averages
========

Number of posts per poster: 2.14
    median: 1 post
    mode:   1 post - 296 posters
    s:      4.30 posts
Number of posts per thread: 2.44
    median: 2.0 posts
    mode:   1 post - 138 threads
    s:      2.10 posts
Message size: 1762.6 bytes
    - header:     699.2 bytes (14.0 lines)
    - body:       986.2 bytes (31.7 lines)
    - original:   712.4 bytes (24.2 lines)
    - signature:  74.8 bytes (1.6 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

   58   101.6 ( 49.4/ 40.0/ 25.0)  Tom Phoenix <rootbeer@teleport.com>
   35    67.2 ( 21.8/ 45.4/ 27.8)  Tad McClellan <tadmc@flash.net>
   29    54.7 ( 20.0/ 28.7/ 19.3)  brian d foy <comdog@computerdog.com>
   26    45.5 ( 18.7/ 26.8/ 16.7)  Doug Seay <seay@absyss.fr>
   22    36.0 ( 15.1/ 16.1/  8.7)  Jeremy D. Zawodny <zawodny@hou.moc.com>
   21    46.5 ( 10.7/ 32.6/ 25.7)  Greg Bacon <gbacon@cs.uah.edu>
   12    23.2 ( 10.5/ 12.6/  5.4)  abigail@fnx.com
   12    28.6 (  8.7/ 19.8/  8.8)  Benjamin Holzman <bholzman@earthlink.net>
   12    29.1 ( 14.5/ 14.6/  8.4)  Eli the Bearded <usenet-tag@qz.little-neck.ny.us>
   11    23.6 (  6.3/ 14.2/  8.6)  Mike Stok <mike@stok.co.uk>

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

 101.6 ( 49.4/ 40.0/ 25.0)     58  Tom Phoenix <rootbeer@teleport.com>
  67.2 ( 21.8/ 45.4/ 27.8)     35  Tad McClellan <tadmc@flash.net>
  54.7 ( 20.0/ 28.7/ 19.3)     29  brian d foy <comdog@computerdog.com>
  46.5 ( 10.7/ 32.6/ 25.7)     21  Greg Bacon <gbacon@cs.uah.edu>
  45.5 ( 18.7/ 26.8/ 16.7)     26  Doug Seay <seay@absyss.fr>
  36.0 ( 15.1/ 16.1/  8.7)     22  Jeremy D. Zawodny <zawodny@hou.moc.com>
  32.9 (  6.4/ 26.5/ 22.2)      9  faust@wwa.com
  29.1 ( 14.5/ 14.6/  8.4)     12  Eli the Bearded <usenet-tag@qz.little-neck.ny.us>
  28.6 (  8.7/ 19.8/  8.8)     12  Benjamin Holzman <bholzman@earthlink.net>
  23.6 (  6.3/ 14.2/  8.6)     11  Mike Stok <mike@stok.co.uk>

Top 10 Posters by OCR (minimum of five posts)
==============================================

          (kb)    (kb)
OCR       orig /  body  Posts  Address
------  --------------  -----  -------

0.9882     6.3 /   6.4     10  Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh" <bsa@void.apk.net>
0.9826     4.0 /   4.1      8  I R A Aggie <fl_aggie@thepentagon.com>
0.9491     2.5 /   2.6      5  "Chuck" <cstewart@flash.net>
0.9031     4.3 /   4.8      6  Sriram Srinivasan <sriram@weblogic.com>
0.8389    22.2 /  26.5      9  faust@wwa.com
0.7881    25.7 /  32.6     21  Greg Bacon <gbacon@cs.uah.edu>
0.7029     2.8 /   4.0      6  petri.backstrom@icl.fi
0.6877     2.9 /   4.2      5  Damian Conway <damian@cs.monash.edu.au>
0.6824     7.6 /  11.1      8  Terry Michael Fletcher - PCD ~ <tfletche@pcocd2.intel.com>
0.6804     4.5 /   6.5      5  samdie@ibm.net

Bottom 10 Posters by OCR (minimum of five posts)
=================================================

          (kb)    (kb)
OCR       orig /  body  Posts  Address
------  --------------  -----  -------

0.5795     8.4 /  14.6     12  Eli the Bearded <usenet-tag@qz.little-neck.ny.us>
0.5632     4.2 /   7.5      6  Mike Heins <mheins@prairienet.org>
0.5385     8.7 /  16.1     22  Jeremy D. Zawodny <zawodny@hou.moc.com>
0.4920     3.9 /   7.9     11  Jason Gloudon <jgloudon@bbn.com>
0.4877     3.6 /   7.4      6  "Creede Lambard" <fearless@io.com>
0.4549     1.9 /   4.3      6  over@the.net
0.4441     8.8 /  19.8     12  Benjamin Holzman <bholzman@earthlink.net>
0.4268     5.4 /  12.6     12  abigail@fnx.com
0.3758     1.8 /   4.8      7  Ilya Zakharevich <ilya@math.ohio-state.edu>
0.3372     4.3 /  12.9      5  Kermit Tensmeyer <kermit@ticnet.com>

Top 10 Threads by Number of Posts
=================================

Posts  Subject
-----  -------

   22  Newbie ques: How to concatenate two strings?
   14  $x = $y || $z - dangerous assumption?
   11  "19971008" and (....)(..)
   10  Forcing numeric interpretation?
   10  Wanted: Wall/Schwartz book (1st ed)
   10  Sorting values such as 1.1, 1.1.1, 2.1 into order
   10  chop from left to right
   10  map in void context (was Re: $x = $y || $z - dangerous assumption?)
    9  Help: Regular Expression Substitution
    8  Filehandle to file name?

Top 10 Threads by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Subject
--------------------------  -----  -------

  36.9 ( 18.3/ 17.1/ 10.5)     22  Newbie ques: How to concatenate two strings?
  28.2 (  9.5/ 17.3/ 11.5)     10  map in void context (was Re: $x = $y || $z - dangerous assumption?)
  24.8 ( 10.6/ 12.3/  7.3)     14  $x = $y || $z - dangerous assumption?
  23.1 (  4.6/ 18.5/ 10.4)      6  DATABASING IN PERL (HELP!)
  22.1 (  5.8/ 16.0/  6.9)      7  [Q - newbie] Sockets and bi-directional communication
  21.3 (  6.6/ 14.3/ 10.4)     10  Sorting values such as 1.1, 1.1.1, 2.1 into order
  21.1 (  7.2/ 13.6/  7.5)      9  Help: Regular Expression Substitution
  20.8 (  7.6/ 11.7/  7.3)     10  Forcing numeric interpretation?
  18.7 (  7.7/ 10.2/  5.8)     10  Wanted: Wall/Schwartz book (1st ed)
  17.4 (  6.6/  9.2/  6.0)     10  chop from left to right

Top 10 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

      19  alt.fan.e-t-b
      15  comp.lang.perl.modules
       6  comp.sys.next.programmer
       5  comp.sys.next.software
       5  comp.lang.perl
       4  comp.lang.perl.tk
       3  comp.unix.solaris
       3  comp.unix.aix
       3  no.perl
       3  alt.solaris.x86

Top 10 Crossposters
===================

Articles  Address
--------  -------

      15  Jackson Dodd <jackson@usenix.org>
      12  Eli the Bearded <usenet-tag@qz.little-neck.ny.us>
       7  "Manfred Schneider" <manfred.schneider@rhein-neckar.de>
       5  brian d foy <comdog@computerdog.com>
       4  Gerben_Wierda@RnA.nl
       4  Ilya Zakharevich <ilya@math.ohio-state.edu>
       3  Al Aab <af137@torfree.net>
       3  Christian Wetzel <cnwetzel@linguistik.uni-erlangen.de>
       3  Peter Prymmer <pvhp@forte.com>
       3  Don Hamrick <hamrick@alltel.net>


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

Date: Sat, 11 Oct 1997 19:45:29 GMT
From: alex@gossamer-threads.com (Alex Krohn)
Subject: umask and mkdir..
Message-Id: <343fd67c.5794621@news.supernews.com>

Hi,

I'm having a real problem with mkdir. What I want to do is create a
directory (from the web) and create a file inside the directory (again
from the web). I need to create the directory with permissions 777 (as
the web server runs as other) so that I can create the file inside of
it.

I'm unable to create a directory with the right permissions. I'm not
sure if I'm meant to use the chmod number (777) or the umask number
(which I think is meant to be 000 but i'm a little unsure). I've tried
a wide variety of combinations but still can't get it to work.

I've also tried creating the directory and then trying to chmod it
777, but it always comes back can't find file or directory.

Any ideas what I'm doing wrong?

Thanks for your help!,

Alex


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

Date: Sat, 11 Oct 1997 14:46:04 -0400
From: "Sgt. Floyd Pepper" <thelenm@cs.hope.edu>
Subject: URL checking
Message-Id: <Pine.SOL.3.95.971011144119.864A-100000@oin>

Hi, I'm wondering if there is a way to check whether a URL points to a valid
page.  By "valid", I mean that requesting the page at that URL will not
return a "File Not Found" or like errors.  It seems that it should be such
an easy thing to do; I just need to open a connection and get the page.
But it's just not working for me.  LWP is not installed on my system, either.
Thanks in advance for your help.

	Mike Thelen



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

Date: Sat, 11 Oct 1997 19:55:40 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: URL checking
Message-Id: <61ojql$ijs@bgtnsc02.worldnet.att.net>

In article <Pine.SOL.3.95.971011144119.864A-100000@oin>, "Sgt. Floyd
Pepper" <thelenm@cs.hope.edu> wrote:

> Hi, I'm wondering if there is a way to check whether a URL points to a valid
> page.  By "valid", I mean that requesting the page at that URL will not
> return a "File Not Found" or like errors.  It seems that it should be such
> an easy thing to do; I just need to open a connection and get the page.
> But it's just not working for me.  LWP is not installed on my system, either.
> Thanks in advance for your help.
> 
>         Mike Thelen

1.  The easy way:  get your system admin to install LWP.  tell him/her
that it is absolutely necessary for your work.  doesn't matter if it is
true, just say it.  then your problem is easily solved:

    #/usr/bin/perl -wT

    #this is just a snippet - it is not working code (although
    #it came out of working code.  you need to fill in the 
    #blanks
    use LWP::UserAgent;
    use HTTP::Request;

    $agent            = new LWP::UserAgent;
    $agent->{'agent'} = 'LinkBank Validator 0.9';
    $agent->{'from'}  = $admin_address;
    
    #getting the address is up to you, but here we pretend to untaint
    #it
    $address     =~ m|(http://.*)|i;

    my $request  = new HTTP::Request 'HEAD', $1;

    my $response = $agent->request($request);

    #here is where we find out if the resource is there
    my $status   = $response->code  ? $response->code : 'NULL';

    #the rest is up to you
    __END__

2. play with sockets.  open a connection to the host on port 80, send
an HTTP HEAD request, then read the response.  parse the first line of
the response (the HTTP status line) to get the response code.  somewhere
on computerdog.com there are snippets for each section of this, since this
is what HTTPeek does.  it's not for the timid though :)


good luck :)

-- 
brian d foy                                 <http://computerdog.com>
#!/usr/bin/perl
$_=q|osyrNewkecnaYhe.mlorsePptMskurj|;s;[NY.PM]; ;g;local$\=
qq$\n$;@pm=split//;while($NY=pop @pm){$pm.=$NY;$ny.=pop @pm}
$pm=join'',reverse($ny,$pm);open(NY,'>&STDOUT');print NY $pm


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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 V8 Issue 1161
**************************************

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