[7939] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1564 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 1 21:07:45 1998

Date: Thu, 1 Jan 98 18:00:21 -0800
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, 1 Jan 1998     Volume: 8 Number: 1564

Today's topics:
     Re: Avoiding regular expressions (was: Re: Newbie quest (John Moreno)
     Re: Avoiding regular expressions (was: Re: Newbie quest <*@qz.to>
     Re: bulk mail (Michael Budash)
     Re: File test operators <rootbeer@teleport.com>
     flock() and guestbooks (Roger Musson)
     Re: flock() and guestbooks <rootbeer@teleport.com>
     Re: Going multiple directions from a list of checkboxes <bowlin@sirius.com>
     Help Upgrading Perl (Adam Donahue)
     Re: Help with Filehandles <bowlin@sirius.com>
     Re: Need script to preview form data prior to submittin (Michael Budash)
     Re: Perl not Y2K compliant <rootbeer@teleport.com>
     Re: Perl not Y2K compliant (John Moreno)
     Re: Perl not Y2K compliant <merlyn@stonehenge.com>
     Re: Perl not Y2K compliant (I R A Aggie)
     Re: Perl not Y2K compliant (Michael Fuhr)
     Re: Perl not Y2K compliant (Michael Budash)
     Re: Perl not Y2K compliant (Abigail)
     running perl on iis <hebert19@nwlink.com>
     Re: Search and replace questions (Pete Holsberg)
     Re: Simple(!) regular expression problem <*@qz.to>
     Re: Statistics::Descriptive yields error in AUTOLOAD <brannon@surf.usc.edu>
     Re: Win95 Perl (David Grove)
     Re: word wrap routine (Michael Budash)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 1 Jan 1998 16:19:00 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: Avoiding regular expressions (was: Re: Newbie question)
Message-Id: <1d26p7u.1ycbo7y1j67ibkN@roxboro-180.interpath.net>

Tom Phoenix <rootbeer@teleport.com> wrote:

> On Wed, 31 Dec 1997, Joseph Cotton wrote:
> 
> > I'm new to perl, too, and I retch at the sight of such code.  Can any
> > one of you nice perl nerds create a series of functions to format
> > strings and numbers, so I can format things like I am able to in some
> > more civilized languages, that is, with out the use of a tilde and
> > slashes =~s/u/c/k/s;  I am not judgemental, this is just my own humble
> > opinion.  I believe in "each to his own", and I could be much more
> > productive without tildes.  

If your retching at the sight of code using regular expressions you need
to switch to another language as regular expressions are the heart of
perl.

> When I teach my classes about Perl, I always explain that hashes and
> regular expressions are fundamentally important parts of Perl. If you're
> not using both of those in virtually every page of every program you
> write, you're not really "thinking in Perl".

I haven't done any large projects in perl, but I've hardly ever needed
to use a hash, OTOH I don't have a single script that goes for a dozen
lines (non-setup) without using a regular expression of some sort.

> Sure, you can (and often should) avoid using regular expressions for many
> tasks. But they're often the best way to say exactly what you want to do.
> (OTOH, have you tried index and substr? Those are more like what you may
> be used to using in "some more civilized languages". :-) 
> 
> Perl isn't the right language for everyone; maybe you should consider
> learning another language that better suits the way you think.

I wouldn't put it this way - instead I'd say that perl isn't the right
language for every task, would you want to write Illustrator in it?

Although perl might not be the right language for everyone it is the
right tool for certain task - whether the writer likes it or not.  Any
task that depends heavily on pattern matching or hashes is probably best
done in perl.  Any task which doesn't use either is probably not
suitable for perl.

-- 
John Moreno


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

Date: 1 Jan 1998 23:47:31 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: Avoiding regular expressions (was: Re: Newbie question)
Message-Id: <qz$9801011838@qz.little-neck.ny.us>

John Moreno <phenix@interpath.com> wrote:
> Tom Phoenix <rootbeer@teleport.com> wrote:
> > On Wed, 31 Dec 1997, Joseph Cotton wrote:
> > > I'm new to perl, too, and I retch at the sight of such code.  Can any
 ...
> If your retching at the sight of code using regular expressions you need
> to switch to another language as regular expressions are the heart of
> perl.

In defense of Joseph, the particular s/// command provided for this
was really bad. A tr//d would be much better for the same effect, and
a better s// would be better (IMHO) for the desired task.

> > Perl isn't the right language for everyone; maybe you should consider
> > learning another language that better suits the way you think.
> I wouldn't put it this way - instead I'd say that perl isn't the right
> language for every task, would you want to write Illustrator in it?

Well perl does not have good GUI hooks, so that does hinder it for 
Illustrator. On the other hand, the string processing might be good
for that postscript in Illustrator files.

troff is the one even Larry has commented would be tough.

> Although perl might not be the right language for everyone it is the
> right tool for certain task - whether the writer likes it or not.  Any
> task that depends heavily on pattern matching or hashes is probably best
> done in perl.  Any task which doesn't use either is probably not
> suitable for perl.

How much pattern matching is involed in the typical guest book CGI?

Elijah
------
has never written CGI code


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

Date: Thu, 01 Jan 1998 16:57:09 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: bulk mail
Message-Id: <mbudash-0101981657100001@d67.pm9.sonic.net>

In article <68fd2s$3g8@bgtnsc02.worldnet.att.net>, comdog@computerdog.com
(brian d foy) wrote:

>> 
>> sendmail questions are best asked in alt.fan.e-t-b
>> 

interesting...eli has his own newsgroup? guess i'll subscribe and check it
out...thanks! (don't worry, brian, i'll lurk a _long_ time before i post!)

-- 
Michael Budash, Owner * Michael Budash Consulting
mbudash@sonic.net * http://www.sonic.net/~mbudash
707-255-5371 * 707-258-7800 x7736


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

Date: Thu, 1 Jan 1998 12:52:49 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Sefi Kraemer <skraemer@iil.intel.com>
Subject: Re: File test operators
Message-Id: <Pine.GSO.3.96.980101125116.19455M-100000@user2.teleport.com>

On Wed, 31 Dec 1997, Sefi Kraemer wrote:

> I am trying to search for files with the * operator, but am unable to do
> so. 

Although Perl has a * operator, it doesn't search for files. :-)

> Here is what I tried:
> 
> push @host_list,$host if (-e "$DB_Path/$server*");

That looks for a file with a literal asterisk in the name. It sounds as if
you want to use globbing, so check out the glob() function in the perlfunc
manpage. 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: Thu, 01 Jan 1998 22:43:51 GMT
From: hw@netcomuk.co.uk (Roger Musson)
Subject: flock() and guestbooks
Message-Id: <34ac1968.23280503@nntp.netcomuk.co.uk>

Typical guestbook scenario, open the current guestbook and update with
the new entry:
open (FILE, "guest.html"); # for read
@lines=<FILE>;
close FILE;
open (FILE, ">guest.html"); # for writing
# read through array writing new entry and rest of lines.
close FILE;

Is this the preferred method or is there a better method that involves
flock().

TIA
Roger Musson

Please delete NoJunkEmail from return email.


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

Date: Thu, 1 Jan 1998 17:28:38 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Roger Musson <hw@netcomuk.co.uk>
Subject: Re: flock() and guestbooks
Message-Id: <Pine.GSO.3.96.980101172714.19455Y-100000@user2.teleport.com>

On Thu, 1 Jan 1998, Roger Musson wrote:

> open (FILE, "guest.html"); # for read

Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file.

> Is this the preferred method or is there a better method that involves
> flock(). 

Locking is the better method by far.

I think you could use the methods in Randal's fourth Web Techniques
column, which explains how to use flock() to avoid problems when multiple
processes need to modify one file. Hope this helps! 

   http://www.stonehenge.com/merlyn/WebTechniques/

-- 
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: Thu, 01 Jan 1998 14:16:09 -0800
From: Jim Bowlin <bowlin@sirius.com>
To: Keith Sullivan <sull@au13.ecn.purdue.edu>
Subject: Re: Going multiple directions from a list of checkboxes
Message-Id: <34AC15A9.31E55077@sirius.com>

Keith Sullivan wrote:
> 
> I am creating a web based evaluation form.  As part of this project, I present
> a list of check boxes to the user.  They can choose any number of them.
> Checking a box will bring up a series of questions about that topic.  I have
> it working as long as the user only checks one box.  However, I want it to
> work if the user checks more than one box.  So, I need to go one way if a box
> is checked, then return and check if any other boxes were checked, and then
> go in a different direction.

Try using hidden fields containing all the boxes that have been checked but
not serviced.


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

Date: 2 Jan 1998 00:10:45 GMT
From: donahue@acf2.nyu.edu (Adam Donahue)
Subject: Help Upgrading Perl
Message-Id: <68hba5$piu$1@news.nyu.edu>

Hi all,

I just took over a machine running Perl 5.003, and I'm having a heck of a
time upgrading to Perl 5.004.  I always get errors during the make.  First
it was an "ar not found" error, so I put in its absolute path.  Now I'm
getting an error like this:

gcc  -L/usr/local/lib -L/opt/local/lib -L/opt/gnu/lib -L/opt/GNU/lib -o
miniperl miniperlmain.o libperl.a -lsocket -lnsl -ldl -lm -lc -lcrypt
Undefined                       first referenced
 symbol                             in file
do_aspawn                           libperl.a(pp_sys.o)
do_spawn                            libperl.a(pp_sys.o)
ld: fatal: Symbol referencing errors. No output written to miniperl
make: *** [miniperl] Error 1

I'm new at this, so all this compilation stuff is giving me a headache.
Is there a quick and dirty way to just install the thing without two
hundred different questions? <smile>  I actually don't mind going through
the standard install--that is, without the -d, which didn't help--I'm just
getting frustrated here.  I would really appreciate any help.

If it matters, I'm on Solaris 2, and I'm using gcc for compilation.

Thanks in advance,
Adam

-- 



Adam Donahue / mailto:adam@cyber-guru.com



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

Date: Thu, 01 Jan 1998 13:56:08 -0800
From: Jim Bowlin <bowlin@sirius.com>
To: "Edwin S. Ramirez" <ramirez@doc.mssm.edu>
Subject: Re: Help with Filehandles
Message-Id: <34AC10F8.2ED4FA52@sirius.com>

How about using the select(,,,) function?

Edwin S. Ramirez wrote:
> 
> Hello,
> 
> I am having problems implementing an event driven program which blocks
> until data arrives in one of its file handles (STDIN or socket).  I
> tried to use the fcntl function to set the F_SETOWN flag which claims
> that it will signal with a SIGIO but it does not work.
> 
> fcntl(fileno(STDIN), F_SETOWN, $$);  -- Bad File Number
> 
> I have set a function to be triggered on SIGIO and SIGURG but neither
> one is triggered when input is sent.
> 
> Does anyone have any ideas?
> 
> Thanks,
> 
> Edwin S. Ramirez


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

Date: Thu, 01 Jan 1998 17:39:41 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: Need script to preview form data prior to submitting
Message-Id: <mbudash-0101981739410001@d67.pm9.sonic.net>

In article <34AA4476.20C8@infgen.com>, infogen@infgen.com wrote:

>> Hi,
>> 
>> I am looking for a perl script that will take the input from a form and
>> redisplay the data for the user to confirm or correct entered
>> information.  After they have confirmed the data entered I want to email
>> the results to the appropriate recipient. I have been a programmer for
>> many years but I am new to perl, so any help would be greatly
>> appreciated.
>> 
>> Thanks, and Happy New Year!

oh, for gosh sakes, still no reply to this question??

i'd write a 4 part cgi and use it instead of an html file containing a form:

NOTE: this is intended to be a skeleton, a jumping off point, not a
finished product, so unless it's _way_ off base, gimme a break and don't
jump down my throat, folks!!

part 1
------
parse input (if any). use CGI.pm or <god forbid> cgi-lib.pl

part 2 (optional)
------
validate input if "confirm" or "ok" have been passed in, noting any
errors. (more on these two values later)

part 3
------
if "confirm" passed in and there were no validation errors, process the
form data and exit the program

part 4
------
send the html containing form back to browser. set each of the form's
variables equal to the values passed into the program. announce any errors
found earlier in the program. name the [main] submit button variable "ok",
unless "ok" was passed into the program. in that case, name it "confirm".

that's the skeleton. there's all kinds of niceties that could be added.
i've used this logic lots of times and it works just fine.

good luck!

-- 
Michael Budash, Owner * Michael Budash Consulting
mbudash@sonic.net * http://www.sonic.net/~mbudash
707-255-5371 * 707-258-7800 x7736


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

Date: Thu, 1 Jan 1998 12:55:25 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: John Nagle <nagle@netcom.com>
Subject: Re: Perl not Y2K compliant
Message-Id: <Pine.GSO.3.96.980101125452.19455N-100000@user2.teleport.com>

On Thu, 1 Jan 1998, John Nagle wrote:

>   "gmtime" returns a two-digit year.  

RTFM.

-- 
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: Thu, 1 Jan 1998 16:19:04 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: Perl not Y2K compliant
Message-Id: <1d26q0t.19ncgg81jnvfmsN@roxboro-180.interpath.net>

John Nagle <nagle@netcom.com> wrote:

>   "gmtime" returns a two-digit year.  Bad.  It's 1998 already.

John, I'm surprised that a programmer of your experience would say such
a thing.  Check the documentation of the of perl 5, and you'll see that
it returns the number of years since 1900.  Since all perl numbers are
double floats, I don't think we are going to have a problem with it
overflowing any time soon.

-- 
John Moreno


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

Date: 01 Jan 1998 15:13:57 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: nagle@netcom.com (John Nagle)
Subject: Re: Perl not Y2K compliant
Message-Id: <8cpvmb4zbu.fsf@gadget.cscaper.com>

>>>>> "John" == John Nagle <nagle@netcom.com> writes:

John>   "gmtime" returns a two-digit year.  Bad.  It's 1998 already.
John> 					John Nagle

Well, in Perl4, it always returned a 2-digit year.  But Perl5 returns
it as an offset from 1900, so in the year 2000, the number will be
100.

This is a good reason to upgrade from perl4 to perl5, because perl5
gets it right (he says, with tongue firmly in cheek :-).

And how do people read the docs, but *not* read the docs?  I'm always
puzzled by this.  How do you know enough to know that gmtime returns
the year as parameter 5, but miss this BIG PARAGRAPH right below
it on the manpage that says...

             All array elements are numeric, and come straight
             out of a struct tm.  In particular this means that
             $mon has the range 0..11 and $wday has the range
             0..6 with sunday as day 0.  Also, $year is the
             number of years since 1900, not simply the last two
             digits of the year.

Yes.  Notice that last sentence.  How do you miss that?

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 242 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Thu, 01 Jan 1998 17:21:12 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Perl not Y2K compliant
Message-Id: <-0101981721120001@aggie.coaps.fsu.edu>

In article <nagleEM4AyG.LzG@netcom.com>, nagle@netcom.com (John Nagle) wrote:

+   "gmtime" returns a two-digit year.  Bad.  It's 1998 already.

Really? you base this assertion on what, exactly?

Try this: perldoc -f gmtime

  Also, $year is the number of years since 1900, I<not> simply the 
  last two digits of the year.

Hmmm...now that you've gone and embarrassed yourself, why don't you
see what 'perl -v' returns. If it sez something about v4.*, then you
_might_ want to download a more recent version...

James

-- 
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


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

Date: 1 Jan 1998 15:36:34 -0700
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: Perl not Y2K compliant
Message-Id: <68h5pi$4pg@flatland.dimensional.com>

fl_aggie@thepentagon.com (I R A Aggie) writes:

> In article <nagleEM4AyG.LzG@netcom.com>, nagle@netcom.com (John Nagle) wrote:
>
> +   "gmtime" returns a two-digit year.  Bad.  It's 1998 already.
>
> Really? you base this assertion on what, exactly?

Are you saying it's not 1998?  :->

-- 
Michael Fuhr
http://www.dimensional.com/~mfuhr/


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

Date: Thu, 01 Jan 1998 17:22:38 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: Perl not Y2K compliant
Message-Id: <mbudash-0101981722380001@d67.pm9.sonic.net>

in perlfaq.html#Does_Perl_have_a_year_20_probl i see:

  The date and time functions supplied with perl (gmtime and localtime)
  supply adequate information to determine the year well beyond
  2000 (2038 is when trouble strikes).

can someone explain why 2038 is such a magic number?

tia

-- 
Michael Budash, Owner * Michael Budash Consulting
mbudash@sonic.net * http://www.sonic.net/~mbudash
707-255-5371 * 707-258-7800 x7736


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

Date: 2 Jan 1998 01:18:46 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl not Y2K compliant
Message-Id: <slrn6aog6q.50c.abigail@betelgeuse.wayne.fnx.com>

John Nagle (nagle@netcom.com) wrote on 1584 September 1993 in
<URL: news:nagleEM4AyG.LzG@netcom.com>:
++   "gmtime" returns a two-digit year.  Bad.  It's 1998 already.
++ 

We still have programmers who can't read manuals.

Bad.

It's the last quarter of the century already.



Abigail
-- 
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'


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

Date: 2 Jan 1998 00:48:12 GMT
From: "Josh Hebert" <hebert19@nwlink.com>
Subject: running perl on iis
Message-Id: <01bd1717$a24724a0$928614d1@nwlink.com>

I want to run perl on my iis3 where can I get info on how to acquire a
version of perl for NT, an interpreter, and install info.  Thanks



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

Date: 1 Jan 1998 17:26:18 -0500
From: pjh@mccc.edu (Pete Holsberg)
Subject: Re: Search and replace questions
Message-Id: <68h56a$296@tecoma.mccc.edu>
Keywords: just another new york perl hacker

Tom Phoenix suggested some simplifications but the major
substitution still doesn't work! The problem is a plus
sign.

#!/usr/local/bin/perl -w

print "What file do you want to edit? ";
$file = <STDIN>;
chop($file);

open(IN, $file) || die "Couldn't open $file";
open(OUT, ">tmp") || die "Couldn't open tmp";

my $url1 = "<a href='/cgi-bin/htgrep.cgi/isindex=";
my $url2 = "&file=/SCHED/spr/msched.html&style=pre'>";

while(<IN>)
{
    if ($_ =~ /(SIZE=\+1>)([A-Z]{2}) (\d{3})/)
    {
# 	$1 is SIZE=+1>

#--#	Because I use $1 in the replacement string,	
#--#	the "+" gets interpreted there as a
#--#	metacharacter. Therein lies the problem!

#	$2 is the two course letters
#	$3 is the three course numbers

	$search = "$1$2 $3";
	$repl = "$1$url1$2$3$url2$2 $3<\/a>";

        s/$search/$repl/;

        print OUT $_;
    }
    else
    {
        print OUT $_;
    }
}

close(IN);
close(OUT);

system("mv tmp $file");

===========


How do I get the "+" in the $repl to be treated as an
ordinary character?

Thanks,
Pete


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

Date: 2 Jan 1998 00:06:30 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: Simple(!) regular expression problem
Message-Id: <qz$9801011859@qz.little-neck.ny.us>

Tom Phoenix  <rootbeer@teleport.com> wrote:
> On Thu, 1 Jan 1998, Eric Bohlman wrote:
> > Dashes have a special meaning inside regular expressions.  
> Not really.

Only (sometimes) in character classes.

> > That's what's causing your problem. 
> I don't think so.

Speak with more confidence, Tom, you *know* that is not the problem. :^)

> > : if (/\b$reqinput\b/ =~ /\b$reqmatch\b/) {print "matched\n";}
> > : else {print "no match\n";}
> > This one is syntactic garbage, 
> No, it isn't. (Although it's not likely to be what anyone actually wants.) 

Heh.

> > and perl should complain about it.  
> I'd say that you're right about that. Patches welcome! :-)

with "perl -w" it gives a hard to understand warning already.

Elijah
------
wondering how many novices would figure out what the "uninitalized value" is


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

Date: 01 Jan 1998 13:35:27 -0800
From: Terrence Brannon <brannon@surf.usc.edu>
To: colink@latticesemi.com (Colin Kuskie)
Subject: Re: Statistics::Descriptive yields error in AUTOLOAD
Message-Id: <lbzplfkhcw.fsf@surf.usc.edu>


: Since you haven't responded to my earlier email, I'm going to assume
: that you're on Christmas break, as someone from USC might be at this
: time, but let me repost my email here so that other people can also
: learn what kind of information is useful is this case and I can look
: like a responsible module maintainer :)
: 
: 1) Your version of perl (the output from perl -v)
---------------
Hi, thank you for your dedication to your module. I am running the
perl that comes with Debian 1.31:


brannon@surf ~/rs/golomb97:paroxysmal : perl -v

This is perl, version 5.003_07

Copyright 1987-1996, Larry Wall

        + two suidperl security patch
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5.0 source kit.

You have mail in /var/spool/mail/brannon
brannon@surf ~/rs/golomb97:paroxysmal : 


: 2) Which version of Statistics::Descriptive you're using
:    (from inside the module)
----------------
package Statistics::Descriptive;

 ...

require 5.002;
$VERSION = '2.1';

: 3) You sent lots of detail about the error, but in this case, I
:    need more context.  In particular, how much data are you working
:    with?  How many loop iterations are you going through?  

3128 data files with 2500 floating point numbers per file

I am using File::Find to traverse the tree. I go down each directory
with the name gmax_GLU=[0-9]* and then into each subdirectory. Here's
one limb of the data tree fully expanded:

  /newport/freeway/brannon/rs/p-and-s/Data/mean-sdev-ampa-nmda:hz=20:
  total 10148
  drwxr-xr-x   8 brannon  dip          2048 Dec 22  2017 .
  drwxr-xr-x  22 brannon  root         1024 Nov 25 11:18 ..
  drwxr-xr-x   2 brannon  dip          1024 Dec  1 14:34 .cache
  -rw-r--r--   1 brannon  dip          3798 Dec 10 17:48 .index.js
  -rw-r--r--   1 brannon  dip          3252 Dec 10 17:48 .index.pl
  -rw-r--r--   1 brannon  dip          1430 Dec 10 17:48 .index1.html
  -rw-r--r--   1 brannon  dip           277 Dec 10 17:48 .index1.map
  -rw-r--r--   1 brannon  dip           959 Dec 10 17:48 .indexdir.html
  -rw-r--r--   1 brannon  dip           178 Dec 10 17:48 .indexjs.html
  -rw-r--r--   1 brannon  dip         85992 Dec 22  2017 P=0.gif
  -rw-r--r--   1 brannon  dip            71 Dec 10 13:04 ary-set
  -rw-r--r--   1 brannon  dip           253 Nov 26 13:33 ary-set~
  -rw-------   1 brannon  dip       4935680 Dec 22  2017 core
  -rwxr-xr-x   1 brannon  dip           102 Dec  6 11:28 find-test
  drwxr-xr-x  42 brannon  dip          2048 Dec  3 18:28 gmax_GLU=1.000000e-04
  drwxr-xr-x  42 brannon  dip          2048 Dec  2 17:23 gmax_GLU=2.000000e-04
  drwxr-xr-x  42 brannon  dip          2048 Dec  3 16:26 gmax_GLU=3.000000e-04
  drwxr-xr-x  42 brannon  dip          2048 Dec  3 15:25 gmax_GLU=4.000000e-04
  drwxr-xr-x  42 brannon  dip          2048 Dec  2 16:22 gmax_GLU=5.000000e-04
  -rw-r--r--   1 brannon  dip          1629 Dec 10 17:48 index.html
  -rw-r--r--   1 brannon  dip            24 Dec  1 14:10 index.html~
  -rw-r--r--   1 brannon  dip           257 Dec 10 17:48 indexjs.html
  -rw-r--r--   1 brannon  dip        658479 Dec 22  2017 mean-P=0.gif
  -rw-r--r--   1 brannon  dip        658479 Dec 22  2017 mean-P=1.gif
  -rw-r--r--   1 brannon  dip        658479 Dec 22  2017 mean-S=0.gif
  -rw-r--r--   1 brannon  dip        658479 Dec 22  2017 mean-S=1.gif
  -rw-r--r--   1 brannon  dip            98 Dec  3 13:34 new-ary-set
  -rw-r--r--   1 brannon  dip          1134 Dec 22  2017 new-sdev
  -rw-r--r--   1 brannon  dip          1058 Dec 22  2017 new-sdev~
  -rw-r--r--   1 brannon  dip        658479 Dec 22  2017 sdev-P=0.gif
  -rw-r--r--   1 brannon  dip        658479 Dec 22  2017 sdev-P=1.gif
  -rw-r--r--   1 brannon  dip        658479 Dec 22  2017 sdev-S=0.gif
  -rw-r--r--   1 brannon  dip        658479 Dec 22  2017 sdev-S=1.gif
  -rw-r--r--   1 brannon  dip            22 Dec 22  2017 test

  /newport/freeway/brannon/rs/p-and-s/Data/mean-sdev-ampa-nmda:hz=20/gmax_GLU=1.000000e-04:
  total 67
  drwxr-xr-x  42 brannon  dip          2048 Dec  3 18:28 .
  drwxr-xr-x   8 brannon  dip          2048 Dec 22  2017 ..
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=0.000000,S=0.000000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=0.000000,S=0.100000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=0.000000,S=0.200000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=0.000000,S=0.300000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=0.000000,S=0.400000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=0.000000,S=0.500000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=0.000000,S=0.600000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=0.000000,S=0.700000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=0.000000,S=0.800000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=0.000000,S=0.900000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=0.000000,S=1.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.100000,S=0.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.100000,S=1.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.200000,S=0.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.200000,S=1.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.300000,S=0.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.300000,S=1.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.400000,S=0.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.400000,S=1.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.500000,S=0.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.500000,S=1.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.600000,S=0.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.600000,S=1.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.700000,S=0.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.700000,S=1.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.800000,S=0.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.800000,S=1.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.900000,S=0.000000
  drwxr-xr-x   2 brannon  dip          1024 Dec 22  2017 P=0.900000,S=1.000000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=1.000000,S=0.000000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=1.000000,S=0.100000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=1.000000,S=0.200000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=1.000000,S=0.300000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=1.000000,S=0.400000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=1.000000,S=0.500000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=1.000000,S=0.600000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=1.000000,S=0.700000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=1.000000,S=0.800000
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 P=1.000000,S=0.900000
  drwxr-xr-x   2 brannon  dip          3072 Dec 22  2017 P=1.000000,S=1.000000

  /newport/freeway/brannon/rs/p-and-s/Data/mean-sdev-ampa-nmda:hz=20/gmax_GLU=1.000000e-04/P=0.000000,S=0.000000:
  total 4768
  drwxr-xr-x   2 brannon  dip          2048 Dec 22  2017 .
  drwxr-xr-x  42 brannon  dip          2048 Dec  3 18:28 ..
  -rw-r--r--   1 brannon  dip          8419 Dec  4 04:05 Spiketimes-cell-expt2-100-500-0.2-20-0-0-1328.gz
  -rw-r--r--   1 brannon  dip          8440 Dec  4 09:19 Spiketimes-cell-expt2-100-500-0.2-20-0-0-1618.gz
  -rw-r--r--   1 brannon  dip          8362 Nov 26 02:11 Spiketimes-cell-expt2-100-500-0.2-20-0-0-18.gz
  -rw-r--r--   1 brannon  dip          8486 Dec  8 03:13 Spiketimes-cell-expt2-100-500-0.2-20-0-0-314.gz
  -rw-r--r--   1 brannon  dip         35143 Dec  3 18:22 Spiketimes-cell-expt2-100-500-0.2-20-0-0-3266
  -rw-r--r--   1 brannon  dip          8439 Dec  4 19:05 Spiketimes-cell-expt2-100-500-0.2-20-0-0-4226.gz
  -rw-r--r--   1 brannon  dip          8270 Dec  5 21:24 Spiketimes-cell-expt2-100-500-0.2-20-0-0-4654.gz
  -rw-r--r--   1 brannon  dip          8285 Nov 26 07:34 Spiketimes-cell-expt2-100-500-0.2-20-0-0-4837.gz
  -rw-r--r--   1 brannon  dip          8404 Dec  4 13:47 Spiketimes-cell-expt2-100-500-0.2-20-0-0-5026.gz
  -rw-r--r--   1 brannon  dip          8295 Dec  4 08:55 Spiketimes-cell-expt2-100-500-0.2-20-0-0-5556.gz
  -rw-r--r--   1 brannon  dip          8558 Dec  4 03:41 Spiketimes-cell-expt2-100-500-0.2-20-0-0-5580.gz
  -rw-r--r--   1 brannon  dip          8415 Dec  3 18:43 Spiketimes-cell-expt2-100-500-0.2-20-0-0-6196.gz
  -rw-r--r--   1 brannon  dip          8273 Nov 25 21:24 Spiketimes-cell-expt2-100-500-0.2-20-0-0-6519.gz
  -rw-r--r--   1 brannon  dip          8306 Dec  3 23:22 Spiketimes-cell-expt2-100-500-0.2-20-0-0-7112.gz
  -rw-r--r--   1 brannon  dip          8422 Dec  7 08:14 Spiketimes-cell-expt2-100-500-0.2-20-0-0-7177.gz
  -rw-r--r--   1 brannon  dip          8452 Dec  5 06:00 Spiketimes-cell-expt2-100-500-0.2-20-0-0-7811.gz
  -rw-r--r--   1 brannon  dip          8464 Dec  4 14:35 Spiketimes-cell-expt2-100-500-0.2-20-0-0-8584.gz
  -rw-r--r--   1 brannon  dip          8263 Dec  3 23:00 Spiketimes-cell-expt2-100-500-0.2-20-0-0-9257.gz
  -rw-r--r--   1 brannon  dip         35143 Dec  6 14:08 Spiketimes-cell-expt2-100-500-0.2-20-0-0-9573
  -rw-------   1 brannon  dip       4657152 Dec 22  2017 core



: 
: Since the problem can't be reproduced by my test script (which I'll
: tack onto the bottom of this post) we may be running into a problem
: with Perl's garbage collection.  My gut instinct is that you're not
: running a completely safe version of perl.

It is working great now. I don't know why. But again, thank you for
your sincerity.

-- 
Terrence Brannon * brannon@lnc.usc.edu * http://lnc.usc.edu/~brannon
USC, HNB, 3614 Watt Way, Los Angeles, CA 90089-2520 * (213) 740-3397


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

Date: Thu, 01 Jan 1998 21:54:05 GMT
From: dgrove@ntslink.net (David Grove)
Subject: Re: Win95 Perl
Message-Id: <34ac0fbe.15092528@news.ntslink.net>

Oh the bliss of being a newbie. :)

Eddie,

It won't work without running a web server on your machine. You also
have to configure it. It isn't difficult, but you probably won't get
through it in one night.

I suggest getting Oreilly's WebSite server (free demo available) and
playing with it for a while.

NETSCAPE doesn't RUN the perl cgi. Neither does the #!/perl line
(which can be left out under windows). Neither does the Operating
System. The WEB server runs perl, and passes the html reslut back to
Netscape to display.

I fought with this for a while too.

A good book would be helpful. You got a B&N near you?

>I'm not running a web server locally on my PC. Do I have to??
>
>Eddie
>
>etta wrote:
>
>> What webserver are you using?
>>
>> Eddie Brown <eddie@NOSPAMMING.cs.odu.edu> wrote in article
>> <34AAF65B.D28129BC@NOSPAMMING.cs.odu.edu>...
>> > I have a html file on my Windows 95 box that calls a perl program:
>> >
>> > <form action="test.cgi" method="get">
>> >
>> > When I use Netscape locally on my win95 box, netscape displays
>> > the source instead of executing it. I made it so that .cgi files open
>> > with
>> > perl but then an externaal dos shell  spawns from netscape and executes
>> > it.
>> >
>> > ????
>> >
>> > I know that the top line of the program has to be changed from the unix
>> > path to a win95 path :
>> >
>> > #!/usr/bin/perl
>> >
>> > but  #!C:/bin/perl
>> >
>> > doesn't seem at all right.
>> >
>> > HELP!! :^)
>> >
>> > Thanks,
>> > Eddie
>> >
>> >
>
>
>



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

Date: Thu, 01 Jan 1998 17:01:00 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: word wrap routine
Message-Id: <mbudash-0101981701010001@d67.pm9.sonic.net>

In article <34AB06EE.5336@erols.com>, jcotton@erols.com wrote:

>> Opinion #2.  Perl is a language which took all the bad parts of C and
>> made them even worse.

Thim's fightin' wurds, pardnur!!

-- 
Michael Budash, Owner * Michael Budash Consulting
mbudash@sonic.net * http://www.sonic.net/~mbudash
707-255-5371 * 707-258-7800 x7736


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

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

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