[9855] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3448 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 14 14:07:35 1998

Date: Fri, 14 Aug 98 11:00:38 -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           Fri, 14 Aug 1998     Volume: 8 Number: 3448

Today's topics:
    Re: 5.002 and 5.004 question <rootbeer@teleport.com>
        Announcement of a Biological Perl module jong@salt2.med.harvard.edu
    Re: Apache mod_rewrite, perl script problem <support@rosenet.net>
    Re: Apache mod_rewrite, perl script problem <rootbeer@teleport.com>
    Re: Browser Counter Code Required (brian d foy)
    Re: CGI script running external program <swhatley@blkbox.com>
        Change NT IP Address Using Perl <wkchiu@yahoo.com>
        clp.moderated setup info? (Craig Berry)
    Re: File updating question (Jeff Yoak)
    Re: File updating question (Jeff Yoak)
        HELP: asterisk(*) on SYSTEM command (Nestor Florez)
    Re: HELP: asterisk(*) on SYSTEM command (Craig Berry)
    Re: How to append at the top of the logfile ? <rootbeer@teleport.com>
    Re: How to append at the top of the logfile ? (Andre Merzky)
    Re: JAPH (was: Re: Newbie Question About 'for') (Kevin Reid)
    Re: localtime showing wrong info <tchrist@mox.perl.com>
    Re: NT: redirect stdout to file <perlguy@inlink.com>
    Re: Parsing Word to ASCII <xuchu@iscs.nus.edu.sg>
        Perl and NT and SQLServer aschneid@cmp.com
        Perl DBM stuff.. (I searched the archives) jevon@my-dejanews.com
        Perl install problems <mpgromm@sandia.gov>
    Re: Perl Style (Scott Erickson)
    Re: perl version (Craig Berry)
    Re: perl4.036 <rootbeer@teleport.com>
        problem with activate perl 5.,003_07 PERL_VERSION <leoliou@pacbell.net>
        problem with Win32::Registry <leoliou@pacbell.net>
        pulling an attached file with perl script in .forward <sirron@mail.mcoe.k12.ca.us>
        Recommend a good editor <skbohler@sprynet.com>
    Re: Searching/keeping strings split across lines. <rootbeer@teleport.com>
    Re: Substitution (Craig Berry)
    Re: year 2000 delete question (brian moore)
    Re: year 2000 delete question <rootbeer@teleport.com>
    Re: year 2000 delete question (Craig Berry)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Fri, 14 Aug 1998 16:28:43 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: 5.002 and 5.004 question
Message-Id: <Pine.GSO.4.02.9808140920170.10161-100000@user2.teleport.com>

On 14 Aug 1998, Kent Perrier wrote:

> Oh, I thought the 'use strict' pragme forced you define your variables
> and, if you didn't, you got the 'use of uninitialize value' error
> message.  Is this not true?

'use strict "vars"' (which is the aspect of 'use strict' which applies
here) requires all variables either 

    to be declared with 'my',

	my($fred, %barney, @wilma);

    to be declared with 'use vars' (or equivalent), 

	use vars qw/ $global /;

    to be fully qualified with a package name, 

	$somepack::var = "I'm fully qualified!";

    or to be known to Perl.

	$_ = "Don't have to declare me!";

On the other hand, the warning about uninitialized values comes from using
the value (not variable!) of undef in various places. For example:

    #!/usr/bin/perl -w

    sub nothing {
	return undef;		# could be simpler...
    }

    my $fred = 23 + &nothing;

Of course, you have to have warnings turned on in order to get this
warning from perl. Also, some uses of undef are acceptable, while others
are suspicious. Which ones are which may change from one version of Perl
to the next, as Perl gets smarter about identifying what a programmer is
trying to do.

Hope this helps!

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



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

Date: Fri, 14 Aug 1998 16:08:55 GMT
From: jong@salt2.med.harvard.edu
Subject: Announcement of a Biological Perl module
Message-Id: <6r1nem$ngo$1@nnrp1.dejanews.com>

  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # Title    : Biology  perl module  Announcement                  #
  # Download : ftp://cyrah.med.harvard.edu/pub/Software/Bioperl    #
  #                                                                #
  # URL      : http://cyrah.med.harvard.edu/~jong/bioperl.html     #
  # Date     : 15th/Aug/1998                                       #
  #________________________________________________________________#



      Announcement of a Biological Perl module for Bioinformatics


   Bio.pl and Bio.pm are a perl5 module for Biological sequence analsys.
   It has many useful relatively independent subroutines which can be
   used in your own perl programs.

   DO Whatever You Like with It to help Science progress at the maximum
   speed under free and unselfish environment.

   They also contain useful general purpose subroutines.


   Download: ftp://cyrah.med.harvard.edu/pub/Software/Bioperl

   URL     : http://cyrah.med.harvard.edu/~jong/bioperl.html



       This is a DWYLI (Do Whatever You Like with It :-) software.


                                       jong@salt2.med.harvard.edu

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


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

Date: Fri, 14 Aug 1998 09:24:31 -0700
From: Rosenet Technical Support <support@rosenet.net>
To: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Apache mod_rewrite, perl script problem
Message-Id: <35D464BF.7567@rosenet.net>

Tom Phoenix wrote:
> 
> On Thu, 13 Aug 1998, Rosenet Technical Support wrote:
> 
> > When I use the rewrite module, the browser is taken to the proper
> > address, but the script is shown in plain text.
> 
> Sounds as if your server isn't doing what you want. Perhaps the docs,
> FAQs, and newsgroups about servers should be of assistance to you. Good
> luck!
> 
> --
> Tom Phoenix       Perl Training and Hacking       Esperanto
> Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/

Thanks,

I already tried the docs and FAQs - now I'm at the newsgroups part.

Christopher Ostmo
a.k.a. support@rosenet.net
Rosenet, Inc.

For a good time,
http://modems.rosenet.net/


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

Date: Fri, 14 Aug 1998 17:47:07 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Apache mod_rewrite, perl script problem
Message-Id: <Pine.GSO.4.02.9808141045300.10161-100000@user2.teleport.com>

On Fri, 14 Aug 1998, Rosenet Technical Support wrote, quoting me:

> Newsgroups: comp.lang.perl.misc

> > Sounds as if your server isn't doing what you want. Perhaps the docs,
> > FAQs, and newsgroups about servers should be of assistance to you. Good
> > luck!

> I already tried the docs and FAQs - now I'm at the newsgroups part.

Maybe you need to try the ones about _servers_. This one is about perl. 

     * comp.infosystems.www.Servers.mac - Web servers for the Macintosh
       platform.
     * comp.infosystems.www.Servers.misc - Web servers for other
       platforms.
     * comp.infosystems.www.Servers.ms-windows - Web servers for MS
       Windows and NT.
     * comp.infosystems.www.Servers.unix - Web servers for UNIX
       platforms.

Hope this helps!

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



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

Date: Fri, 14 Aug 1998 12:50:43 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Browser Counter Code Required
Message-Id: <comdog-ya02408000R1408981250430001@news.panix.com>
Keywords: from just another new york perl hacker

[redirected from comp.lang.perl.misc to 
comp.infosystems.www.authoring.cgi]

In article <linberg-1408981019510001@pri03-028.oldcity.dca.net>, linberg@literacy.upenn.edu (Steve Linberg) posted:

>In article <903092775.563.0.nnrp-04.9e98ffcf@news.demon.co.uk>, "Jason
>Townsend" <jason@technolog.com> wrote:
>
>> Does anybody have any example code for keeping a hit counter of the type of
>> Browser being used to access a site, ie Number of Netscape 3.0 hits, IE 3
>> hits, etc.
>
>Your serverlogs have all of this information already.

maybe they do.  it depends on the server configuration.  user_agent
isn't part of the common log format.

>CGI hit counters aren't accurate.  It's impossible. 

it's not impossible - just unwieldly and annoying to implement fully.

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Conference Quiz Show <URL:http://tpj.com/tpj/quiz-show>


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

Date: 14 Aug 1998 16:24:08 GMT
From: Steven Whatley <swhatley@blkbox.com>
Subject: Re: CGI script running external program
Message-Id: <903111844.789515@news.blkbox.com>

David W. Wong <dave@hmw.com> wrote:
: I have simple Perl script (running under NT) which runs an external program
: (in the same directory) as follows:

: #! c:\perl\bin\perl
: $output = `externalprogram.exe`;

You need to add the explicit path of where the executable is.  This
happened to me when trying to call lynx.  I had to specify
/usr/local/bin/lynx.  For security reasons it is best to specify the
entire path and not rely on the PATH environment variable. 

Good luck,
Steven
-- 
                 _|_  |  _|_   "I am the way and the truth and the life.
                  | --|-- |     No one comes to the Father except through
Steven Whatley    |   |   |      me.  If you really knew me, you would
Houston, Texas        |           know my Father as well.  From now on,
swhatley@blkbox.com   |            you do know him and have seen him."
http://www.blkbox.com/~swhatley/        -- Jesus Christ (John 14:6-7 NIV)


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

Date: 14 Aug 1998 16:54:11 GMT
From: "wkchiu" <wkchiu@yahoo.com>
Subject: Change NT IP Address Using Perl
Message-Id: <01bdc7a4$e1914580$9b6b8bd0@wkchiu>

Is it possible to change the IP Address and Gateway using Perl ? What Perl
command can I use ?

Thanks,
wkchiu.


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

Date: 14 Aug 1998 16:35:17 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: clp.moderated setup info?
Message-Id: <6r1p05$gms$1@marina.cinenet.net>

My ISP's news admin appears to have misconfigured clp.moderated such that
I can't post to it (well, I can, but it doesn't go to the moderators and
thus doesn't propagate properly).  He's attempting to fix this, but
neither of us can find the config info needed to install it properly.  And
to compound the problem, I'm not entirely sure what such info consists of.

So: If any clp.moderated moderator or other knowledgable person could
either email me this information, or post it here, I would be most
grateful.  Thanks in advance...

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


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

Date: Fri, 14 Aug 1998 17:31:29 GMT
From: jeff@yoak.com (Jeff Yoak)
Subject: Re: File updating question
Message-Id: <fo_A1.1425$vq2.2298889@newse2.tampabay.rr.com>

[posted and emailed]

"Ha" <REPLY_TO_lastronin@earthlink.net> wrote:

>no no no. as i mentioned in another post to someone esle, you CANNOT READ
>AND WRITE AT THE SAME TIME IF YOU'RE GOING TO CHANGE THE SIZE OF THE FILE.
>sorry for the shouting. perldocs is not stressing this enough. the only way
>to do a valid +< is to keep the file size exactly the same. go back to my
>first post and try the open read, open write, rename method. unless you're
>making a byte-for-byte replacement (which takes a lot of forethought in the
>original creation of the datafile) you should never use +<.

This is just good, old fashioned wrong.  And you screamed it, no less.
Tell me why you can't open a file '+<' seek to the end of it and write
more to it increasing the size.  Programs I've written are doing it
thousands, probably tens of thousands of times per day.

(The other poster's code *is* broken, but not for this reason.)

Cheers,
Jeff

-- 
Jeff Yoak         jeff@yoak.com



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

Date: Fri, 14 Aug 1998 17:44:04 GMT
From: jeff@yoak.com (Jeff Yoak)
Subject: Re: File updating question
Message-Id: <2A_A1.1428$vq2.2301617@newse2.tampabay.rr.com>

[posted and emailed]

Ketan Patel <kpatel@mathworks.com> wrote:

>My data file is something along the lines of:

>00000|00000|0|Text Here [50-char string]|Text Here [75-char
>string]|00000000
>00001|00000|0|Text Here [50-char string]|Text Here [75-char
>string]|00000000
>00002|00000|0|Text Here [50-char string]|Text Here [75-char
>string]|00000000

[snip]

>open(DATA,"+<data.txt") or die "die!";
>flock DATA, 2;
>while(<DATA>) {
>	@array = split(/\|/,$_);
>	$array[2] = '1';
>	$print DATA @array; #this doesn't seem to work ?? any suggestions?
>#       $print;             #this didn't work either...
>}
>close(DATA);

As another poster pointed out, you probably don't want $print above,
but let's assume that's just a typo.

You're next problem is that you took out your "column" divider with
the split and you when you implicity put humpty back together with
your print statement, you don't re-add the divider.  Perhaps have a
look at:

perldoc -f join

Other than that, you should be fine with this approach as long as what
your replacements have the same length as the source.

Cheers,
Jeff

-- 
Jeff Yoak         jeff@yoak.com



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

Date: 14 Aug 1998 16:26:32 GMT
From: nestor@sd.cadence.com (Nestor Florez)
Subject: HELP: asterisk(*) on SYSTEM command
Message-Id: <6r1ofo$eap$1@news.cadence.com>


To list a directory in a UNIX platform you type "ls -l *"
The asterisk in a wild card for all the files.

When I try passing the arguments in this small perl program:
-----
  @args = ("ls", "-lt", "*", "\*", "?\*.pl");
  if( system(@args) == 0)
  {
    print "IT WORKED\n";
  }
  else
  {
    print "IT DID NOT WORK\n";
  }
-----

It does not recognize the asterisk.  
How do I pass the asterisk to the system?  
Any ideas?

Thanks,

Nestor
-- 
______________________________________________________________________
Nestor Alberto Florez Torres  | "Authority Gone to one's head is the |
5580 Lake Park Way # 8        |  greatest enemy of thruth." Einstein |
San Diego, Ca. 91942          |---------------------------------------


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

Date: 14 Aug 1998 17:17:05 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: HELP: asterisk(*) on SYSTEM command
Message-Id: <6r1reh$gms$5@marina.cinenet.net>

Nestor Florez (nestor@sd.cadence.com) wrote:
: To list a directory in a UNIX platform you type "ls -l *"
: The asterisk in a wild card for all the files.

Actually, just plain "ls -l" lists just the current directory.  "ls -l *"
recurses into subdirectories.

: When I try passing the arguments in this small perl program:
: -----
:   @args = ("ls", "-lt", "*", "\*", "?\*.pl");
                                ^      ^

What are these backslashes supposed to be doing?  They are meaningless as
you've used them; your arg list above is equivalent to ("ls", "-lt", "*",
"*", "?*.pl") -- which doesn't make a lot of sense.

:   if( system(@args) == 0)

The list-of-args form of the system() call specifically disables shell
wildcard expansion.

:   {
:     print "IT WORKED\n";
:   }
:   else
:   {
:     print "IT DID NOT WORK\n";
:   }
: -----
: 
: It does not recognize the asterisk.  
: How do I pass the asterisk to the system?  

Either glob the files yourself, or use the single-argument form of
system().

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


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

Date: Fri, 14 Aug 1998 16:15:27 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: How to append at the top of the logfile ?
Message-Id: <Pine.GSO.4.02.9808140912561.10161-100000@user2.teleport.com>

On Fri, 14 Aug 1998, Jim Michael wrote:

> My TMTOWTDI:
> 
> #!/usr/bin/perl -w
> open (OUT,"+<access.log") || die $!;
> my $line = "http://language.perl.com/newdocs/pod/perlfaq5.html";
> seek OUT, 0, 0;
> print OUT $line;
> close OUT;

Don't forget to put a newline after that output, to delimit that valuable
URL from whatever text was already in the file. Of course, people who
don't understand what this code is doing should probably check out that
valuable URL. :-)  Cheers!

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



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

Date: 14 Aug 1998 16:55:53 GMT
From: am@am.westblaak.spirit.nl (Andre Merzky)
Subject: Re: How to append at the top of the logfile ?
Message-Id: <6r1q6p$3qf$1@newnews.nl.uu.net>

In article <6r0tn7$b70$1@news.ycc.yale.edu>, mnc@diana.law.yale.edu (Miguel Cruz) writes:
     Terrence S. Ma <terrence@cs.utexas.edu> wrote:
     > I am pretty new to perl so I hope that I am not asking a very 
     > stupid question.  I have a perl script to log all the web hits 
     > on my web page but I want to have the latest hit to be at the top 
     > of the logfile instead of at the bottom.
    
     There's only one way that's going to scale particularly well to large 
     logfiles: Turn your monitor upside down and leave the code alone.
     
     Otherwise you're going to have to rewrite the entire file every time you add
     a line. Are you sure it's really worth the trouble? Perhaps you could attack
     the problem from the other angle; for instance, write a version of "more"
     that pages backwards through a file.
    
you mean: 'tac | more' ? 

Andre.


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

Date: Fri, 14 Aug 1998 09:49:30 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: JAPH (was: Re: Newbie Question About 'for')
Message-Id: <1ddpn20.13tfp4t1aq7k8wN@slip166-72-108-14.ny.us.ibm.net>

Martin Gregory <mgregory@asc.sps.mot.com> wrote:

> Martin Gregory <mgregory@asc.sps.mot.com> writes:
> > I read this and thought "Bah hah - that's funny, but now I get it!"
> > 
> > Then I did this:
> > 
> >   perl -e 'for ($a=1, $a < 7, $a++){print;}'
> > 
> > Then I was confused again.  
> 
> This thread seems to surely deserve a JAPH based on it.  Here is my
> humble attempt.
> 
>  @JAPH = reverse split(/ /, "Just Hacker\n  Another Perl ", 3);
> 
>  for ($a=1, $a == 2, $a++){print $JAPH[$_]};
> 
> I was disappointed that I had to refer to $_ inside the for loop -
> there must be something more elegant, but I can't think of it.
> 
> (At least the use of $_ inside the loop does do something slightly
>  tricky at one point)

Perhaps a little more obfuscation by using $_ for some other purpose
before the loop?

-- 
  Kevin Reid.      |         Macintosh.
   "I'm me."       |      Think different.


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

Date: 14 Aug 1998 16:27:31 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: localtime showing wrong info
Message-Id: <6r1ohj$iid$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, 
    syarbrou@ais.net (Steve .) writes:
:Why does localtime show everything correctly except for the month.  My
:system clock is set to August, but it is showing 7 for the month
:number.  

Please read the standard documentation -- in particular, the perlfunc
manpage's discussion of a function.  Why can't people do this?
Or is Friday just readme day?

--tom
-- 
Pointers are sharp tools, and like any such tool, used well they can
be delightfully productive, but used badly they can do great damage
(I sunk a wood chisel into my thumb a few days before writing this).
    --Rob Pike


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

Date: Fri, 14 Aug 1998 16:17:06 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: NT: redirect stdout to file
Message-Id: <35D46302.80AA5DE6@inlink.com>

Gerhard Wrodnigg wrote:
> 
> Hello!
> 
> I tried to redirect stdout to a file
> 
> eg. sample.pl >output.txt
> but this doesn't work :(
> 
> How can I fix that?
> 
>  -mfg-ghw-

If I remember correctly, put the full path information, including the
drive letter, for your output file.

Like
sample.pl > c:/mydir/output.txt

If that doesn't work, sorry.  I am unable to test it out at the moment,
but I am sure it won't take but a second for you to...

Good luck,!

Brent
SEE YOU AT THE CONFERENCE!


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

Date: 14 Aug 1998 17:29:27 GMT
From: wings <xuchu@iscs.nus.edu.sg>
Subject: Re: Parsing Word to ASCII
Message-Id: <6r1s5n$a1s9@id4.nus.edu.sg>

Alastair <alastair@psoft.co.uk> wrote:
: Finn Calabro <fcalabro@aisvt.bfg.com> wrote:
:>I'm looking for a script that will convert ms Word 97 documents to
:>ascii.  They eventually need to be in HTML, but I can get them from
:>ascii to html.  Thanks
:>

why not just use MS Word97's 'save as HTML' function?
-- 
wings
------
World is a book, those dont travel read only one page.

Email: xwings@usa.net, xuchu@iscs.nus.edu.sg
ICQ UIN: 1440319
http://gump.iscs.nus.edu.sg


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

Date: Fri, 14 Aug 1998 17:03:33 GMT
From: aschneid@cmp.com
Subject: Perl and NT and SQLServer
Message-Id: <6r1ql4$t33$1@nnrp1.dejanews.com>

Where can I get a version of Perl for NT and (more importantly) where/how I
can tap into a SQLServer 6.5 database using Perl. I use Perl 5 on solaris and
access our Oracle database using OraPerl. Does something like that exist for
NT/SQLServer??

Any help is greatly appreciated.

Please reply to aschneid@cmp.com

Thanks

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


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

Date: Fri, 14 Aug 1998 16:56:17 GMT
From: jevon@my-dejanews.com
Subject: Perl DBM stuff.. (I searched the archives)
Message-Id: <6r1q7h$st1$1@nnrp1.dejanews.com>

I went through all the archives and everything by cannot find any solid
examples of Read/Write/Modify/Delete functions in perl that do not use any
moduals.. I would just like to see the code, straight up, that can do those
witha PERL DBM (dbmopen() dbmclose() ) and such...

Could someone help me?

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


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

Date: Fri, 14 Aug 1998 10:28:37 -0600
From: Matt Grommes <mpgromm@sandia.gov>
Subject: Perl install problems
Message-Id: <35D465B5.F93D9C99@sandia.gov>

Hi,
 I'm trying to compile Perl 5.005 on Linux kernel 2.0.31 (I know, I
should upgrade) and I'm having problems getting it to compile with
loadable module support. I compiled my kernel with loadable module
support and when going through the install it tells me it found the -ld
switch for gcc but when the configure runs the test program it can't
compile and aborts. When I run the configure again and tell it to leave
out the -ld, it works fine, but with no loadable module support. I'm
afraid I don't know too much about the intricasies of gcc so this may
not even be the problem but I'd _really_ like to be able to work with
Perl on my home system instead of telneting to my school everytime I
want to code something.  I've read the INSTALL and a bunch of other FAQs
but didn't find anything I thought would help. If someone could point me
in the direction of a listing of what I need to tell the configure to
get loadable module support working, I'd greatly appreciate it.
Thanks in advance.

-- Matt Grommes
-- www.nmt.edu/~mattg



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

Date: Fri, 14 Aug 1998 17:45:29 GMT
From: Scott.L.Erickson@HealthPartners.com (Scott Erickson)
Subject: Re: Perl Style
Message-Id: <35d46071.2601672286@news.mr.net>

Previously, Tom Christiansen <tchrist@mox.perl.com> wrote:

> [courtesy cc of this posting sent to cited author via email]
>
>In comp.lang.perl.misc, 
>    Scott.L.Erickson@HealthPartners.com (Scott Erickson) writes:
>:'||'.  If I remember correctly, somewhere in the Camel book it says
>:that Perl provides 'or', 'and', and 'not' as more readable
>:alternatives to '||', '&&', and '!'. Plus, by using those I usually do
>:not need to use parentheses.
>
>You obviously haven't been where I have.  When I see non-experts
>claiming that they should use "or" instead of "||", it bothers
>me, because they often write broken code like:

Are you intentionally obtuse? Where did I ever say "should"? I
generally use words like 'can', 'sometimes', 'it depends'. I rarely
use the word 'should'. And if it bothers you when a 'non-expert' says
'they should use this or that', then complain to them.

>And "more readable" is dubious at best.  I don't expect non Perl
>programmers to be able to read *OR MAINTAIN* Perl code until they bother
>themselves to learn the langauge.

If you find that it is not "more readable" for you, then do not use
it. I, however, do find it more readable and will continue to use it.
Do you have a problem with that? It seems that way.

>Anyone who thinks "or" is more legible than "||", or "BEGIN" is more
>legible than "{", should go try playing the calculus without recourse
>to any symbolic notation.

What about calculus? If I was doing calculus, I would use math
notation. But I am not, I am use Perl, so I will use Perl language
constructs.

>Man is, above all, the creature that abstracts -- the creature that
>symbolizes.  Enough with dinosaur programming already.  If you want Cobol,
>you know where to find it.

So, are you unable to abstract out 'or' as a possible substitute for
'||' in some situations? Sort of seems that way.

Scott.



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

Date: 14 Aug 1998 16:57:20 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: perl version
Message-Id: <6r1q9g$gms$3@marina.cinenet.net>

Peter Richmond (peter@richmd.demon.co.uk) wrote:
: This is probably a silly question to ask in this NG..

Not as silly as perhaps 40% of the posts, actually.  Though you could
easily have found out for yourself.

: How do find out what version of Perl is installed in the machine?

> perldoc perlrun | grep version             
          the digits.  For example, if you have a version of find
                 32  c  String/numeric conversions               
     -v   prints the version and patchlevel of your Perl         

If you have the misfortune to be running Perl on a system where you can't
get to a shell to do 'perl -v' (e.g., you're interested in determining
what version of Perl scripts are run under on a remote NT web server),
write a little CGI script which prints out the special variable $], which
contains the version number.

For my own use in such circumstances, I've written a CGI script called
'perldiag.pl' which prints out the version, @INC list, and environment
variables.  When starting work on a new remote NT server, the first thing
I do is upload perldiag.pl to (a) confirm I can do CGI there and (b) scope
out the Perl and environmental territory.

HTH...

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


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

Date: Fri, 14 Aug 1998 16:20:04 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: perl4.036
Message-Id: <Pine.GSO.4.02.9808140916460.10161-100000@user2.teleport.com>

On Fri, 14 Aug 1998 rook_ki@hotmail.com wrote:

> I've been trying to compile perl4.036 on Solaris 2.5.1 for the last 2
> days with no luck.

I can sympathize. I've been trying to get my whale-oil lamps to run on
batteries for ten years now. :-)

Perl4.036 isn't like wine; it hasn't improved with aging. Install a
version of Perl which was released within the last year or so and you'll
probably have an easier time of it. Good luck!

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



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

Date: Fri, 14 Aug 1998 10:34:31 -0700
From: "Leo Liou" <leoliou@pacbell.net>
Subject: problem with activate perl 5.,003_07 PERL_VERSION
Message-Id: <6r1sca$12d$1@nntp2.ba.best.com>

"use Win32::Registry" caused error "Win32::Registry 1 required--this is only
version (undef) at ....".  Problem looks like Win32::Registry wants at least
5.001 and current perl version is undefined.  However, perl -v yields "This
is perl, version 5.003_07" and perl -e "print $];" yields 5.00307.   I am
lost.  What happened?  Can anyone help?




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

Date: Fri, 14 Aug 1998 10:29:12 -0700
From: "Leo Liou" <leoliou@pacbell.net>
Subject: problem with Win32::Registry
Message-Id: <6r1s2b$u1$1@nntp2.ba.best.com>

How does one step through all subkeys and values in a RegsitryObject?  What
are the methods?
Thanks.




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

Date: Fri, 14 Aug 1998 10:33:57 -0700
From: Joseph Norris <sirron@mail.mcoe.k12.ca.us>
Subject: pulling an attached file with perl script in .forward
Message-Id: <35D47505.20F71547@mail.mcoe.k12.ca.us>

Hello group,

I have written scripts that I use in the .forward file as a filter for
emails to pull specific pieces of data from the message section of the
email but I have not explored how to access an attached file via the
filter script. Has anyone done this? Can it be done? Please advise.

Thanks again!
--
Joseph Norris (Perl - what else is there?/Linux/CGI/Mysql)
print @c=map chr
$_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,
-68,4,-3,-1,7,1,14,-68,6,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);




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

Date: Fri, 14 Aug 1998 13:05:27 -0400
From: "Steve Bohler" <skbohler@sprynet.com>
Subject: Recommend a good editor
Message-Id: <6r1qlj$90f@sjx-ixn1.ix.netcom.com>

I've searched through previous posts, but am not finding a recommendation
for an easy-to-use Perl editor that runs on Windows.  I've used emacs
before, but was wondering if there was something better.

Thanks in advance for any suggestions.
Steve




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

Date: Fri, 14 Aug 1998 16:09:47 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Searching/keeping strings split across lines.
Message-Id: <Pine.GSO.4.02.9808140908560.10161-100000@user2.teleport.com>

On Fri, 14 Aug 1998, Michele Guidoni wrote:

> How can I search for and keep text that is SOMETIMES split across
> lines?

Maybe you want the /s modifier, or maybe the /m modifier, or maybe both.
See perlre and perlop. Hope this helps!

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



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

Date: 14 Aug 1998 16:48:49 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Substitution
Message-Id: <6r1pph$gms$2@marina.cinenet.net>

Ollie Cook (oliver.REMOVE.cook@bigfoot.DELETE.com) wrote:
: I'm trying to map all forward-slashes in a scalar to underscores.
: Looking at my Perl book, Learning Perl, published by O'Reilly I
: thought the code
: 
: $file =~ s/\//_/;

You've got a bad case of LTS ("Leaning Toothpick Syndrome").  Why not
choose an alternate delimiter which allows you to avoid LTS?

  $file =~ s!/!_!;

That's a lot easier to read, I think.

: would do the trick, but this only does the first forwardslash and
: leaves the rest. I'm obviously doing something very stupid.

Yes, not reading the manual (including online docs).  See perlop and
perlre, concentrating on the /g modifier.

Still better, when doing a character-to-character transformation like
this, use tr/// instead:

  $file = tr!/!_!;

This is much more efficient.

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


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

Date: 14 Aug 1998 16:05:56 GMT
From: bem@news.cmc.net (brian moore)
Subject: Re: year 2000 delete question
Message-Id: <slrn6t8o3d.isg.bem@thorin.cmc.net>

On Fri, 14 Aug 1998 15:50:23 GMT, 
 Steve . <syarbrou@ais.net> wrote:
> I have a script in which finishes up by deleting all files older than
> 90 days on a Solaris box.  The line is:
> 
> find /home/cpws/cpws/archive -name "*.gz" -mtime +90 -exec rm {} \;

I don't see any perl there.

> Anything I should worry about when the year 2000 hits?  Thanks.

Yes, you should make sure you have lots of fresh water and food as well
as weapons (both small and large calibre) and ammo.

-- 
Brian Moore                             Kill A Spammer For Jesus
Sysadmin, C/Perl Hacker, Usenet Vandal 


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

Date: Fri, 14 Aug 1998 16:30:28 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: year 2000 delete question
Message-Id: <Pine.GSO.4.02.9808140929000.10161-100000@user2.teleport.com>

On Fri, 14 Aug 1998, Steve . wrote:

> I have a script in which finishes up by deleting all files older than
> 90 days on a Solaris box.  The line is:
> 
> find /home/cpws/cpws/archive -name "*.gz" -mtime +90 -exec rm {} \;
> 
> Anything I should worry about when the year 2000 hits?

Sure, you'll be at least a year older and your life insurance will
probably get more expensive. But why are you asking this question in a
Perl newsgroup? Your example doesn't use Perl at all!

But maybe you want to see the Perl FAQ? Hope this helps!

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



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

Date: 14 Aug 1998 16:59:45 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: year 2000 delete question
Message-Id: <6r1qe1$gms$4@marina.cinenet.net>

Steve . (syarbrou@ais.net) wrote:
: I have a script in which finishes up by deleting all files older than
: 90 days on a Solaris box.  The line is:
: 
: find /home/cpws/cpws/archive -name "*.gz" -mtime +90 -exec rm {} \;
: 
: Anything I should worry about when the year 2000 hits?  Thanks.

Yes, you should worry if you're still asking non-Perl questions on a Perl
newsgroup.

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


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

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


Administrivia:

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

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


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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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

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

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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


------------------------------
End of Perl-Users Digest V8 Issue 3448
**************************************

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