[24050] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6247 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 11 18:05:34 2004

Date: Thu, 11 Mar 2004 15:05:05 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 11 Mar 2004     Volume: 10 Number: 6247

Today's topics:
    Re: Causing Perl to issue a single "write" system call? (Anno Siegel)
    Re: Deleting a folder recursively <bik.mido@tiscalinet.it>
    Re: Extracting directories in a path - TMBABWTDI <lawshouse.public@btconnect.com>
    Re: Extracting directories in a path - TMBABWTDI <lawshouse.public@btconnect.com>
    Re: Extracting directories in a path - TMBABWTDI <usenet@morrow.me.uk>
    Re: Extracting directories in a path - TMBABWTDI <lawshouse.public@btconnect.com>
    Re: How to redirect headers in Perl? (Crazy Monkey)
    Re: Multiple compares -- TMTOWTDI <perl@my-header.org>
    Re: Multiple compares -- TMTOWTDI (Anno Siegel)
    Re: No more handles error with DBD::DB2 on Linux <shah@typhoon.xnet.com>
    Re: Perl DB: how2 silence "redefined" warnings? <nospam@nospam.com>
    Re: Perl module for analyzing log files <pkent77tea@yahoo.com.tea>
        perlfunc.pod and perlvar.pod (Martin L.)
    Re: perlfunc.pod and perlvar.pod <noreply@gunnar.cc>
    Re: perlfunc.pod and perlvar.pod <glex_nospam@qwest.invalid>
    Re: perlfunc.pod and perlvar.pod <tadmc@augustmail.com>
    Re: Test Framework for cross platform client/server run <jgibson@mail.arc.nasa.gov>
    Re: Text editor implemented in Perl <usenet@morrow.me.uk>
    Re: Text editor implemented in Perl <troc@pobox.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 11 Mar 2004 21:47:59 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Causing Perl to issue a single "write" system call?
Message-Id: <c2qmqf$8vu$2@mamenchi.zrz.TU-Berlin.DE>

Ben Morrow  <usenet@morrow.me.uk> wrote in comp.lang.perl.misc:
> 
> Quoth anno4000@lublin.zrz.tu-berlin.de (Anno Siegel):
> > In a POSIX system all writes are guaranteed to be atomic if the data
> > size is below a limit (some buffer size, I forget).  The limit is, also
> > by POSIX, guaranteed to be at least 512 bytes.  If you don't write
> > longer lines you should be fine.
> 
> Is that so? The only reference I can find to atomicity in SUSv3 is when
> writing to a pipe or fifo, when writes of less than PIPE_BUF are
> guaranreed atomic (and PIPE_BUF is guaranteed >= 512). AFAICT, is says
> nothing about writes to regular files... but again, I could be wrong.

No, you are very probably right about regular files.  I was on the
wrong track, assuming we *were* talking about a pipe, instead of a
">>"-opened file.

Anno


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

Date: Thu, 11 Mar 2004 21:05:40 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Deleting a folder recursively
Message-Id: <v2h150p7afep5l78vi4n77m8ru18lp9379@4ax.com>

On Wed, 10 Mar 2004 18:16:43 -0800, "Shabam" <info@pcconnect.net>
wrote:

>> Why are you ignoring files beginning with a dot? If you have a directory
>> with a dotfile in it, the dotfile won't be deleted and then you won't be
>> able to rmdir the directory.
>>
>> Either use File::Path or File::Find if you need to be more general.
>
>Could you provide sample code that would work better?  I'm a newbie and I
>actually got that snippet off someone else's code on the newsgroups.

This seems to work, edit at your leisure:


  #!/usr/bin/perl -l
  
  use strict;
  use warnings;
  use File::Find;
  
  @ARGV = grep { -d or 
        !warn "`$_' doesn't exist or is not a directory\n" } @ARGV;
  
  die "Usage: $0 <dir> [<dirs>]\n" unless @ARGV;
  
  finddepth { no_chdir => 1, 
              wanted => sub {
  		if (-d) {
  		    rmdir and 
  		      print "Removing directory: `$_'" or
  		      warn "Couldn't remove directory `$_': $!\n";
  		} else {
  		    unlink and 
  		      print "Removing `$_'" or
  		      warn "Couldn't remove `$_': $!\n";
  		}
  	    } }, @ARGV;
  
  __END__



Michele
-- 
you'll see that it shouldn't be so. AND, the writting as usuall is
fantastic incompetent. To illustrate, i quote:
- Xah Lee trolling on clpmisc,
  "perl bug File::Basename and Perl's nature"


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

Date: Thu, 11 Mar 2004 19:41:11 +0000
From: Henry Law <lawshouse.public@btconnect.com>
Subject: Re: Extracting directories in a path - TMBABWTDI
Message-Id: <83g1505qnu80nfv3rdhgmghefjp0sbv50h@4ax.com>

On Thu, 11 Mar 2004 08:43:30 +0000, "Henry Law" <news@lawshouse.org>
wrote:

>(There must be a better way to do it)
>
>I have a path statement of the form "/dir1/dir2/dir3" and I want to
>separate the directories and subdirectories into an array...

This has been a most enlightening thread.

fifo's 
	@nodes = map { $_ or () } split '/', $path;

blew me away and I'm not sure I understand it yet.
But I won't ever have consecutive "/" characters
so I don't need that level of sophistication.

John Krahn and Anno between them produced this
most elegant statement:

	@nodes = $path =~ m|[^/]+|g;

I've verified that this works (!) but can't work
out why. 

perlop says of "m" in this construction "... it
returns a list of all the matched strings, as if
there were parentheses around the whole pattern."
But surely the string "/a/b/c" is only matched
once by "^/", since there's only one string with a
slash at the beginning. It must be to do with the
square brackets and the "+" but I can't work out
what. 

I do always have a root path, so I really like
David Wall's

	(undef, @nodes) = split /\//, $path;

That's the one that really should have occurred
even to me in the first place. It takes a while to
think like a Perl interpreter.

The one I shall use, though, is Gunnar Hjalmarsson's

	my @nodes = File::Spec->splitdir( $path );

That's because I already use File::Spec elsewhere
in this code, and this way I can write portably
for Unix and Win.

So thank you all for the Perl tutorial; I'm
grateful for your time.

Henry Law       <><     Manchester, England 


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

Date: Thu, 11 Mar 2004 19:48:14 +0000
From: Henry Law <lawshouse.public@btconnect.com>
Subject: Re: Extracting directories in a path - TMBABWTDI
Message-Id: <ifg1505a666di39e32uvpvlrpm0sdnkncp@4ax.com>

On Thu, 11 Mar 2004 19:41:11 +0000, Henry Law
<lawshouse.public@btconnect.com> wrote:


>	@nodes = $path =~ m|[^/]+|g;

>perlop says of "m" in this construction "... it
>returns a list of all the matched strings, as if
>there were parentheses around the whole pattern."
>But surely the string "/a/b/c" is only matched
>once by "^/", since there's only one string with a
>slash at the beginning. 

Sorry, should have thought more about this.  The square brackets make
it a character class, so ^ is a "not", not a "beginning".  What is
being matched is strings of one or more non-slashes.

Henry Law       <><     Manchester, England 


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

Date: Thu, 11 Mar 2004 19:55:48 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Extracting directories in a path - TMBABWTDI
Message-Id: <c2qg84$73v$3@wisteria.csv.warwick.ac.uk>


Quoth "Henry Law" <news@lawshouse.org>:
> On Thu, 11 Mar 2004 08:43:30 +0000, "Henry Law" <news@lawshouse.org>
> wrote:
> 
> >(There must be a better way to do it)
> >
> >I have a path statement of the form "/dir1/dir2/dir3" and I want to
> >separate the directories and subdirectories into an array...
> 
> This has been a most enlightening thread.
> 
> fifo's 
> 	@nodes = map { $_ or () } split '/', $path;
> 
> blew me away and I'm not sure I understand it yet.

Say you have $path='/dir1/dir2//dir3'. Split will turn this into 
('', 'dir1', 'dir2', '', 'dir3'). map then runs through this list
assigning each element in turn to $_ and builds a new list. If $_ is
true (if it's not an empty string[1]) then it adds $_ to the list; if it
is false then it adds (), the empty list, which has no effect. That 
'$_ or ()' expression is equivalent to

if ($_) {
    $_;
} else {
    ();
}

which is in turn equivalent to

if ($_) {
    return $_;
} else {
    return ();
}

as it is the last statement in the block.

[1] ...or '0'. This is a bug: /dir1/0/dir2 will give you ('dir1',
'dir2') and not ('dir1', '0', 'dir2') as required; but files called '0'
are not that common... :)

> John Krahn and Anno between them produced this
> most elegant statement:
> 
> 	@nodes = $path =~ m|[^/]+|g;
> 
> I've verified that this works (!) but can't work
> out why. 
> 
> perlop says of "m" in this construction "... it
> returns a list of all the matched strings, as if
> there were parentheses around the whole pattern."
> But surely the string "/a/b/c" is only matched
> once by "^/", since there's only one string with a
> slash at the beginning. It must be to do with the
> square brackets and the "+" but I can't work out
> what. 

Read perlre again. [^/] is a character class that matches any character
except / (the ^ means something quite different here from normal); the +
says 'match at least one of'.

Ben

-- 
I've seen things you people wouldn't believe: attack ships on fire off
the shoulder of Orion; I watched C-beams glitter in the dark near the
Tannhauser Gate. All these moments will be lost, in time, like tears in rain.
Time to die.                                                   ben@morrow.me.uk


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

Date: Thu, 11 Mar 2004 21:17:57 +0000
From: Henry Law <lawshouse.public@btconnect.com>
Subject: Re: Extracting directories in a path - TMBABWTDI
Message-Id: <rol150d0i4uov9k6n457ebfh3ikutjgks2@4ax.com>

On Thu, 11 Mar 2004 19:55:48 +0000 (UTC), Ben Morrow
<usenet@morrow.me.uk> wrote:

>> fifo's 
>> 	@nodes = map { $_ or () } split '/', $path;
>> 
>> blew me away and I'm not sure I understand it yet.
>
>true (if it's not an empty string[1]) then it adds $_ to the list; if it
>is false then it adds (), the empty list, which has no effect. 
                       ^^^^^^^^^^^^^^^^^^
Aha ... that's the bit I missed.  How elegant.


Henry Law       <><     Manchester, England 


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

Date: 11 Mar 2004 14:29:20 -0800
From: wlin98004@hotmail.com (Crazy Monkey)
Subject: Re: How to redirect headers in Perl?
Message-Id: <db81df92.0403111429.794f107e@posting.google.com>

> Well.  I was able to "jam" the cookie setting into the header and it
> did not solve my problem.  I used a tool to look at the request and
> the responses.  I see that the cookie is set properly.  What I lack is
> the the authorization line?  When I hit the secure site directly and
> login properly, I see the following line been sent to the server in
> the header on almost all of the my requests.  By the way, the login is
> not a web page login, but a Realm login (Windows Pop-up box).
> 	
> Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxx	
> 
> 	I used the authorization_basic( $user, $password ) in my Perl code,
> but the authentication is not sticking.  It works for the page that I
> am fetching through the Perl.  By the way, the Perl page is located on
> a web server.  It is not on the client machine.
> 	


There are times, you have to cut your losses.  After spent two days on
this, we decided NOT to use the autologin feature.  Instead, we are
going to let user authenticate themselves.

If someone has an idea on how to do windows Basic authentication on a
server and make it stick on a client, I am still interested for future
reference.



Crazy Monkey


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

Date: Thu, 11 Mar 2004 20:53:35 +0100
From: Matija Papec <perl@my-header.org>
Subject: Re: Multiple compares -- TMTOWTDI
Message-Id: <9lg1501582eqv9fkdrg58ltnui0qdqseaq@4ax.com>

X-Ftn-To: Anno Siegel 

anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
>> some other language, this BEGIN block seems like, "hey, we have BEGIN
>> already so we could also use it for persistent lexicals!" :))
>
>I have come to like the use of a block (bare or BEGIN) for persistent
>lexicals.  A well-defined set of sub's get to share a set of variables
>and make up a kind of one-off, anonymous object, if an object is a
>set of data with operations to work on it.  All with no extra syntax.

Do you use this approach when you need smaller class but don't want separate
package?

>The special case of a single sub with persistent data gets a bit blown
>up that way.  Well, that's the price.
>
>If the variables need initialization and we want it at compile time,
>a BEGIN block is not so far-fetched.  Otherwise, a bare block will do.
>I like to initialize early.  If that is paranoia, it is bred in debugging
>sessions where I want to call my routines at any time from anywhere.

I would say that there is no such thing like paranoia, it saved my ass many
times so I can't give good things bad names. ;)


-- 
Matija


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

Date: 11 Mar 2004 21:36:13 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Multiple compares -- TMTOWTDI
Message-Id: <c2qm4d$8vu$1@mamenchi.zrz.TU-Berlin.DE>

Matija Papec  <perl@my-header.org> wrote in comp.lang.perl.misc:
> X-Ftn-To: Anno Siegel 
> 
> anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
> >> some other language, this BEGIN block seems like, "hey, we have BEGIN
> >> already so we could also use it for persistent lexicals!" :))
> >
> >I have come to like the use of a block (bare or BEGIN) for persistent
> >lexicals.  A well-defined set of sub's get to share a set of variables
> >and make up a kind of one-off, anonymous object, if an object is a
> >set of data with operations to work on it.  All with no extra syntax.
> 
> Do you use this approach when you need smaller class but don't want separate
> package?

No, not really.  As far as the metaphor holds, the bare block isn't a
little class, it's a classless object whose accessors are the subs
defined in that block.

In an OO context you are more likely to find this in the implementation
of class data.  A graphic package could use it to control a background
color and a default background color through two or three accessors,
for instance.  That could be seen as a one-off object (whose implementation
is entirely independent of the normal objects of the class).

The accessors should be written to ignore their first argument, so
they can be called as class- or object methods.  But that's more
technicality than you were probably asking for...

Anno


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

Date: Thu, 11 Mar 2004 20:42:44 +0000 (UTC)
From: Hemant Shah <shah@typhoon.xnet.com>
Subject: Re: No more handles error with DBD::DB2 on Linux
Message-Id: <c2qj04$jod$1@flood.xnet.com>

While stranded on information super highway James Willmore wrote:
> On Tue, 09 Mar 2004 17:54:28 +0000, Hemant Shah wrote:
> 
>>   I am not sure if this is a perl of DB2 problem. I had posted this
>>   problem last week but did not get any reply. I am posting it again
>>   with some more info to see it someone can identiry the problem.
> [ ... ]
> 
> To determine if DBI is at fault or something else is going on, use the
> 'trace' method of the DBI module.  I recommend setting it to 4, since you
> may have a suttle bug.
> 
> `perldoc DBI` for more info.
> 
> HTH
> 
> -- 
> Jim
> 
> Copyright notice: all code written by the author in this post is
>  released under the GPL. http://www.gnu.org/licenses/gpl.txt 
> for more information.
> 
> a fortune quote ...
> "And what will you do when you grow up to be as big as me?" asked
> the father of his little son.  "Diet." 
> 


The problem is in the way DBI, DBD interacts with the database. I added
same select statement into a file 1000 times and ran it as follows:

db2 -stf tstdb2.ddl

I have no problem running it 1000 times. But it still fails after fetching
the data 386 times using DBI interface.

I turned on trace to 9 and here is the tail end of it:

    -> prepare for DBD::DB2::db (DBI::db=HASH(0x2032d2e4)~0x2032e26c 'SELECT SRC_NUM FROM GBLCODE.SOURCENAME
                                   WHERE SRC_NAME = 'adb.frag.12805'
                                   FOR READ ONLY')
    dbih_setup_handle(DBI::st=HASH(0x27e7fca8)=>DBI::st=HASH(0x27e7fcfc), DBD::DB2::st, 27e7fcb4, Null!)
    dbih_make_com(DBI::db=HASH(0x2032e26c), 20051cc8, DBD::DB2::st, 160, 0) thr#0
    dbih_setup_attrib(DBI::st=HASH(0x27e7fcfc), Err, DBI::db=HASH(0x2032e26c)) SCALAR(0x2014e0d0) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x27e7fcfc), State, DBI::db=HASH(0x2032e26c)) SCALAR(0x2014e130) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x27e7fcfc), Errstr, DBI::db=HASH(0x2032e26c)) SCALAR(0x2014e100) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x27e7fcfc), TraceLevel, DBI::db=HASH(0x2032e26c)) 9 (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x27e7fcfc), FetchHashKeyName, DBI::db=HASH(0x2032e26c)) 'NAME' (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x27e7fcfc), HandleError, DBI::db=HASH(0x2032e26c)) undef (not defined)
    dbd_st_prepare'd sql f66311
   SELECT SRC_NUM FROM GBLCODE.SOURCENAME
                                   WHERE SRC_NAME = 'adb.frag.12805'
                                   FOR READ ONLY
    STORE DBI::st=HASH(0x27e7fca8) 'NUM_OF_FIELDS' => 1
fbh 0: 'SRC_NUM' , type 4,  11, dsize 10, p0 s537823208
   out: ftype 1, indp 0, bufl 12, rlen 12
    <- prepare= DBI::st=HASH(0x27e7fca8) at ./tsttie.pl line 121 via ./tsttie.pl line 120
    -> execute for DBD::DB2::st (DBI::st=HASH(0x27e7fca8)~0x27e7fcfc)
    <- execute= -1 at ./tsttie.pl line 122 via ./tsttie.pl line 120
    -> fetchrow for DBD::DB2::st (DBI::st=HASH(0x27e7fca8)~0x27e7fcfc)
    dbih_setup_fbav for 1 fields => 0x27e7fce4
    dbd_st_fetch 1 fields
   0: rc=0 '207483'
    <- fetchrow= '207483' row1 at ./tsttie.pl line 132 via ./tsttie.pl line 179
    -> finish for DBD::DB2::st (DBI::st=HASH(0x27e7fca8)~0x27e7fcfc)
    <- finish= 1 at ./tsttie.pl line 133 via ./tsttie.pl line 179
    -> prepare for DBD::DB2::db (DBI::db=HASH(0x2032d2e4)~0x2032e26c 'SELECT RTRIM(FRAGMENT) FROM GBLCODE.FRAGMENT
                                              WHERE SRC_NUM = 207483
                                                AND LANGUAGE = 'EN1'
                                                    FOR READ ONLY')
    dbih_setup_handle(DBI::st=HASH(0x27e7fd5c)=>DBI::st=HASH(0x27f418ec), DBD::DB2::st, 27e7fd68, Null!)
    dbih_make_com(DBI::db=HASH(0x2032e26c), 20051cc8, DBD::DB2::st, 160, 0) thr#0
    dbih_setup_attrib(DBI::st=HASH(0x27f418ec), Err, DBI::db=HASH(0x2032e26c)) SCALAR(0x2014e0d0) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x27f418ec), State, DBI::db=HASH(0x2032e26c)) SCALAR(0x2014e130) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x27f418ec), Errstr, DBI::db=HASH(0x2032e26c)) SCALAR(0x2014e100) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x27f418ec), TraceLevel, DBI::db=HASH(0x2032e26c)) 9 (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x27f418ec), FetchHashKeyName, DBI::db=HASH(0x2032e26c)) 'NAME' (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x27f418ec), HandleError, DBI::db=HASH(0x2032e26c)) undef (not defined)
Statement allocation error error -1 recorded: [IBM][CLI Driver] CLI0120E  Memory allocation failure. SQLSTATE=HY001
    >> DESTROY     DISPATCH (DBI::st=HASH(0x27e7fd5c) rc1/1 @1 g0 ima4 pid#96280) at ./tsttie.pl line 144
    <> DESTROY ignored for outer handle DBI::st=HASH(0x27e7fd5c) (inner DBI::st=HASH(0x27f418ec))
    >> DESTROY     DISPATCH (DBI::st=HASH(0x27f418ec) rc1/1 @1 g0 ima4 pid#96280) at ./tsttie.pl line 144
    -> DESTROY for DBD::DB2::st (DBI::st=HASH(0x27f418ec)~INNER)
Statement handle DBI::st=HASH(0x27f418ec) DESTROY ignored - never set up
       error: -99999 '[IBM][CLI Driver] CLI0120E  Memory allocation failure. SQLSTATE=HY001'
    <- DESTROY= undef at ./tsttie.pl line 144
    DESTROY (dbih_clearcom) (sth 0x27e7fd5c 0x0, com 0x27fc2da8, imp DBD::DB2::st):
       FLAGS 0x191: COMSET Warn RaiseError PrintError
       PARENT DBI::db=HASH(0x2032e26c)
       KIDS 0 (0 Active)
       IMP_DATA undef
       LongReadLen 32700
       NUM_OF_FIELDS 0
       NUM_OF_PARAMS 0
    dbih_clearcom 0x27e7fd5c (com 0x27fc2da8, type 3) done.

    !! ERROR: -99999 '[IBM][CLI Driver] CLI0120E  Memory allocation failure. SQLSTATE=HY001'




-- 
Hemant Shah                           /"\  ASCII ribbon campaign
E-mail: NoJunkMailshah@xnet.com       \ /  --------------------- 
                                       X     against HTML mail
TO REPLY, REMOVE NoJunkMail           / \      and postings      
FROM MY E-MAIL ADDRESS.           
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind,                Above opinions are mine only.
it's backed up on tape somewhere.      Others can have their own.


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

Date: Thu, 11 Mar 2004 19:35:27 +0000 (UTC)
From: kj <nospam@nospam.com>
Subject: Re: Perl DB: how2 silence "redefined" warnings?
Message-Id: <c2qf1v$92q$1@reader2.panix.com>

In <c2q676$t2o$2@wisteria.csv.warwick.ac.uk> Ben Morrow <usenet@morrow.me.uk> writes:
>Two ways:

>{ local $SIG{__WARN__} = sub{}; do 'some.pl' }
>{ no warnings 'redefine'; do 'some.pl' }

Thanks.  As it turns out, the problem vanished mysteriously.  I
don't know what's different now, but the warning messages no longer
appear when I repeatedly re-invoke "do 'some_perl_file.pl'", even
though I can confirm that subs *are* being redefined.  Perl is one
mysterious universe...

kj

-- 
To  s&e^n]d  me  m~a}i]l  r%e*m?o\v[e  bit from my a|d)d:r{e:s]s.



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

Date: Thu, 11 Mar 2004 21:58:47 +0000
From: pkent <pkent77tea@yahoo.com.tea>
Subject: Re: Perl module for analyzing log files
Message-Id: <pkent77tea-40A9DC.21584711032004@pth-usenet-02.plus.net>

In article <361f42ca.0403092206.4c5a295b@posting.google.com>,
 krishna@multimediastudio.com (Krishna Srinivasan) wrote:

> Am looking for a CPAN Perl Module to analyze an Apache server log
> file. I want to read the log file line by line and extract information
> (break it into bits). For example the date for a particular referrer
> etc. Is there such a module available?

Depending on what you want to do, why not try Analog? It's not perl, but 
it does lots of reports, sumamries, graphs etc.

P

-- 
pkent 77 at yahoo dot, er... what's the last bit, oh yes, com
Remove the tea to reply


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

Date: 11 Mar 2004 13:43:15 -0800
From: mjpliv@eastlink.ca (Martin L.)
Subject: perlfunc.pod and perlvar.pod
Message-Id: <36fd063b.0403111343.b6ee375@posting.google.com>

I have been refered to these and I am afraid I have no idea what they
are or where to find them. A google search only returns links to
additional documents that make reference to the term but not the
source.

Can someone point me in the correct direction. I haven't written code
since learning basic Fortran IV (no PC's or CRT's back then - keypunch
machines and mainframe computers)about 30+ years ago. I thought perl
was the best place to start.


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

Date: Thu, 11 Mar 2004 23:12:37 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: perlfunc.pod and perlvar.pod
Message-Id: <c2qoc9$1vks9v$1@ID-184292.news.uni-berlin.de>

Martin L. wrote:
> I have been refered to these and I am afraid I have no idea what
> they are or where to find them.

If Perl is installed on your computer, you should be able to access
them from the command line by typing

     perldoc perlfunc

and

     perldoc perlvar

They are also available on the web, for instance at
http://www.perldoc.com/perl5.8.0/pod/perl.html

HTH

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Thu, 11 Mar 2004 16:15:14 -0600
From: "J. Gleixner" <glex_nospam@qwest.invalid>
Subject: Re: perlfunc.pod and perlvar.pod
Message-Id: <Tx54c.361$l16.81653@news.uswest.net>

Martin L. wrote:
> I have been refered to these and I am afraid I have no idea what they
> are or where to find them. A google search only returns links to
> additional documents that make reference to the term but not the
> source.
> 
> Can someone point me in the correct direction. I haven't written code
> since learning basic Fortran IV (no PC's or CRT's back then - keypunch
> machines and mainframe computers)about 30+ years ago. I thought perl
> was the best place to start.

If you have perl installed, it's likely on your system.

For *nix systems, running "perldoc <pagename>" will display the page.
At the prompt, enter:

	perldoc perlfunc

and it should display the information in perlfunc.pod for your 
particular version of perl.

Don't remember where/how to get at it on a MS system, it's part of the 
Activestate installation though, and their documentation is available on 
their Web site, if you can't find it on your machine.

If you don't have perl installed, you can browse all the documentation 
from the perldoc.com Web site.  At this time the "PODS" link takes you to:

http://perldoc.com/perl5.8.0/pod.html


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

Date: Thu, 11 Mar 2004 16:29:58 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: perlfunc.pod and perlvar.pod
Message-Id: <slrnc51q36.45c.tadmc@magna.augustmail.com>

Martin L. <mjpliv@eastlink.ca> wrote:

> Subject: perlfunc.pod and perlvar.pod

> I have been refered to these and I am afraid I have no idea what they
> are or where to find them.


How to access the Perl documentation, and a whole bunch of other
helpful stuff, are in the Posting Guidelines:

   http://mail.augustmail.com/~tadmc/clpmisc.shtml


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Thu, 11 Mar 2004 13:22:26 -0800
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: Test Framework for cross platform client/server running.
Message-Id: <110320041322263820%jgibson@mail.arc.nasa.gov>

In article <1dc70d61.0403101829.7dc8a02d@posting.google.com>, Charlie
<cji_work@yahoo.com> wrote:

> Hi there, 
> I have created a test framework for the client/Server testing in PERL.
> So far those features are implemented. If a user running the test
> cases, following things happen: "1. localserver Daemon started; 2.
> local Server started; 3. Client started and calls the Server; 4. local
> Server is stopped; 5. localserver Daemon stopped."
> Now the next thing that I want to do is to have the Server and client
> running on different platforms, such as Unix to Unix, Unix to window.
> And I am stucked here.
> 
> Let's say I start my test cases on my client platform, and following
> are the code that I have now,
> "
>    ....
>     # to get the remote platform that server is going to be    
>     $host = ENVUTIL::getConfig("SERVER_MACHINE");
>     # to get the remote port number for connection. 
>     $port = ENVUTIL::getConfig("SERVER_PORT");
>     
>     $host = "localhost" if ($host eq "");
>     $port = 9000 if ($port eq "");
> 
>    # create a tcp connection to the specified host and port
>     $handle = IO::Socket::INET->new(Proto    => "tcp",
>                                     PeerAddr => $host,
>                                     PeerPort => $port)
>     or die "connectToServer: Can't connect to port $port on $host:
> $!";
> 
>     $handle->autoflush(1); #so output gets there right away
>  
>     executeServer();
>    ....
> "
> It always failed when the tcp connect is to made, it gives me some
> error as the port is invalid, but I have double checked, it is a valid
> port number. Any ideas what else might be, or I missed something ?

Is the server running on the remote host? And is it doing a listen and
accept on the port? You can check from the client machine by running
telnet:

   telnet  host  port

Type in something and see if you get a response, assuming your server
program sends something out to the client.

Run the netstat program (on unix, at least) to see if a connection has
been established between the two systems on your port (the server
connection will have your specified port; the client will have a
temporarily-assigned port number as its half of the connection.)


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

Date: Thu, 11 Mar 2004 19:17:47 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Text editor implemented in Perl
Message-Id: <c2qe0q$65f$1@wisteria.csv.warwick.ac.uk>


Quoth James Taylor <spam-block-@-SEE-MY-SIG.com>:
> I just wondered whether anyone has thought to write a programmers'
> text/data editor in Perl and allow the full power of Perl's s///eg
> operator for manipulating the file being edited. The ability
> to perform this kind of day to day manipulation visually using
> my favourite language would be quite sincerely and deeply cool.

Yes.

> Ideally, I'd like the editor itself to be hackable in Perl too.

The main reason I started was because I got really hacked off with
elisp: I just can't make any sense of it... Emacs' Unicode support was
also not how I wanted it to be, so I thought I'd write my own editor in
Perl.

Then I learned to use vim... the project's been on hold ever since :).

Ben

-- 
It will be seen that the Erwhonians are a meek and long-suffering people,
easily led by the nose, and quick to offer up common sense at the shrine of
logic, when a philosopher convinces them that their institutions are not based 
on the strictest morality.  [Samuel Butler, paraphrased]       ben@morrow.me.uk


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

Date: Thu, 11 Mar 2004 20:00:05 GMT
From: Rocco Caputo <troc@pobox.com>
Subject: Re: Text editor implemented in Perl
Message-Id: <slrnc51hdi.2j0s.troc@eyrie.homenet>

On Thu, 11 Mar 2004 19:17:47 +0000 (UTC), Ben Morrow wrote:
>
> Quoth James Taylor <spam-block-@-SEE-MY-SIG.com>:
>> I just wondered whether anyone has thought to write a programmers'
>> text/data editor in Perl and allow the full power of Perl's s///eg
>> operator for manipulating the file being edited. The ability
>> to perform this kind of day to day manipulation visually using
>> my favourite language would be quite sincerely and deeply cool.
>
> Yes.
>
>> Ideally, I'd like the editor itself to be hackable in Perl too.
>
> The main reason I started was because I got really hacked off with
> elisp: I just can't make any sense of it... Emacs' Unicode support was
> also not how I wanted it to be, so I thought I'd write my own editor in
> Perl.
>
> Then I learned to use vim... the project's been on hold ever since :).

I once wrote line- and vt100-based text editors in Perl.  That was back
in the 4.036 days, though, so the code's extra super ugly (if it works
at all anymore).  I wouldn't call them "programmers'" editors, though.

I also use vim, having first done some hard time as an emacs user.

-- 
Rocco Caputo - rcaputo@pobox.com - http://poe.perl.org/


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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 V10 Issue 6247
***************************************


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