[13912] in Perl-Users-Digest

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

No subject found in mail header

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 10 17:47:51 1999

Date: Mon, 8 Nov 1999 12:28:07 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <942092887-v9-i1308@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 8 Nov 1999     Volume: 9 Number: 1308

Today's topics:
        Need Doco on Win32::NetResource for addConnection examp <alister2NOalSPAM@csc.co.nz.invalid>
    Re: Need Doco on Win32::NetResource for addConnection e <carvdawg@patriot.net>
        need help pooh23@my-deja.com
    Re: need help <james_peregrino@harvard.edu>
    Re: need help (Kragen Sitaker)
    Re: need help pooh23@my-deja.com
    Re: need help pooh23@my-deja.com
    Re: need my program to interface with Dictionary and Th <rootbeer@redcat.com>
        New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
        newbi: system call find, grep <richardsen@zweitwerk.com>
    Re: newbi: system call find, grep (Abigail)
    Re: newbi: system call find, grep <rhomberg@ife.ee.ethz.ch>
    Re: newbi: system call find, grep <gellyfish@gellyfish.com>
    Re: newbi: system call find, grep (Kragen Sitaker)
        Newbie help w/ Relative Path Please <keithp@execpc.com>
    Re: Newbie help w/ Relative Path Please <nomail@nomail.com>
    Re: Newbie help w/ Relative Path Please <keithp@execpc.com>
    Re: Newbie help w/ Relative Path Please <gellyfish@gellyfish.com>
        Newbie help with gethostbyaddr() please <keithp@execpc.com>
    Re: Newbie help with gethostbyaddr() please <flavell@a5.ph.gla.ac.uk>
    Re: Newbie help with gethostbyaddr() please (M.J.T. Guy)
    Re: Newbie help with gethostbyaddr() please (Kragen Sitaker)
    Re: Newbie help <lr@hpl.hp.com>
    Re: Newbie Help <gellyfish@gellyfish.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sun, 07 Nov 1999 18:43:07 -0800
From: Aaron Lister <alister2NOalSPAM@csc.co.nz.invalid>
Subject: Need Doco on Win32::NetResource for addConnection example
Message-Id: <0221c012.f04e9e24@usw-ex0102-014.remarq.com>

I am trying to do a NET USE or similar on WINNT.  I believe that the
Win32::NetResource module is the one I need, but the doco that comes
with it is very vague and I can't work out how to use the addConnection
Function.

Can anyone please help

Thanks

Aaron Lister


* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



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

Date: Mon, 08 Nov 1999 06:29:23 -0500
From: "Harlan Carvey, CISSP" <carvdawg@patriot.net>
Subject: Re: Need Doco on Win32::NetResource for addConnection example
Message-Id: <3826B413.F9B1ED05@patriot.net>

Use Win32::Lanman instead..
The docs are in the .pm file...

> I am trying to do a NET USE or similar on WINNT.  I believe that the
> Win32::NetResource module is the one I need, but the doco that comes
> with it is very vague and I can't work out how to use the addConnection
> Function.



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

Date: Fri, 05 Nov 1999 14:46:58 GMT
From: pooh23@my-deja.com
Subject: need help
Message-Id: <7vuqkm$nli$1@nnrp1.deja.com>

Hello,
I have a perl script that is not working.  I have a webpage with a drop
down box.  Based on what the user selects from the drop down box, it
goes to my perl script to send back a page. This is what the code look
like:   UW PICO(tm) 3.5                File: first.cgi

#!/user/bin/perl

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

print "Location: http://www.uwex.edu/ces/shwec\n\n";

#conditions
$varname = value;

@urls = (
"http://www.uwex.edu/ces/shwec/select.htm",
"http://www.uwex.edu/ces/shwec/annis.htm",
"http://www.uwex.edu/ces/shwec/bailey.htm",
"http://www.uwex.edu/ces/shwec/blewett.htm",
"http://www.uwex.edu/ces/shwec/brachman.htm",
"http://www.uwex.edu/ces/shwec/grote.htm",
"http://www.uwex.edu/ces/shwec/gruder.htm",
"http://www.uwex.edu/ces/shwec/katers.htm",
"http://www.uwex.edu/ces/shwec/kohrell.htm",   UW PICO(tm)
3.5                File: first.cgi

"http://www.uwex.edu/ces/shwec/katers.htm",
"http://www.uwex.edu/ces/shwec/kohrell.htm",
"http://www.uwex.edu/ces/shwec/liebl.htm",
"http://www.uwex.edu/ces/shwec/pferdehirt.htm",
"http://www.uwex.edu/ces/shwec/west.htm"
);

if (($varname > -1) && ($varname <= $#urls)) {
print "Location: $urls[$varname]\n\n";}
else{
print "Location: /index.htm\n\n";
}

Thanks


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


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

Date: 05 Nov 1999 11:42:32 -0500
From: James Peregrino <james_peregrino@harvard.edu>
Subject: Re: need help
Message-Id: <x7n1ss3n5z.fsf@bert.dce.harvard.edu>

First of all "need help" is not the kind of Subject line is likely to get
help.  Every new post implies "need help".  A more appropriate one would
be "my CGI script won't redirect".  Anyway, let's proceed...

pooh23@my-deja.com writes:

> Hello,
> I have a perl script that is not working.  I have a webpage with a drop
> down box.  Based on what the user selects from the drop down box, it
> goes to my perl script to send back a page. This is what the code look
> like:
[screen copy foobage deleted]
> 
> #!/user/bin/perl

	1) You probably meant "/usr", not "/user".  So this script died
right here.
	2) use #!/usr/bin/perl -w
so you can get helpful error messages and warnings.


> 
> #print "Content-type:text/html\n\n";
> 
> print "Location: http://www.uwex.edu/ces/shwec\n\n";

	So this is a CGI which immediately redirects the user here.  Don't
understand why...

> 
> #conditions
> $varname = value;

	Is this psuedo-code?  What is the bareword 'value' ?  Is this something
that's supposed to come from your web page?  How are you reading it in?

> 
> @urls = (
> "http://www.uwex.edu/ces/shwec/select.htm",
> "http://www.uwex.edu/ces/shwec/annis.htm",
> "http://www.uwex.edu/ces/shwec/bailey.htm",
> "http://www.uwex.edu/ces/shwec/blewett.htm",
> "http://www.uwex.edu/ces/shwec/brachman.htm",
> "http://www.uwex.edu/ces/shwec/grote.htm",
> "http://www.uwex.edu/ces/shwec/gruder.htm",
> "http://www.uwex.edu/ces/shwec/katers.htm",
> "http://www.uwex.edu/ces/shwec/kohrell.htm",
[screen copy foobage]
> "http://www.uwex.edu/ces/shwec/katers.htm",
> "http://www.uwex.edu/ces/shwec/kohrell.htm",
> "http://www.uwex.edu/ces/shwec/liebl.htm",
> "http://www.uwex.edu/ces/shwec/pferdehirt.htm",
> "http://www.uwex.edu/ces/shwec/west.htm"
> );

	Use qw() instead and save your fingers from carpal tunnel and 
forgetting a " or a , which I'm sure happened... :-)

	@urls = qw(
		http://www.uwex.edu/ces/shwec/select.htm
		http://www.uwex.edu/ces/shwec/annis.htm
		http://www.uwex.edu/ces/shwec/bailey.htm
		http://www.uwex.edu/ces/shwec/blewett.htm
		);

> 
> if (($varname > -1) && ($varname <= $#urls)) {
> print "Location: $urls[$varname]\n\n";}
> else{
> print "Location: /index.htm\n\n";
> }

	Ugly, but workable, but what's a browser to do with that other
"Location:" up top?

-James
-- 
James Peregrino
Harvard Div. Continuing Education


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

Date: Sat, 06 Nov 1999 21:52:41 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: need help
Message-Id: <Jq1V3.48866$23.1858832@typ11.nn.bcandid.com>

In article <7vuqkm$nli$1@nnrp1.deja.com>,  <pooh23@my-deja.com> wrote:
>I have a perl script that is not working.  I have a webpage with a drop
>down box.  Based on what the user selects from the drop down box, it
>goes to my perl script to send back a page. This is what the code look
>like:   UW PICO(tm) 3.5                File: first.cgi

Hmm, perhaps you should print out the Emacs Quick Reference Card and
use Emacs.

>#!/user/bin/perl

That should probably be #!/usr/bin/perl -w.  If you use the wrong path,
it won't run at all.

>print "Location: http://www.uwex.edu/ces/shwec\n\n";

You're redirecting immediately.

>#conditions
>$varname = value;

What's "value"?

>@urls = (
>"http://www.uwex.edu/ces/shwec/select.htm",
>"http://www.uwex.edu/ces/shwec/annis.htm",
>"http://www.uwex.edu/ces/shwec/bailey.htm",
>"http://www.uwex.edu/ces/shwec/blewett.htm",
>"http://www.uwex.edu/ces/shwec/brachman.htm",
>"http://www.uwex.edu/ces/shwec/grote.htm",
>"http://www.uwex.edu/ces/shwec/gruder.htm",
>"http://www.uwex.edu/ces/shwec/katers.htm",
>"http://www.uwex.edu/ces/shwec/kohrell.htm",   
>"http://www.uwex.edu/ces/shwec/katers.htm",
>"http://www.uwex.edu/ces/shwec/kohrell.htm",
>"http://www.uwex.edu/ces/shwec/liebl.htm",
>"http://www.uwex.edu/ces/shwec/pferdehirt.htm",
>"http://www.uwex.edu/ces/shwec/west.htm"
>);

Maybe this should be:
my @urls = map {"http://www.uwex.edu/ces/shwec/$_.htm"} qw(select annis bailey
	blewett brachman grote gruder katers kohrell liebl pferdehirt
	west);
instead.  Much less likely to have typos there, and much easier to read.

>if (($varname > -1) && ($varname <= $#urls)) {
>print "Location: $urls[$varname]\n\n";}

You're illegally printing text in the body of a response that is
already redirected to http://www.uwex.edu/ces/shwec.

-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Nov 02 1999
6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Mon, 08 Nov 1999 13:38:09 GMT
From: pooh23@my-deja.com
Subject: Re: need help
Message-Id: <806jo1$tvr$1@nnrp1.deja.com>

In article <Jq1V3.48866$23.1858832@typ11.nn.bcandid.com>,
  kragen@dnaco.net (Kragen Sitaker) wrote:
> In article <7vuqkm$nli$1@nnrp1.deja.com>,  <pooh23@my-deja.com> wrote:
> >I have a perl script that is not working.  I have a webpage with a
drop
> >down box.  Based on what the user selects from the drop down box, it
> >goes to my perl script to send back a page. This is what the code
look
> >like:   UW PICO(tm) 3.5                File: first.cgi
>
> Hmm, perhaps you should print out the Emacs Quick Reference Card and
> use Emacs.
>
> >#!/user/bin/perl
>
> That should probably be #!/usr/bin/perl -w.  If you use the wrong
path,
> it won't run at all.
>
> >print "Location: http://www.uwex.edu/ces/shwec\n\n";
>
> You're redirecting immediately.
>
> >#conditions
> >$varname = value;
>
> What's "value"?
>
> >@urls = (
> >"http://www.uwex.edu/ces/shwec/select.htm",
> >"http://www.uwex.edu/ces/shwec/annis.htm",
> >"http://www.uwex.edu/ces/shwec/bailey.htm",
> >"http://www.uwex.edu/ces/shwec/blewett.htm",
> >"http://www.uwex.edu/ces/shwec/brachman.htm",
> >"http://www.uwex.edu/ces/shwec/grote.htm",
> >"http://www.uwex.edu/ces/shwec/gruder.htm",
> >"http://www.uwex.edu/ces/shwec/katers.htm",
> >"http://www.uwex.edu/ces/shwec/kohrell.htm",
> >"http://www.uwex.edu/ces/shwec/katers.htm",
> >"http://www.uwex.edu/ces/shwec/kohrell.htm",
> >"http://www.uwex.edu/ces/shwec/liebl.htm",
> >"http://www.uwex.edu/ces/shwec/pferdehirt.htm",
> >"http://www.uwex.edu/ces/shwec/west.htm"
> >);
>
> Maybe this should be:
> my @urls = map {"http://www.uwex.edu/ces/shwec/$_.htm"} qw(select
annis bailey
> 	blewett brachman grote gruder katers kohrell liebl pferdehirt
> 	west);
> instead.  Much less likely to have typos there, and much easier to
read.
>
> >if (($varname > -1) && ($varname <= $#urls)) {
> >print "Location: $urls[$varname]\n\n";}
>
> You're illegally printing text in the body of a response that is
> already redirected to http://www.uwex.edu/ces/shwec.
>
> --
> <kragen@pobox.com>       Kragen Sitaker
<http://www.pobox.com/~kragen/>
> Tue Nov 02 1999
> 6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
> <URL:http://www.pobox.com/~kragen/bubble.html>
>

Value is the number assigned to the option selected in the drop down
box.  IF the user selects annis, annis has the value of one.  I didn't
mean to redirect at the top of the page.  Someone told me to use the
location header rather then the content header.

Thanks


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


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

Date: Mon, 08 Nov 1999 13:35:30 GMT
From: pooh23@my-deja.com
Subject: Re: need help
Message-Id: <806jj2$tul$1@nnrp1.deja.com>

In article <x7n1ss3n5z.fsf@bert.dce.harvard.edu>,
  James Peregrino <james_peregrino@harvard.edu> wrote:
> First of all "need help" is not the kind of Subject line is likely to
get
> help.  Every new post implies "need help".  A more appropriate one
would
> be "my CGI script won't redirect".  Anyway, let's proceed...
>
> pooh23@my-deja.com writes:
>
> > Hello,
> > I have a perl script that is not working.  I have a webpage with a
drop
> > down box.  Based on what the user selects from the drop down box, it
> > goes to my perl script to send back a page. This is what the code
look
> > like:
> [screen copy foobage deleted]
> >
> > #!/user/bin/perl
>
> 	1) You probably meant "/usr", not "/user".  So this script died
> right here.
> 	2) use #!/usr/bin/perl -w
> so you can get helpful error messages and warnings.
>
> >
> > #print "Content-type:text/html\n\n";
> >
> > print "Location: http://www.uwex.edu/ces/shwec\n\n";
>
> 	So this is a CGI which immediately redirects the user here.
Don't
> understand why...
>
> >
> > #conditions
> > $varname = value;
>
> 	Is this psuedo-code?  What is the bareword 'value' ?  Is this
something
> that's supposed to come from your web page?  How are you reading it
in?
>
> >
> > @urls = (
> > "http://www.uwex.edu/ces/shwec/select.htm",
> > "http://www.uwex.edu/ces/shwec/annis.htm",
> > "http://www.uwex.edu/ces/shwec/bailey.htm",
> > "http://www.uwex.edu/ces/shwec/blewett.htm",
> > "http://www.uwex.edu/ces/shwec/brachman.htm",
> > "http://www.uwex.edu/ces/shwec/grote.htm",
> > "http://www.uwex.edu/ces/shwec/gruder.htm",
> > "http://www.uwex.edu/ces/shwec/katers.htm",
> > "http://www.uwex.edu/ces/shwec/kohrell.htm",
> [screen copy foobage]
> > "http://www.uwex.edu/ces/shwec/katers.htm",
> > "http://www.uwex.edu/ces/shwec/kohrell.htm",
> > "http://www.uwex.edu/ces/shwec/liebl.htm",
> > "http://www.uwex.edu/ces/shwec/pferdehirt.htm",
> > "http://www.uwex.edu/ces/shwec/west.htm"
> > );
>
> 	Use qw() instead and save your fingers from carpal tunnel and
> forgetting a " or a , which I'm sure happened... :-)
>
> 	@urls = qw(
> 		http://www.uwex.edu/ces/shwec/select.htm
> 		http://www.uwex.edu/ces/shwec/annis.htm
> 		http://www.uwex.edu/ces/shwec/bailey.htm
> 		http://www.uwex.edu/ces/shwec/blewett.htm
> 		);
>
> >
> > if (($varname > -1) && ($varname <= $#urls)) {
> > print "Location: $urls[$varname]\n\n";}
> > else{
> > print "Location: /index.htm\n\n";
> > }
>
> 	Ugly, but workable, but what's a browser to do with that other
> "Location:" up top?
>
> -James
> --
> James Peregrino
> Harvard Div. Continuing Education


Value is the value of the selection selected from the drop down box.
If a user selects annis, the value of annis is 1.  I didn't mean to
redirect at the top of the page.  Someone told me I should use a
location header rather then content header.

Thanks
>


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


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

Date: Fri, 5 Nov 1999 09:54:35 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: need my program to interface with Dictionary and Thesaurus
Message-Id: <Pine.GSO.4.10.9911050952300.29670-100000@user2.teleport.com>

On Thu, 4 Nov 1999, Kimbrough Gray wrote:

> I am writing a translation program in perl.  I need to interface with a
> Dictionary and a Thesaurus.  I know there a web sites like
> http://www.thesaurus.com/ which give information.
> I do not know how to have a program utilize these sites.

Maybe you want LWP from CPAN.

> First is there a Dictionary or Thesaurus in the format of a text file
> somewhere.

Yes. But that's not a Perl question, is it? :-)

Try searching your favorite software archives.

> Second I know there are programs like "dict" in Unix.  This program used
> to be on the UNIX system I have access to at school.  Now it is gone.
> Does anyone know of any machines that I could gain access to with a
> dict like program or a thesaurus program.

Try searching on Yahoo or your favorite web search engine.

> Finally does anyone know of a way by which a perl program can go to
> a web page fill out a form, press a submit button and then save the
> results.

Yes; use LWP from CPAN. 

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 8 Nov 1999 15:20:24 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <806pno$2os$2@info2.uah.edu>

Following is a summary of articles from new posters spanning a 7 day
period, beginning at 01 Nov 1999 15:24:02 GMT and ending at
08 Nov 1999 07:54:22 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" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 1999 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Totals
======

Posters:  209 (45.1% of all posters)
Articles: 299 (17.3% of all articles)
Volume generated: 502.9 kb (15.8% of total volume)
    - headers:    225.0 kb (4,600 lines)
    - bodies:     274.2 kb (9,062 lines)
    - original:   190.7 kb (6,548 lines)
    - signatures: 3.5 kb (93 lines)

Original Content Rating: 0.695

Averages
========

Posts per poster: 1.4
    median: 1 post
    mode:   1 post - 159 posters
    s:      2.8 posts
Message size: 1722.2 bytes
    - header:     770.4 bytes (15.4 lines)
    - body:       938.9 bytes (30.3 lines)
    - original:   653.0 bytes (21.9 lines)
    - signature:  11.9 bytes (0.3 lines)

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

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

    8    16.3 (  5.9/ 10.4/  3.0)  raju_k@iname.com
    7    13.1 (  6.0/  7.1/  5.2)  A.Flavell@physics.gla.ac.uk
    5    12.3 (  4.2/  8.1/  4.6)  dolphinride@usa.net
    5     9.1 (  4.3/  4.8/  1.4)  "Laval Desbiens" <goya@saglac.qc.ca>
    4     7.0 (  2.9/  4.1/  1.9)  mehkriakram@my-deja.com
    4     4.3 (  2.7/  1.6/  1.3)  crackbaby1@my-deja.com
    4     6.0 (  3.9/  1.5/  1.4)  Re'em Bar <reembar@hotmail.com>
    4     6.5 (  3.6/  2.5/  1.6)  simon@brecon.co.uk
    4     5.0 (  3.2/  1.8/  1.1)  BlastMaster <jhelgesen@my-deja.com>
    4     5.3 (  2.9/  2.4/  1.8)  jomagam@yahoo.com

These posters accounted for 2.8% of all articles.

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

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

  16.7 (  2.2/ 14.4/ 14.4)      3  ajmayo@my-deja.com
  16.3 (  5.9/ 10.4/  3.0)      8  raju_k@iname.com
  14.2 (  1.7/ 12.6/ 10.9)      2  010101@technologist.com
  13.1 (  6.0/  7.1/  5.2)      7  A.Flavell@physics.gla.ac.uk
  12.3 (  4.2/  8.1/  4.6)      5  dolphinride@usa.net
   9.5 (  2.3/  7.2/  3.3)      3  johnsteele@my-deja.com
   9.1 (  4.3/  4.8/  1.4)      5  "Laval Desbiens" <goya@saglac.qc.ca>
   8.5 (  0.9/  7.5/  6.3)      1  "Chris" <chris@chrismail.connectfree.co.uk>
   8.2 (  2.2/  6.0/  1.4)      3  Mohammad Akram Ali Mehkri <mehkri@yahoo.com>
   7.0 (  2.9/  4.1/  1.9)      4  mehkriakram@my-deja.com

These posters accounted for 3.6% of the total volume.

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

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

1.000  (  1.2 /  1.2)      3  "Peter Steele" <psteele@opticalnetworks.com>
1.000  ( 14.4 / 14.4)      3  ajmayo@my-deja.com
0.976  (  2.8 /  2.8)      3  pooh23@my-deja.com
0.931  (  1.4 /  1.5)      4  Re'em Bar <reembar@hotmail.com>
0.802  (  1.4 /  1.8)      3  "J.Z. Brody" <NOSPAMbubba@titan.ndhm.gtegsc.com>
0.801  (  3.1 /  3.9)      3  Kat <klessa@airmail.net>
0.799  (  1.3 /  1.6)      4  crackbaby1@my-deja.com
0.748  (  1.8 /  2.4)      4  jomagam@yahoo.com
0.739  (  5.2 /  7.1)      7  A.Flavell@physics.gla.ac.uk
0.665  (  1.6 /  2.5)      4  simon@brecon.co.uk

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

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

0.567  (  4.6 /  8.1)      5  dolphinride@usa.net
0.545  (  1.5 /  2.8)      3  kb9nvh@my-deja.com
0.513  (  1.6 /  3.2)      3  "Chris Beels" <chris.beels@riskmetrics.com>
0.491  (  1.3 /  2.6)      3  patelni101480@my-deja.com
0.463  (  1.9 /  4.1)      4  mehkriakram@my-deja.com
0.456  (  3.3 /  7.2)      3  johnsteele@my-deja.com
0.351  (  0.7 /  1.9)      3  "Baris Sumengen" <sumengen@iplab.ece.ucsb.edu>
0.299  (  1.4 /  4.8)      5  "Laval Desbiens" <goya@saglac.qc.ca>
0.289  (  3.0 / 10.4)      8  raju_k@iname.com
0.224  (  1.4 /  6.0)      3  Mohammad Akram Ali Mehkri <mehkri@yahoo.com>

21 posters (10%) had at least three posts.


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

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

       9  dolphinride@usa.net
       6  "Wai Wu" <waikwu@redconnect.net>
       5  nik@removethis.sinesurf.co.nz (Nik Smiğr Warrensson)
       5  Rev . Meowatilla Al' Rashad <meowatilla@usenet-performance-art.org>
       5  "H.A." <Hanny@Yours.Com>
       3  Alexandre Naressi <anaressi@rz.uni-leipzig.de>
       3  "Jerry P" <bismail@bisusa.com>
       3  "Mohan Sakhrani" <mssakhrani@ucdavis.edu>
       3  "Raetin Blace" <Xu_ome@Xhotmail.comXremoveus.comma>
       3  cha0tica@mindspring.com


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

Date: Mon, 8 Nov 1999 13:23:14 +0100
From: "Soenke Richardsen" <richardsen@zweitwerk.com>
Subject: newbi: system call find, grep
Message-Id: <806fca$3mi@desire.lavielle.com>

SGksDQoNCkkgd2FudGVkIHRvIHNlYXJjaCBmaWxlcyBpbiBhIGRpcmVjdG9yeSB0cmVlIGZvciBj
b250ZW50IHN0b3JlZCBpbiAkc3VjaC4NClRoZSBmaWxlIGV4dGVuc2lvbiBpcyBzdG9yZWQgaW4g
JGV4dC4NCg0KVGhlIGZvbGxvd2luZyBzdGF0ZW1lbnQgd29ya3MgZmluZSBvbiB0aGUgVW5peCBj
b21tYW5kIGxpbmUgKFN1biBTb2xhcmlzDQoyLjYpOg0KZmluZCAuIC1leGVjIGdyZXAgLWlsICRz
dWNoIHt9IFw7IHwgZ3JlcCAkZXh0DQoNCklmIEkgdHJ5IHRvIGV4ZWN1dGUgdGhlIGNvbW1hbmQg
ZnJvbSBhIHBlcmwgc2NyaXB0IChJIHdhbnQgdG8gc2hvdyB0aGUNCnJlc3VsdCBhcyBhbiBIVE1M
LUxpc3QpLCBJIGdldCBhbiBpbmNvbXBsZXRlIHN0YXRlbWVudCBlcnJvcjoNCg0KJGV4dD0nKi5o
dG0nOw0KJHN1Y2g9J3RydW5jYXRlJzsNCg0KIyBsaW5lIGNhdXNpbmcgZXJyb3I6DQokbHMgPSBg
ZmluZCAuIC1leGVjIGdyZXAgLWlsICRzdWNoIHt9IFw7IHwgZ3JlcCAkZXh0YDsNCg0KQ2FuIGFu
eW9uZSBoZWxwPw0KDQpUaGFua3MhDQoNClP2bmtlDQoNCg0KDQoNCg==



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

Date: 8 Nov 1999 07:23:03 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: newbi: system call find, grep
Message-Id: <slrn82djsj.rem.abigail@alexandra.delanet.com>

Soenke Richardsen (richardsen@zweitwerk.com) wrote on MMCCLX September
MCMXCIII in <URL:news:806fca$3mi@desire.lavielle.com>:
`` SGksDQoNCkkgd2FudGVkIHRvIHNlYXJjaCBmaWxlcyBpbiBhIGRpcmVjdG9yeSB0cmVlIGZvciBj
`` b250ZW50IHN0b3JlZCBpbiAkc3VjaC4NClRoZSBmaWxlIGV4dGVuc2lvbiBpcyBzdG9yZWQgaW4g
`` JGV4dC4NCg0KVGhlIGZvbGxvd2luZyBzdGF0ZW1lbnQgd29ya3MgZmluZSBvbiB0aGUgVW5peCBj
`` b21tYW5kIGxpbmUgKFN1biBTb2xhcmlzDQoyLjYpOg0KZmluZCAuIC1leGVjIGdyZXAgLWlsICRz
`` dWNoIHt9IFw7IHwgZ3JlcCAkZXh0DQoNCklmIEkgdHJ5IHRvIGV4ZWN1dGUgdGhlIGNvbW1hbmQg
`` ZnJvbSBhIHBlcmwgc2NyaXB0IChJIHdhbnQgdG8gc2hvdyB0aGUNCnJlc3VsdCBhcyBhbiBIVE1M
`` LUxpc3QpLCBJIGdldCBhbiBpbmNvbXBsZXRlIHN0YXRlbWVudCBlcnJvcjoNCg0KJGV4dD0nKi5o
`` dG0nOw0KJHN1Y2g9J3RydW5jYXRlJzsNCg0KIyBsaW5lIGNhdXNpbmcgZXJyb3I6DQokbHMgPSBg
`` ZmluZCAuIC1leGVjIGdyZXAgLWlsICRzdWNoIHt9IFw7IHwgZ3JlcCAkZXh0YDsNCg0KQ2FuIGFu
`` eW9uZSBoZWxwPw0KDQpUaGFua3MhDQoNClP2bmtlDQoNCg0KDQoNCg==


Well, you have a syntax error at the end. If you remove the '==', your
program cleanly compiles. Perhaps your news reader inserted that by
accident. I assume it should be omitted.

However, it seems to use some packages that aren't there:

Can't locate object method
"ZmluZCAuIC1leGVjIGdyZXAgLWlsICRzdWNoIHt9IFw7IHwgZ3JlcCAkZXh0YDsNCg0KQ2FuIGFu"
via package "eW9uZSBoZWxwPw0KDQpUaGFua3MhDQoNClP2bmtlDQoNCg0KDQoNCg"


Perhaps you need -MeW9uZSBoZWxwPw0KDQpUaGFua3MhDQoNClP2bmtlDQoNCg0KDQoNCg ?

HTH. HAND.


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: Mon, 08 Nov 1999 14:44:18 +0100
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: newbi: system call find, grep
Message-Id: <3826D3B2.8526BD00@ife.ee.ethz.ch>

Soenke Richardsen wrote:
> 
> Hi,
> 
> I wanted to search files in a directory tree for content stored in $such.
> The file extension is stored in $ext.
> 
> The following statement works fine on the Unix command line (Sun Solaris
> 2.6):
> find . -exec grep -il $such {} \; | grep $ext

Oh ugliness... 

First, -exec is evil. it starts a new process for every file.

Second, grep $ext finds those filenames that have a literal asterisk *, 
        followed by any letter followed by 'htm'. (on Solaris 2.5)
	I fear your definition of 'works fine' is not the same as mine

Third, that grep for extensions is what find is good at. Try this:

find . -name '*.htm'|xargs grep -il truncate
using the right tool for the right job.

This should go easily into a list:

#untested
my @list = qx{find . -name'*.$ext'|xargs grep -il $such};
#end untested

And find -exec is evil.

- Alex


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

Date: 8 Nov 1999 14:27:25 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: newbi: system call find, grep
Message-Id: <3826ddcd_1@newsread3.dircon.co.uk>

Soenke Richardsen <richardsen@zweitwerk.com> wrote:
> Hi,
> 
> I wanted to search files in a directory tree for content stored in $such.
> The file extension is stored in $ext.
> 
> The following statement works fine on the Unix command line (Sun Solaris
> 2.6):
> find . -exec grep -il $such {} \; | grep $ext
> 
> If I try to execute the command from a perl script (I want to show the
> result as an HTML-List), I get an incomplete statement error:
> 

Why dont you use File::Find instead of the external find - you can use
find2perl to convert the existing find command ...

/J\
-- 
"Nourishes at the root and penetrates right to the tip" - Pantene
Advertisement


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

Date: Mon, 08 Nov 1999 18:32:17 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: newbi: system call find, grep
Message-Id: <RGEV3.57876$23.2177118@typ11.nn.bcandid.com>

In article <806fca$3mi@desire.lavielle.com>,
Soenke Richardsen <richardsen@zweitwerk.com> wrote:
>$ext='*.htm';^M
>$such='truncate';^M
>^M
># line causing error:^M
>$ls = `find . -exec grep -il $such {} \; | grep $ext`;^M

Yer gonna have to quote $ext, or your shell will expand it.  Also,
don't you think you should use -name instead of grep?
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Nov 02 1999
6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Mon, 08 Nov 1999 09:06:44 -0600
From: Keith Parkansky <keithp@execpc.com>
Subject: Newbie help w/ Relative Path Please
Message-Id: <3826e3dc$0$60257@news.execpc.com>

I'm working on my first Perl script.
[Egads, another hit counter !]

In my hit counter script I want to use 
graphics digits.  I have the following
directory structure.

www.mydomain.com ---- cg-bin ---- logger
                 |
                 |
                  --- digits

How would I specify a relative path back
up to my WWW root to access the graphics
files in the 'digits' directory instead
of putting in the full absolute path of
  'http://www.mydomain.com/digits/'  ?


-- 
Keith Parkansky
keithp@execpc.com
http://www.execpc.com/~keithp
http://www.squawkware.com
http://www.goingtovegas.com
Editor, Open Directory Project category
 Regional:US:Nevada:Localities:Las Vegas:Tourism


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

Date: Mon, 08 Nov 1999 15:42:16 +0000
From: jb <nomail@nomail.com>
Subject: Re: Newbie help w/ Relative Path Please
Message-Id: <3826EF58.5C81F94@nomail.com>

Hmm.... well... a '/' would do... i.e. <img src="/digits/1.gif">


Keith Parkansky wrote:

> How would I specify a relative path back
> up to my WWW root to access the graphics
> files in the 'digits' directory instead
> of putting in the full absolute path of
>   'http://www.mydomain.com/digits/'  ?



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

Date: Mon, 08 Nov 1999 11:08:20 -0600
From: Keith Parkansky <keithp@execpc.com>
Subject: Re: Newbie help w/ Relative Path Please
Message-Id: <3827005f$0$91320@news.execpc.com>

jb wrote:
> 
> Hmm.... well... a '/' would do... i.e. <img src="/digits/1.gif">

Thanks !  
I wasn't sure if using just a slash 
would be relative to the root or to
the current directory (the directory
the script is runnning from).

Thanks again.
-- 
Keith Parkansky
keithp@execpc.com
http://www.execpc.com/~keithp
http://www.squawkware.com
http://www.goingtovegas.com
Editor, Open Directory Project category
 Regional:US:Nevada:Localities:Las Vegas:Tourism


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

Date: 8 Nov 1999 17:17:20 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Newbie help w/ Relative Path Please
Message-Id: <382705a0_2@newsread3.dircon.co.uk>

Keith Parkansky <keithp@execpc.com> wrote:
> jb wrote:
>> 
>> Hmm.... well... a '/' would do... i.e. <img src="/digits/1.gif">
> 
> Thanks !  
> I wasn't sure if using just a slash 
> would be relative to the root or to
> the current directory (the directory
> the script is runnning from).
> 

Yeah but if it begins with a slash it aint relative ...

/J\
-- 
"We've even been asked to review a luxury hotel. I can't think why" -
Neil Hamilton


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

Date: Fri, 05 Nov 1999 08:34:08 -0600
From: Keith Parkansky <keithp@execpc.com>
Subject: Newbie help with gethostbyaddr() please
Message-Id: <3822e7cb$0$29635@news.execpc.com>

I'm running a logger script that I got
off of the Web.  I'm trying to figure
out Perl by looking at different scripts
and reading Web pages.  However, this
logger script has really got me baffled.
I've got most of it figured out but I'm
stuck on this part:

$ip = $ENV{'REMOTE_ADDR'};
@digits = split (/\./, $ip);
$address = pack ("C4", @digits);
$host = gethostbyaddr ($address, 2);

What is the "2" as the second
argument in the gethostbyaddr()
function ?  Everything I've seen
says that gethostbyaddr, can have
three arguments; addr, length, type
but given that this is for an IP
address I doubt the "2" is the length
and I can't find anything anywhere
about the "type" argument.

Could someone please tell me what this
"2" does or where it came from ?

Thanks!

-- 
Keith Parkansky
keithp@execpc.com
http://www.execpc.com/~keithp
http://www.squawkware.com
http://www.goingtovegas.com
Editor, Open Directory Project category
Regional:US:Nevada:Localities:Las Vegas:Tourism


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

Date: Fri, 5 Nov 1999 14:44:57 +0000
From: "Alan J. Flavell" <flavell@a5.ph.gla.ac.uk>
Subject: Re: Newbie help with gethostbyaddr() please
Message-Id: <Pine.OSF.4.20.9911051434570.15235-100000@a5.ph.gla.ac.uk>

On Fri, 5 Nov 1999, Keith Parkansky wrote:

> @digits = split (/\./, $ip);
> $address = pack ("C4", @digits);
> $host = gethostbyaddr ($address, 2);

Oh dear, yes, I used to do that too, then I graduated to

use Socket;
[...]
    $host = gethostbyaddr(pack('C4',split(/\./,$addr)),'AF_INET');

before making further progress.

> What is the "2" as the second
> argument in the gethostbyaddr()
> function ? 

It's the numerical value of AF_INET (IP address family).

A more transparent way to code it would be

use Socket;
[...]
    $hostname = gethostbyaddr(inet_aton($addr), AF_INET);

but you'd probably want to check that the lookup had been
successful before actually doing anything with it!

good luck



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

Date: 6 Nov 1999 17:52:18 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Newbie help with gethostbyaddr() please
Message-Id: <801psi$8pg$1@pegasus.csx.cam.ac.uk>

Alan J. Flavell <A.Flavell@physics.gla.ac.uk> wrote:
>
>use Socket;
>[...]
>    $host = gethostbyaddr(pack('C4',split(/\./,$addr)),'AF_INET');
                                                        ^       ^

Cut those quotes.   (As you did the second time.)


MIke Guy


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

Date: Sat, 06 Nov 1999 21:47:11 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Newbie help with gethostbyaddr() please
Message-Id: <zl1V3.48859$23.1857931@typ11.nn.bcandid.com>

In article <3822e7cb$0$29635@news.execpc.com>,
Keith Parkansky  <keithp@execpc.com> wrote:
>$ip = $ENV{'REMOTE_ADDR'};
>@digits = split (/\./, $ip);
>$address = pack ("C4", @digits);
>$host = gethostbyaddr ($address, 2);
>
>What is the "2" as the second
>argument in the gethostbyaddr()
>function ?  Everything I've seen
>says that gethostbyaddr, can have
>three arguments; addr, length, type

You must have been reading the documentation for C gethostbyaddr().
perldoc -f gethostbyaddr says:
=item gethostbyaddr ADDR,ADDRTYPE
 . . . 

In Perl, you don't usually have to specify the lengths of byte-strings
you're passing to functions, because perl already knows how long the
strings are.

>but given that this is for an IP
>address I doubt the "2" is the length

It's AF_INET on most systems.  use Socket and just say AF_INET instead.
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Nov 02 1999
6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Fri, 5 Nov 1999 07:02:40 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Newbie help
Message-Id: <MPG.128c9163b31078c898a1b5@nntp.hpl.hp.com>

In article <7vum1a$k1l$1@nnrp1.deja.com> on Fri, 05 Nov 1999 13:28:12 
GMT, kb9nvh@my-deja.com <kb9nvh@my-deja.com> says...
> Thanks, hey, this is a question about that construct in your example.
> What exactly does that do and how does it work?
> print <<"EOF";
> <....>
> EOF
> 
> I have yet to find it discussed in the text I bought even though I have
> see it used and have used it.  Apparently it pipes to the print command
> everything between the EOF boundries.  Can this be used for other
> commands?

It has nothing to do specifically with 'print()'.  It is simply a 
variable whose value is a quoted string.

For details, search for 'here-doc' in perldata.  (It's not clear how one 
is supposed to know that without having previously learned about shell 
languages.)

<SNIP> of quoted material in the wrong place.

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


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

Date: 6 Nov 1999 14:02:17 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Newbie Help
Message-Id: <801cd9$aej$1@gellyfish.btinternet.com>

On 04 Nov 1999 01:13:23 GMT Neo Sevon wrote:
> Hello. I am a total newbie to programming, but I am really interested in
> learning Perl. Is there anywhere online (Free, preferably) where I could learn
> it or at least get some tutorials or something? Please email NeoSevon@aol.com
> if you can help.

You might want to start at <http://www.perl.com> and with the documentation 
that comes with Perl.

> ---
> 

That is supposed to two dashes followed by a space followed by a newline.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

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


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


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