[7486] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1112 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 1 22:17:15 1997

Date: Wed, 1 Oct 97 19:00:22 -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, 1 Oct 1997     Volume: 8 Number: 1112

Today's topics:
     Re: accessing permissions (rwx) (Martien Verbruggen)
     Re: Answer Found Sort of (Testing for non existance) (Grey Cloak)
     Re: Bigtime Newbie needs a teeny bit of help . . . (Martien Verbruggen)
     Building perl 5.004_01 <lsheldon@creighton.edu>
     Re: Can't debug a perl script. (Martien Verbruggen)
     Re: Control headers for NNTP (Martien Verbruggen)
     Re: Generating bit patterns "00000000" .. "11111111" <rootbeer@teleport.com>
     Re: Help: reformat variable (Martien Verbruggen)
     Re: how to write HTML form data to a text file??? <rootbeer@teleport.com>
     Re: line-by-line add to HTML-output (Martien Verbruggen)
     Re: MIME Header "Location:" (Martien Verbruggen)
     Re: MIME Header "Location:" (brian d foy)
     Re: NEWBIE: How  do you check for Non existance of a fi (Grey Cloak)
     Re: NEWBIE: How  do you check for Non existance of a fi (Martien Verbruggen)
     NT 4 and PERL <mrc@pressroom.com>
     Re: Parsing compressed text (Martien Verbruggen)
     Re: PERL and serial port <rootbeer@teleport.com>
     perl c-link indenter (root)
     Re: Perl Questions (Martien Verbruggen)
     regex problem <mav@radyn.com>
     Re: Traceroute, a perl version <rra@stanford.edu>
     Re: Xbase Module and Database Questions <e_bachmann@geocities.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 2 Oct 1997 00:10:15 GMT
From: mgjv@mali.comdyn.com.au (Martien Verbruggen)
Subject: Re: accessing permissions (rwx)
Message-Id: <60uop7$c5k$9@comdyn.comdyn.com.au>

In article <slrn634e86.e17.Tom.Grydeland@mitra.phys.uit.no>,
	Tom.Grydeland@phys.uit.no (Tom Grydeland) writes:
> draj@chronologic.com (Dhiraj Raj) writes:
>> > how do i access the permissions (rwx) of a file in perl
> 
> Martien Verbruggen <mgjv@mali.comdyn.com.au> wrote:
>> perldoc -f stat
> 
> And of course there's also the (shellish) file test operators,
> 
> perldoc -f -X

Yeah, but that only tells him if a certain specific mod is set, not
what all the mod settings are :). Some of the mods are not accessible
through -X..

-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | In a world without fences, who needs
Commercial Dynamics Pty. Ltd.       | Gates?
NSW, Australia                      | 


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

Date: 1 Oct 1997 23:05:10 GMT
From: spamtrap@greycloak.access.one.net (Grey Cloak)
Subject: Re: Answer Found Sort of (Testing for non existance)
Message-Id: <slrn635ml0.69v.spamtrap@greycloak.access.one.net>

On Wed, 01 Oct 1997 10:05:20 +0200,
Doug Seay cause to appear:
>[posted, and mailed]
>
>Grey Cloak wrote:
>> 
>> #File exist test
>> 
>> open(FILE1, $whatfile)  ||  die
>>         "[WARN] $whatfile from $who not found\n";
>> close;
>
>Please say it isn't so.  There is no need to go through the extra
>overhead of opening a file just to find out if it exists.  Read the

Not after tonight, just saved the followup to disk and will be editing. (Also
Noting for other stuff I have planned.

>are closing?  What sort of error messages did you get?  You are using
>"-w" and "use strict;" aren't you?

Close all open files, No error messages. I do have to read IRCii doc to solve 
a problem I have before calling the scipts. (non alpha numeric in nicks)

No, I wasn't using -w or strict. (Another session in man/perldoc)
I am teachig myself perl with out the money to buy the camel book, and library
don't have it. Learning by example of other scripts. (Basicually seeing 
something and looking it up to see why it done and what it does.)

Not the best way to learn, but the only one open at this moment. That and 
lurking in the group. Much the same way I learned Quickbasic. 

I tend to try and lookup info, sometime failing. Before I ask a question. 



>
>- doug


-- 
Grey Cloak

         ---------------------------------------------
  .###########.   Change spamtrap to grycloak, to email me.
 ##'___   ___`##   Wizard.FAQ v2.0 send blank Email to:
 ##  * > < *  ##    wizardfaq@greycloak.access.one.net     
 ### ) | | ( ###    For other documents served
 ###\_-===-_/###    Docslist@greycloak.access.one.net
   #  ~!!!~  #    

http://www.geocities.com/Area51/7614
http://w3.one.net/~grycloak/dreams/dream.htm


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

Date: 1 Oct 1997 23:49:07 GMT
From: mgjv@mali.comdyn.com.au (Martien Verbruggen)
Subject: Re: Bigtime Newbie needs a teeny bit of help . . .
Message-Id: <60unhj$c5k$5@comdyn.comdyn.com.au>

In article <3432815a.3413784@news.internex.net>,
	rama@rely.com (Rama Polefka) writes:
> i have a simple problem -
> i need to run a series of commands at specified intervals to trigger a
> mail flush.  the series of commands is as follows:
[snip]
> this needs to run on a NT box that is receiving mail from another mail

Doesn't NT come with some sort of crontab like scheduling thingie? I
wouldn't really want to write anything myself in perl, but would just
use that.
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | That's not a lie, it's a terminological
Commercial Dynamics Pty. Ltd.       | inexactitude.
NSW, Australia                      | 


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

Date: Wed, 1 Oct 1997 19:49:40 -0500
From: "L. F. Sheldon, Jr." <lsheldon@creighton.edu>
Subject: Building perl 5.004_01
Message-Id: <Pine.HPP.3.95.971001193902.25276A-100000@bluejay.creighton.edu>

Background:

I know nearly nothing about "C" and libraries and less about "perl".
I know enough about other unix stuff to hurt myself and others around me.
I _can_ follow instructions reasonably well, especially if they are as well
done as the ones with the "perl" distribution.

The problem:

"make test" (in the perl installation sequence) ends with this:
quote
Failed 1 test script out of 152, 96.71% okay.
   ### Since not all tests were successful, you may want to run some
   ### of them individually and examine any diagnostic messages they
   ### produce.  See the INSTALL document's section on "make test".
   ###
   ### Since most tests were successful, you have a good chance to
   ### get information with better granularity by running
   ###     ./perl harness
   ### in directory ./t.
u=0.75  s=0.83  cu=34.2  cs=17.59  scripts=147  tests=4151
*** Error exit code 1

Stop.
end quote

Earlier in the "test" ouput is:
quote
lib/ndbm..........ok
lib/odbm........../usr/lib/dld.sl: Unresolved symbol: _dbm_open (code)  from /usr/lib
/libdbm.1
FAILED on test 0
lib/opcode........ok
end quote

In the "make" output I noticed:
quote
	Making ODBM_File (dynamic)
Processing hints file hints/hpux.pl
Note (probably harmless): No library found for -lucb
Writing Makefile for ODBM_File
mkdir ../../lib/auto/ODBM_File
end quote

I suspect the "Note" line is in fact not "harmless", but I am helpless to 
figure out what to tell perl's "Configure" to solve the problem.

What breaks if I tell "Configure" to leave ODBM_File out of the build?

We have a copy of this level of perl on another machine with (apparently) the
same flaw, and perl _seems_ to be running OK.

The environment is HP 9000/800's of various flavors (instant case a D250/2)
running H-PUX 10.01 plus a zillion patches.

--
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
 .                                                                       .
- L. F. (Larry) Sheldon, Jr.                                            -
 . Unix Systems Administration                                           .
- Creighton University Computer Center-Old Gym                          -
 . 2500 California Plaza                                                 .
- Omaha, Nebraska, U.S.A.  68178       We are all faced with            -
 . lsheldon@creighton.edu                  great opportunities           .
- 402 280-2254 (work)                  brilliantly disguised as         -
 . 402 681-4726 (cellular)                 impossible situations.        .
- 402 332-4622 (residence)                                              -
 .                                           Bits and Pieces             .
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-



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

Date: 1 Oct 1997 23:33:50 GMT
From: mgjv@mali.comdyn.com.au (Martien Verbruggen)
Subject: Re: Can't debug a perl script.
Message-Id: <60umku$c5k$2@comdyn.comdyn.com.au>

In article <34322A19.41C6@ansf.alcatel.fr>,
	Pierre BERGDOLT <Pierre.Bergdolt@ansf.alcatel.fr> writes:
> Did anyone have an idea to help me so I can do debug on my perl scripts.
> For information I'm working under Digital Unix V3.2g.

Hello Pierre,

It migth be helpful if you sent the output from 

perl -V

here as well. That should tell us most things we need to know about
how your perl was compiled, and what version it is.
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | We are born naked, wet and hungry. Then
Commercial Dynamics Pty. Ltd.       | things get worse.
NSW, Australia                      | 


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

Date: 1 Oct 1997 23:37:22 GMT
From: mgjv@mali.comdyn.com.au (Martien Verbruggen)
Subject: Re: Control headers for NNTP
Message-Id: <60umri$c5k$3@comdyn.comdyn.com.au>

In article <34327d4d.71164609@news.xs4all.nl>,
	donovan@zaak.nl (Donovan Janus) writes:
> Does anyone has a list of control headers for in NNTP?

RFC 977

http://www.nexor.com/public/rfc/index/
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | That's not a lie, it's a terminological
Commercial Dynamics Pty. Ltd.       | inexactitude.
NSW, Australia                      | 


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

Date: Wed, 1 Oct 1997 16:01:34 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: "Lozano Mosterin, Jesus" <lozano@polar.etsiig.uniovi.es>
Subject: Re: Generating bit patterns "00000000" .. "11111111"
Message-Id: <Pine.GSO.3.96.971001153633.236N-100000@usertest.teleport.com>

On 1 Oct 1997, Lozano Mosterin, Jesus wrote:

> 	I like this, but in perl seems to run too slow

Maybe that's because you use too many subscripts. Real Perl programmers
don't use subscripts. :-)

> for (1..$ARGV[0]){ $b[$_]=0; }

Try this. (Even though it's not quite the same, it should be better. :-)

    @b = (0) x $ARGV[0];

>    for ($c=$ARGV[0];$c>=1;$c--){ print $b[$c]; }

Again, not quite the same:

    print join '', reverse @b;

But, for a quick-and-dirty technique similar to yours, I'd prefer to do
something like this. 

    $_ = '0' x $ARGV[0];
    die "Bad idea!" if length > 12;
    {
        print "$_\n";
        $_++;
        s/0(1*2)$/ 1 . 0 x length $1 /e;
        redo unless substr($_,-1) eq '2';
    }

Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: 1 Oct 1997 23:54:10 GMT
From: mgjv@mali.comdyn.com.au (Martien Verbruggen)
Subject: Re: Help: reformat variable
Message-Id: <60unr2$c5k$7@comdyn.comdyn.com.au>

In article <60tq10$aij@dailyplanet.wam.umd.edu>,
	losinp@wam.umd.edu (Peter Losin) writes:
[snip]
> routine that will format it so it's no more than (say) 50 characters wide.
> (I'm brand new to NT; what I need is something that works like fmt in
> Unix.)
[snip]
> My question: what does "Format" need to do?

call the wrap function in the Text::Wrap module

-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | In a world without fences, who needs
Commercial Dynamics Pty. Ltd.       | Gates?
NSW, Australia                      | 


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

Date: Wed, 1 Oct 1997 16:12:33 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: "M.J.T. Guy" <mjtg@cus.cam.ac.uk>
Subject: Re: how to write HTML form data to a text file???
Message-Id: <Pine.GSO.3.96.971001160426.236P-100000@usertest.teleport.com>

On 1 Oct 1997, M.J.T. Guy wrote:

> Tom Phoenix  <rootbeer@teleport.com> wrote:

> >On Thu, 25 Sep 1997, Ed.Q.Bridges wrote:
> >
> >>     &UnLock( DATAFILE );
> >>     close DATAFILE;
> >
> >Don't release a lock before closing the file unless you're an expert.
> 
> And if you were an expert, you wouldn't anyway.

It's advice along the lines of "burn before reading", "don't cut any wires
until the bomb has been disarmed", and "do not look directly into laser
beam with remaining eye". :-) 

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: 1 Oct 1997 23:51:46 GMT
From: mgjv@mali.comdyn.com.au (Martien Verbruggen)
Subject: Re: line-by-line add to HTML-output
Message-Id: <60unmi$c5k$6@comdyn.comdyn.com.au>

In article <01bccebe$bd71ef40$0100a8c0@o63hutef>,
	"Matthias Hellmund" <matthias.hellmund@nienburg-weser.de> writes:
> How can I program a script that outputs a frame (line by line) and after
> e.g. 20 lines erases the frame and then prints out some more lines?

Hi Matthias,

This is not a perl question. You might be better off asking a question
like this on one of the comp.infosystems.www.* groups (or something
like that). What you are looking for I suspent has something to do
with the Refresh HTTP header field, or nph server side push scripts...

-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | In a world without fences, who needs
Commercial Dynamics Pty. Ltd.       | Gates?
NSW, Australia                      | 


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

Date: 1 Oct 1997 23:27:32 GMT
From: mgjv@mali.comdyn.com.au (Martien Verbruggen)
Subject: Re: MIME Header "Location:"
Message-Id: <60um94$c5k$1@comdyn.comdyn.com.au>

In article <3432705C.9F87651E@mail.org.uk>,
	Russell Odom <russ@mail.org.uk> writes:
> 
> I think it this may be because some browsers don't recognise the
> 'Location:' header, they need 'URI:' (which is apparently the official
> header). Use the CGI module, it now produces both.

Off topic, and wrong information. If a browser doesn't recognise the
Location header field, and needs some made up URI header field
instead, it is not HTTP/1.0 or HTTP/1.1 compliant.

RFC 1945: Hypertext Transfer Protocol -- HTTP/1.0

10.11  Location

   The Location response-header field defines the exact location of the
   resource that was identified by the Request-URI. For 3xx responses,
   the location must indicate the server's preferred URL for automatic
   redirection to the resource. Only one absolute URL is allowed.

       Location       = "Location" ":" absoluteURI

   An example is

       Location: http://www.w3.org/hypertext/WWW/NewLocation.html

There is not even a URI: Header field in the HTTP/1.0 specification or
in the HTTP/1.1 specs (RFC 2068)

sorry for wasting bandwidth. felt I had to correct the mistake.
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | We are born naked, wet and hungry. Then
Commercial Dynamics Pty. Ltd.       | things get worse.
NSW, Australia                      | 


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

Date: Wed, 01 Oct 1997 20:04:12 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: MIME Header "Location:"
Message-Id: <comdog-ya02408000R0110972004120001@news.panix.com>

In article <60um94$c5k$1@comdyn.comdyn.com.au>, mgjv@mali.comdyn.com.au (Martien Verbruggen) wrote:

>In article <3432705C.9F87651E@mail.org.uk>,
>        Russell Odom <russ@mail.org.uk> writes:
>> 
>> I think it this may be because some browsers don't recognise the
>> 'Location:' header, they need 'URI:' (which is apparently the official
>> header). Use the CGI module, it now produces both.
>
>Off topic, and wrong information. If a browser doesn't recognise the
>Location header field, and needs some made up URI header field
>instead, it is not HTTP/1.0 or HTTP/1.1 compliant.

[snip section 10.11 of RFC 1945: Hypertext Transfer Protocol -- HTTP/1.0]

curiously, Russel can't be faulted for his information being that he
was quoting the CGI.pm pod (someone read the docs!):

     GENERATING A REDIRECTION INSTRUCTION

        print $query->redirect('http://somewhere.else/in/movie/land');

     redirects the browser elsewhere.  If you use redirection
     like this, you should not print out a header as well.  As of
     version 2.0, we produce both the unofficial Location: header
     and the official URI:  header.  This should satisfy most
     servers and browsers.


i'm still trying to figure out if this is a typo (should "official"
and "unofficial" be switched?) or if someone thinks this for a
reason. *shrug*

-- 
brian d foy                                  <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)*  <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: 1 Oct 1997 22:42:31 GMT
From: spamtrap@greycloak.access.one.net (Grey Cloak)
Subject: Re: NEWBIE: How  do you check for Non existance of a file.
Message-Id: <slrn635lah.69v.spamtrap@greycloak.access.one.net>

On Wed, 01 Oct 1997 09:56:57 +0200,
Doug Seay cause to appear:
>Martien Verbruggen wrote:
>> 



Thank to both of you, and the other. I didn't know of the existance of perlsyn.

-- 
Grey Cloak

         ---------------------------------------------
  .###########.   Change spamtrap to grycloak, to email me.
 ##'___   ___`##   Wizard.FAQ v2.0 send blank Email to:
 ##  * > < *  ##    wizardfaq@greycloak.access.one.net     
 ### ) | | ( ###    For other documents served
 ###\_-===-_/###    Docslist@greycloak.access.one.net
   #  ~!!!~  #    

http://www.geocities.com/Area51/7614
http://w3.one.net/~grycloak/dreams/dream.htm


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

Date: 2 Oct 1997 00:20:36 GMT
From: mgjv@mali.comdyn.com.au (Martien Verbruggen)
Subject: Re: NEWBIE: How  do you check for Non existance of a file.
Message-Id: <60upck$c5k$10@comdyn.comdyn.com.au>

In article <34320249.67800ADC@absyss.fr>,
	Doug Seay <seay@absyss.fr> writes:
>> > #if exist $whatfile ;
>> 
>>         if (-f $whatfile)
> 
> -f returns true if $whatfile is a normal file, false otherwise.  This
> "otherwise" includes it being a pipe, a socket, a directory, not
> existing at all or whatever.  For simple existance, use "-e".
> 
> In the case of ensuring that a .wav file is present (the original
> problem), -f should usually work, but it isn't correct for the more
> general problem.

Oops, you're right. I had just extrapolated his question about wavs, and
assumed that he only wanted a yes on it being a file..

-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | A Freudian slip is when you say one
Commercial Dynamics Pty. Ltd.       | thing but mean your mother.
NSW, Australia                      | 


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

Date: 2 Oct 1997 00:47:27 GMT
From: "Matt" <mrc@pressroom.com>
Subject: NT 4 and PERL
Message-Id: <01bccecd$0cad6900$198345c6@nt1>

I need help with something. 

I have NT 4.0 running IIS 3.0 and PERL, the latest build.  Everytime I try
to execute a pl file in a html document, the browser tries to download the
script.  The registry is perfect, I think.  I check all the settings that
were in the FAQ.  

It would be cool if someone could help we with this.

thanks




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

Date: 1 Oct 1997 23:46:39 GMT
From: mgjv@mali.comdyn.com.au (Martien Verbruggen)
Subject: Re: Parsing compressed text
Message-Id: <60uncv$c5k$4@comdyn.comdyn.com.au>

In article <zz---dougr--zz-ya02408000R0110971236570001@news1.alterdial.uu.net>,
	zz---dougr--zz@headspace.com (Doug Roberts) writes:
> Is there a relatively easy (for a Perl tourist, not purist) way to parse
> gigantic (40+ meg) files that have been conveniently gzip'ed to <4 megs?

40 MB is not really gigantic.. I'd consider them quite reasonable,
compared to the 1.5 GB logfiles we have lying around :)

Anyway, try something like this (untested as is):

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

my $gzcat = '/usr/local/bin/gzcat'; 	# or gzip -dc or something
my $fname = 'my_httpd_log.gz';

# Here you could test to see if $gzcat is available and executable
# or just rely on the opening of the pipe:

open( HTTPD_LOG, "$gzcat $fname |" ) or die "Cannot open pipe: $!";

while ( <HTTPD_LOG> )
{
	# Do all the processing
}

close( HTTPD_LOG );


This opens a pipe to the output of the $gzcat command. You can also do
it the other way around (gzip on the fly).

for more info, do

	perldoc -f open

-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | That's not a lie, it's a terminological
Commercial Dynamics Pty. Ltd.       | inexactitude.
NSW, Australia                      | 


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

Date: Wed, 1 Oct 1997 16:14:04 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Guenter Steinbach <guenter@arithmos.com>
Subject: Re: PERL and serial port
Message-Id: <Pine.GSO.3.96.971001161314.236Q-100000@usertest.teleport.com>

On Tue, 30 Sep 1997, Guenter Steinbach wrote:

> Tom Phoenix wrote:
> > 
> > On Tue, 30 Sep 1997, Vincent RABAH wrote:
> > 
> > > Does anybody knows how to get data from a serail port ?
> > 
> > Well, the people who have read section 8 of the Perl FAQ have more
> > information than those who haven't. :-)

> I am one who did, and I still couldn't get it to work. 

Sorry to hear that.

> I'd be very interested in hearing from people who have actually used
> serial ports on PCs under NT.

If you find some helpful information which wasn't in the FAQ, please send
it to the FAQ maintainers. Thanks!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: 1 Oct 1997 23:08:37 GMT
From: millerd@vhoorl.rli-net.net (root)
Subject: perl c-link indenter
Message-Id: <60ul5l$8h1$1@vhoorl.rli-net.net>

Does anyone know where I can find a c-linke indenter for perl?

--
---
Gabriel Millerd        |    "I'll carry your books, I'll carry a tune, I'll
RLI Internet Services  |    carry on, carry over, carry forward, Cary Grant,
System Admin Attribu   |   cash & carry, Carry Me Back To Old Virginia, I'll
http://www.rli-net.net |     even Hara Kari if you show me how, but I will
                       |         *not* carry a gun."  -Hawkeye, M*A*S*H

PGP Finger Print
DSS: 1024 0xE760079B = B6D4 DB5B 4990 C79F 00E7  BF4A 1E15 B47A E760 079B
D/H: 4096 0xD53C231B = BC6F C82E FD5C BE0A AF33  607C 8406 4A79 D53C 231B


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

Date: 2 Oct 1997 00:03:55 GMT
From: mgjv@mali.comdyn.com.au (Martien Verbruggen)
Subject: Re: Perl Questions
Message-Id: <60uodb$c5k$8@comdyn.comdyn.com.au>

In article <342C998B.670712F3@unsu.com>,
	Arthur Merar <amerar@unsu.com> writes:
> I have a few questions about Perl:
> 
> 1) Is there a way for me to execute a perl/CGI script from an HTML
> document without the user taking any action?  Say for example I
> wanted to have a counter on how many times a certain page was hit or
> something like that.  How would I execute the perl/CGI script?  Can
> I just call it?

Not a question about perl. If you're limited to CGI, use the <img
src="/cgi-path/perlscript"> method. Server side include would be a lot
better.

Download one of the freely available counters from the web, and see
how they tell you to do it.

> 2)  Does Perl support 2-dimentional arrays?  If so, how do you
> declare them?

sure. 

read the perldata and perlref pages (hint: use perldoc)

$array[0][0] = 1;
$array[0][1] = 2;

etc.

> 3)  Has anyone heard of this new SQL databases on servers called
> msql, or mini SQL?  Well, I am trying to find out if it compatible
> with Perl?  And if so, how do you issue the SQL commands????

go to www.perl.com and look for the full modules list (Download
Software).  If it isn't in the 'Database Interfaces' section it
probably doesn't exist. But I seem to remember it being there..

-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Make it idiot proof and someone will
Commercial Dynamics Pty. Ltd.       | make a better idiot.
NSW, Australia                      | 


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

Date: Wed, 01 Oct 1997 21:07:48 -0400
From: Michael Veve <mav@radyn.com>
Subject: regex problem
Message-Id: <3432F3E4.79A959BB@radyn.com>

Can somebody tell me why $11 in the following perl excerpt is "6" and
not "+", "-", or ";"? I am running Perl 5.001,  Unofficial patchlevel
1m, Perl for Win32 Build 109, Built Jul 15 1996@17:36:29 on WinNT 4.0


 $gausscode =
"(+o1-o4+u5+o6+o7-o8-o9-u10-o11+o12+u13+o14+u15-u9+u6+o5-o10-u11-u16+u1-u8+u7-u4-o16+u12+o15+u14+o13;;)";

 $r2_found = $gausscode =~
s/([+-])([ou])(\d+)([+-])\2(\d+)([+-;].*)([+-][ou])(\3|\5)([+-][ou])(\3|\5)([+-;])/$6$11/;

 print "\tmiddle/middle r2 found ($1$2$3$4$2$5 vs. $7$8$9$10, ($11)):
$gausscode\n\n" if $r2_found;

Thanks in advance for your help.

Mike Veve
mav@radyn.com




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

Date: 01 Oct 1997 16:11:34 -0700
From: Russ Allbery <rra@stanford.edu>
To: Mark Worsdall <jaydee@worsdall.demon.co.uk>
Subject: Re: Traceroute, a perl version
Message-Id: <m3en65cc49.fsf@windlord.Stanford.EDU>

[ Posted and mailed. ]

Mark Worsdall <jaydee@worsdall.demon.co.uk> writes:

> 2) I would like to implement my own version of traceroute in perl so I
> can get the last domain name (text address as oppose to Number) seen.

traceroute requires raw sockets, involves a lot of low-level diddling with
ICMP packets, and would therefore require that your Perl script run as
root on a Unix system.  I'm honestly not sure if it's even *possible* to
do this in Perl on a non-Unix system; it's going to depend on what sort of
networking support you have.

I highly recommend against trying to do this in Perl.  traceroute is a
tricky bit of network code that's already been done for you and that's
more naturally done in C; you'll find it *much* easier (and probably more
secure) to just run the external traceroute binary and capture its output.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Wed, 01 Oct 1997 08:25:31 +0100
From: Erik Bachmann <e_bachmann@geocities.com>
To: Jerome Pimmel <jerome@marketing.co.uk>
Subject: Re: Xbase Module and Database Questions
Message-Id: <3431FAEB.A5FF0411@geocities.com>

This is a multi-part message in MIME format.
--------------D2F86439A7AA76879A31641F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Jerome Pimmel wrote:
> 
> due to the fact that the authors page on the Xbase DB module for perl
> has vanished, i cant figure out whether it is likely to serve my
> purpose.

Checkout the reference list in my note: Xbase File Formats

	http://www.geocities.com/SiliconValley/Pines/2563/xbase.htm

The CodeBase library is available from my home page.

Regards
Erik Bachmann

---------------------------------------------------------------------
 Erik Bachmann, Grydehoejvej 62, DK-4000  Roskilde, Denmark, Europe
  \\\\\/////        _       ______          
 _\ __  __ /_     _| |_    (_)::(_)Voice.:         
| ||_*||*_|| |   | | | |_   |____| (+45) 46789899  
|_/  _/\_  \_|   | | | | |   ____
  / |____| \  _  | | | | |  |   #| E-mail:
  /' /||\ '\ | \_| | | | |  |____|  e_bachmann@geocites.com
  //\____/\\  \  \       |  ______
  ///||||\\\   \_        | /_Home_\ Clickety [CLICK] Software
 Hello world!    \______/   |____|  
          http://www.geocities.com/SiliconValley/Pines/2563
---------------------------------------------------------------------
--------------D2F86439A7AA76879A31641F
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Bachmann, Erik
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Bachmann, Erik
n:              Bachmann;Erik
org:            Clickety Click Software
adr:            Grydehxjvej 62;;;;;DK-4000  Roskilde;Denmark
email;internet: e_bachmann@geocities.com
tel;work:       (+45) 46 78 98 99
note:           <IMG SRC = " http://www.geocities.com/SiliconValley/Pines/2563/bac-100.jpg">


x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
end:            vcard


--------------D2F86439A7AA76879A31641F--



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

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

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