[13360] in Perl-Users-Digest
Perl-Users Digest, Issue: 770 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Sep 12 11:07:40 1999
Date: Sun, 12 Sep 1999 08:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 12 Sep 1999 Volume: 9 Number: 770
Today's topics:
Re: baffle about flock() please help! <wyzelli@yahoo.com>
Re: Desperately searching for perl lint (Kai Henningsen)
Re: division by zero <gellyfish@gellyfish.com>
Re: Good databases for multi-variate timeseries data? holmberg@NoSpam.net
Re: Home command? <gellyfish@gellyfish.com>
Re: Newbie Q: Web Crawling <mike@crusaders.no>
Re: Perl / C Memory (Kai Henningsen)
Re: Perl and Threads (Kai Henningsen)
Re: Perl Compilation Roblems on RedHat 6.0 <jsmith@mcs.drexel.edu>
Re: Perl fails tests <jsmith@mcs.drexel.edu>
Re: Perl Language Reference <gellyfish@gellyfish.com>
Re: Possibly Simple problem? <gellyfish@gellyfish.com>
Re: s/// problem (Ken Hirsch)
Re: Simulating Carriage Returns (Kai Henningsen)
Re: suggestion to revise grep (another Q: reference com (Kai Henningsen)
Re: UNCRAP project proposal (Bbirthisel)
Re: win32 disk formatting <gellyfish@gellyfish.com>
Re: XML plus XSL to HTML? (Arved Sandstrom)
Re: Y2K bugs on the Internet <gellyfish@gellyfish.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 12 Sep 1999 21:19:15 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: baffle about flock() please help!
Message-Id: <_qMC3.8$I96.886@vic.nntp.telstra.net>
> > sleep(3600);
> > flock(FILE,LOCK_UN);
> > close(FILE);
>
> And of course that's a waste of at least one line of code. There's very
> little reason to ever explicitly unlock a file from Perl.
>
>
> Cheers!
>
> --
> Tom Phoenix Perl Training and Hacking Esperanto
> Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
>
That's interesting and something I never caught from the docs... is it
because the lock is released when the file is closed anyway?
Wyzelli
It is better to ask a stupid question and learn something than not ask it
and remain ignorant.
------------------------------
Date: 12 Sep 1999 11:14:00 +0200
From: kaih=7OhjWm7Xw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: Desperately searching for perl lint
Message-Id: <7OhjWm7Xw-B@khms.westfalen.de>
mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote on 11.09.99 in <7rdf0v$enk$1@pegasus.csx.cam.ac.uk>:
> Kai Henningsen <kaih=7ONAKd9Xw-B@khms.westfalen.de> wrote:
> >mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote on 31.08.99 in
> >><7qguiq$2ms$1@pegasus.csx.cam.ac.uk>:
> >> Nope. It's entirely deliberate. -w warnings aren't there just to
> >> harrass innocent programmers - they're there to catch common and/or
> >> dangerous mistakes.
> >
> >Well yes, so why doesn't Perl warn about unused my variables?
>
> That is already answered in the article you quote.
Not that I can see. It explains what -w is for, it doesn't explain why my
variables should be seen as different.
I can't see that it's any less common or dangerous a mistake.
Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
- Russ Allbery (rra@stanford.edu)
------------------------------
Date: 12 Sep 1999 12:10:43 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: division by zero
Message-Id: <7rg583$1tv$1@gellyfish.btinternet.com>
On Sat, 11 Sep 1999 22:52:38 -0600 RAGGMOPP wrote:
> A little help for a newbie:
>
> I am in the process of learning perl and really have just begun.
> I have written a simple and short little script that involves some math.
>
> Some of that math includes division and to make a long story short, it
> is possible
> to exit the loop and thereby do a division by zero. Not good.
>
Whilst it is probably best to avoid doing the division if the divisor
is zero by using some conditional statement (as others have pointed out)
under certain circumstances , for instance where the statement that will
give rise to the division by zero has some other side effect that you
want regardless, you might want to execute the statement but prevent it
from causing a fatal error.
In this case you might use 'eval' which will execute the statement and
trap the error whose value will be placed in the varioable $@;
E.G.
eval "100 / 0 ";
print $@;
for more information look at the perlvar manpage about $@ and the perlfunc
entry for eval().
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 12 Sep 1999 13:56:20 GMT
From: holmberg@NoSpam.net
Subject: Re: Good databases for multi-variate timeseries data?
Message-Id: <37dba4dc.1565809@news.tiac.net>
On 11 Sep 1999 14:14:19 -0500, abigail@delanet.com (Abigail) wrote:
>Really? If times are stored as units since an epoch, what makes times
>more special than oh, say, hairs on a persons body?
Hairs are rooted at a point. Time-intervals have beginning and ending points.
Since the time may be based on clocks possessing different properties
(like relative drift), there may be a need to perform some actions taking these
properties into account - particularly if those properties are subject to change
over time too (which is pretty ugly, but can happen -say with SW upgrades).
Time is a primary organizing factor. We are talking very large databases,
where most data is associated with time-intervals of varying lengths, where most
data has unique interval end-points. So builtin 'understanding' of
time-interval logic might add some value. Similarly, capabilities to perform
time-series like computations rapidly could be useful.
>I don't think Sybase or Oracle will have problems anywhere near the point
>you get into problems with your flat-files. Now, if you hit 10 million
>rows, and are using a lowly Sparc 4 with 500 users, you might notice a
>small hiccup. Of course, this has not much to do with Perl anymore.
Previous trials on various occasions with RDB aproaches have simply proven to
have data-processing rates that couldn't hold a candle to simple, flat-files
organized by time for major data processing purposes, particularly using similar
hardware bases for comparative fairness.
The issue is not hundreds of users making simple queries. The issue
is throughput when doing major computations against many records whose
time-intervals, say, start in or end in a defined time-interval - with some
special processing for boundary crossing intervals. Data that may grow by, say,
10M records or more/day. The primary focus is bulk data processing and some
'real-time' access. Time periods ranging from sub-day to much, much longer.
Being able to feed and process information at a high rate is very important. So
is managability, simplicity and scalability.
So, I figured that there may be some databases out there that are specialized to
this kind of data (you might think of it as telemetry data). I've seen
several attempts to leverage standard RDBs for handling this kind of data,
and the processing capabilities and rates have been far below what could
be established using far simpler methods - so the costs, particularly related
to the added complexity, haven't been worth it.
But perhaps times have changed, and there are systems that are simple, cost
effective and not bloated, and that can handle this kind of data in a manner
that can be favorably compared with what can be done by some rather
straight-forward programming. If that is the case, I'd be interested.
>
>
>Abigail
Carl
Antispam address: In order to reply, change NoSpam to tiac.
------------------------------
Date: 12 Sep 1999 13:03:43 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Home command?
Message-Id: <7rg8bf$1vl$1@gellyfish.btinternet.com>
On 12 Sep 1999 02:11:05 -0500 Steven Smolinski wrote:
>
> "Dan C. Rinnert" <dcr@canville.net> writes:
>
>> Does Perl have the equivalent of the HOME command of old computers; i.e.
>> something that will clear the screen and start printing at the top of
>> the newly cleared screen?
>
> Why not do this?
>
> perl -we 'system "clear";'
>
Because it might not work on any given system ?
As Abigail has already pointed out this is highly system dependant and
is also a FAQ please see perlfaq8:
How do I clear the screen?
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 12 Sep 1999 13:15:18 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: Newbie Q: Web Crawling
Message-Id: <BULC3.1281$rf1.7885@news1.online.no>
Crom <gn888@hotmail.com> wrote in message
news:37DB5CC9.DC7D2193@hotmail.com...
> I read some of the manuals and most of the examples are looking through
> a bunch of html files in a given directory. Is there an equivalent of
> Fileopen("d:\myfile.dat") like HttpOpen("http://www.targetsite.com/")?
> Then used some sort of a read to stuff it all into an array for
> processing?
Yes. You should take a look at the LWP-modules. If it's installed on your
system, you'll get a lot of useful info on using it with the command:
perldoc lwpcook
basically, you can fetch a webpage like this:
#!/local/bin/perl -w
use strict;
use LWP::Simple;
my $page = get("http://www.linpro.no/lwp/");
print $page;
__END__
--
Trond Michelsen
------------------------------
Date: 12 Sep 1999 11:58:00 +0200
From: kaih=7OhjZZ$mw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: Perl / C Memory
Message-Id: <7OhjZZ$mw-B@khms.westfalen.de>
dan@tuatha.sidhe.org (Dan Sugalski) wrote on 04.09.99 in <sf_z3.148$lT.809@news.rdc1.ct.home.com>:
> Sure it does. Unfortunately just because perl frees memory doesn't mean
> memory is returned back to the system. With very few exceptions (I think
> MacOS and, under a few circumstances, VMS) any memory allocated to a
> process by the OS stays with that process until it exits. This isn't a
> perl thing--any program that mallocs memory will do it.
Linux with glibc2 can also, I gather, return free()d memory to the OS.
The way to do that is to not use brk(), but instead use mmap() to get the
memory. Then you can munmap() it again.
People *really* interested in this might look at the relevant library
sources.
Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
- Russ Allbery (rra@stanford.edu)
------------------------------
Date: 12 Sep 1999 13:41:00 +0200
From: kaih=7OhmO-w1w-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: Perl and Threads
Message-Id: <7OhmO-w1w-B@khms.westfalen.de>
dan@tuatha.sidhe.org (Dan Sugalski) wrote on 09.09.99 in <8dTB3.79$wW2.2668@news.rdc1.ct.home.com>:
> How threads are implemented depends entirely on the threading library and
> OS you're using. On Linux, threads are pretty much processes. On VMS they
> aren't. On NT they're not either.
That's a distorted view of the Linux version. Understandable, though,
because that's how the feature evolved.
However, it's really the other way around. The basic primitive is clone(),
and fork is effectively clone() with a special combination of flags. (So
is vfork(). Well, plus one wait (for the child to exec()).)
With clone(), you can specify what should be shared between child and
parent, and what should be copied instead. Linuxthreads uses this to
implement pthreads - again with a special combination of flags.
It's a pretty elegant concept.
It's also not complete yet; pthreads really want some properties which
aren't supported just yet, and there is discussion on how best to do it.
(Including "if there's no good way to do it, it may be best to just forget
about it - pthreads were a commitee invention anyway".)
Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
- Russ Allbery (rra@stanford.edu)
------------------------------
Date: Sun, 12 Sep 1999 09:31:20 -0400
From: Justin Smith <jsmith@mcs.drexel.edu>
Subject: Re: Perl Compilation Roblems on RedHat 6.0
Message-Id: <37DBAB27.8255AF6A@mcs.drexel.edu>
Tom Phoenix wrote:
> On Thu, 9 Sep 1999 dckinder@mountain.net wrote:
>
> > I consistently fail one "make test" when compiling perl5.005_03 on
> > RedHat 6.0: "lib/anydbm FAILED at test 12"
>
> If that's your only trouble, and if you don't need the DBM routines, you
> could probably safely ignore that failure. But it's better to fix it, if
> you can.
>
> > This happens when I use all the defaults in the perl Configure. I
> > have also attempted specifically to state that gcc rather than cc is
> > the compiler, but this makes no difference.
>
> I suspect that your cc is gcc. But it doesn't sound like a compiler issue
> in any case. I'd guess that there's a problem with the library routines
> you're using for the DBM, or the way Perl is interfacing to them. Are you
> using gdbm or ndbm? Maybe you should change that: Just because Configure
> thinks it's a good default doesn't mean it's correct. You way find out
> something with a command like 'ls -l /usr/include/*dbm.h'.
>
I've had this problem too, but I don't think it is the DBM implementations:
libdb.so is a link to libgdb.so in Redhat 6.0. I downloaded the real latest
implementation
of Berkeley DB from www.sleepycat.com (it is free for non-commercial
applications) and
built a shared library and copied it over the link to libgdb.so.
When I compiled Perl I know it used this version of DB (from the log that the
Configure program printed out).
It STILL failed AnyDBM, test 12!
I think that, on Redhat 6.0, there is a problem in Perl itself --- somehow
the way it implements
tied hashes is broken... Something in Redhat 6.0 causes it to compile wrong
(without any error
messages) and this causes its access to tied hashes to fail.
--
______________________________________________________________________
|
Time blows wildly against my door | Justin R. Smith
Stirring discarded sorrows | Department of Mathematics and
Like dead leaves of summers past | Computer Science
Memories of forgotten lore | Drexel University
Making way for new tomorrows | Philadelphia, PA 19104
New hopes, new fears, |
and new ways that last | Office: (215) 895-1847
|
c Justin R. Smith, March 14, 1994 | Fax: (215) 895-1582
My home page: http://www.mcs.drexel.edu/~jsmith
------------------------------
Date: Sun, 12 Sep 1999 09:24:01 -0400
From: Justin Smith <jsmith@mcs.drexel.edu>
Subject: Re: Perl fails tests
Message-Id: <37DBA971.276D5B0B@mcs.drexel.edu>
Anno Siegel wrote:
> Justin Smith <jsmith@mcs.drexel.edu> wrote in comp.lang.perl.misc:
>
> >I heard (on another newsgroup) that there's something wrong with the db library in Redhat, so I downloaded
> >
> >the REAL Berkeley db implementation (from www.sleepycat.com) and tried to build BerkeleyDB.pm
> >
> >(the Perl hook into the current Berkeley DB) and the resulting perl STILL failed the AnyDB test!
>
>
I did that and Perl still fails the test AnyDBM! I suspect that the problem is more subtle than I
thought earlier: the DB implementations in Redhat are OK. The problem is in Perl itself --- somehow,
when it is built on Redhat, the part of it that implemtns tied hashes is broken so any extension that uses
them
will fail...
--
______________________________________________________________________
|
Time blows wildly against my door | Justin R. Smith
Stirring discarded sorrows | Department of Mathematics and
Like dead leaves of summers past | Computer Science
Memories of forgotten lore | Drexel University
Making way for new tomorrows | Philadelphia, PA 19104
New hopes, new fears, |
and new ways that last | Office: (215) 895-1847
|
c Justin R. Smith, March 14, 1994 | Fax: (215) 895-1582
My home page: http://www.mcs.drexel.edu/~jsmith
------------------------------
Date: 12 Sep 1999 12:20:33 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl Language Reference
Message-Id: <7rg5qh$1u2$1@gellyfish.btinternet.com>
On Sun, 12 Sep 1999 10:10:04 +0200 Martin McMahon wrote:
>
> Does anyone know where I can find a comprehensive Perl language reference?
> Thanks.
>
Er yes there is a vcery comprehensive set of documentation distributed
with Perl. On a properly configured Unix system you should be able
to use:
man perl
or otherwise (say on Win32)
perldoc perl
The Perl Pocket reference (published by O'reilly) is also available in
electronic form - you will be able to find that via <http://www.perl.com>.
/j\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 12 Sep 1999 12:59:56 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Possibly Simple problem?
Message-Id: <7rg84d$1vc$1@gellyfish.btinternet.com>
On Sat, 11 Sep 1999 15:26:58 -0700 David Amann wrote:
> John wrote:
>>
>> i have a very simple one file database, with fields seperated by tabs. Looks
>> much like this:
>>
>> 1 filename1 45
>> 2 filename2 52
>> 3 filename3 98
>>
>>
>> Ive been trying to think of how, but cant...to sort the records in order of
>> most hits to least...
>
>
> If you want to use perl though, try this:
>
> #!/usr/local/bin/perl -w
>
> use strict;
>
> open(LOG, "/path/to/log/file");
>
Please, please, please always check the success of an open *especially*
in example code.
> my ($record,$filename,$hits);
> my %hash;
>
> while(<LOG>) {
>
> ($record, $filename, $hits) = split(/\t/);
>
> $hash{$record}->{'Filename'} = $filename;
> $hash{$record}->{'Hits'} = $hits;
>
> }
>
> foreach my $index (sort by_hits keys %hash) {
>
> print "$index\t$hash{$index}->{'Filename'}\t$hash{$index}->{'Hits'}\n";
> }
>
> # End Main
>
> sub by_hits {
>
> $hash{$b}->{'Hits'} cmp $hash{$a}->{'Hits'};
> }
>
Ignoring the fact this is a FAQ this seems like a lot of bother over
nothing much really:
#!/use/bin/perl -w
use strict;
my @sorted = map { join "\t", @{$_} }
sort { $b->[2] <=> $a->[2] }
map { chomp; [split /\t/ ] } <DATA>;
print $_,"\n" foreach (@sorted);
__END__
1 filename1 45
2 filename2 52
3 filename3 98
4 filename4 10
5 filename5 78
6 filename6 15
Of course you will want to substitute an open filehandle for DATA here.
I would also recommend that you read the section in perlfaq4 entitled
How do I sort an array by (anything)?
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 12 Sep 1999 10:12:15 -0400
From: kenhirsch@myself.com (Ken Hirsch)
Subject: Re: s/// problem
Message-Id: <MPG.12457ea02cf65538989680@news.earthlink.net>
[This followup was posted to comp.lang.perl.misc and a copy was sent to
the cited author.]
In article <7rejhh$m29$1@fir.prod.itd.earthlink.net>, ab@cd.com says...
> First off, please don't scream at me for being a sorta newbie or not being
> super-de-duperee descriptive, I have been pushed away from this group due to
> previous rudeness by the members (no offense), but need help on this, so am
> trying once again to get help.
>
> Ok, I made a homepage community script, and as part of it, the script adds
> banner code to certain files. The banner code is set as:
>
> --code--
>
> $advert = "<SCRIPT LANGUAGE=\"javascript\">\n<!--\nwindow.open('$adurl',
> '_pj_ad', 'width=515,height=125');\n//-->\n</SCRIPT>";
>
> --end code--
>
> Then it is added to html documents as such (from various areas of coding
> which work together):
>
> --code--
>
> open(FILE,"$in{'loc'}\\$in{'current'}"); #opens document... i will add error
> coding, but i know it opens
> @file = <FILE>; #stores file to var
> close FILE; #closes file
>
> push(@file, ("\n","$advert")); #adds the ad to the file
>
> open(FILE,">$in{'loc'}\\$in{'current'}"); #opens document... i will add
> error coding, but i know it opens
> print FILE @file; #stores var to file
> close FILE; #closes file
>
> --end code --
I don't recommend rewriting files at all because you will lose
information if your program has a bug or it is interrupted for some
reason while you are writing it back.
Instead, keep a copy of the page without the banner and, when needed,
write it to the desired page location, adding the banner. When you want
to delete the banner, just copy again, this time without appending the
banner. Much easier as well as safer.
You do have to remember which copy of the page you want to edit if you
are going to make changes.
Ken Hirsch
------------------------------
Date: 12 Sep 1999 13:26:00 +0200
From: kaih=7OhmOOaHw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: Simulating Carriage Returns
Message-Id: <7OhmOOaHw-B@khms.westfalen.de>
Watch followups.
ilya@math.ohio-state.edu (Ilya Zakharevich) wrote on 03.09.99 in <7qn7ag$kmm$1@charm.magnus.acs.ohio-state.edu>:
> [A complimentary Cc of this posting was sent to Alan Curry
> <pacman@defiant.cqc.com>],
> who wrote in article <ahCz3.559$MP6.29772@typ11.nn.bcandid.com>:
>
> > >OSes and have 32-bit time_t. It is unsigned, but 32-bit. Of course,
> > >being based on gcc, EMX *could* make it long long.... Go figure...
> >
> > Not if they cared about C89 conformance.
>
> Well, if C89 mandates 32-bitness of time_t, thus y2038 bug (such
> stupidity I would not expect even from a standard committee), IMO: the
> hell with C89.
What C89 says (not explicitely, but it's been confirmed - in a DR (defect
report) answer, I think - is that time_t must not be a larger integer type
than long. (And yes, C9X will be different in that regard.)
It could be a floating point type.
You could also have long be larger than 32 bit.
All of this is beside the point, though - quite obviously, emx is aiming
for maximum Unix compatibility, and that precludes all of these solutions.
Or at least it did at the time these design decisions were made.
Also, emx uses gcc. Is gcc capable of dealing with 64 bit longs on ix86?
Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
- Russ Allbery (rra@stanford.edu)
------------------------------
Date: 12 Sep 1999 12:14:00 +0200
From: kaih=7OhjZxD1w-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: suggestion to revise grep (another Q: reference comparison)
Message-Id: <7OhjZxD1w-B@khms.westfalen.de>
ilya@math.ohio-state.edu (Ilya Zakharevich) wrote on 09.09.99 in <7r9702$cv3$1@charm.magnus.acs.ohio-state.edu>:
> [A complimentary Cc of this posting was sent to Sitaram Chamarty
> <sitaram@diac.com>],
> who wrote in article <slrn7tf8lr.n90.sitaram@diac.com>:
> > But you ought to be able to compare them just as you copied them,
> > and determine that their "values" (or referents) are equal. IOW -
> > if you can "deepcopy" you should be able to "deep compare".
>
> This is a widespread misconception. Read documentation of FreezeThaw
> (or one of Tom's tutorials) why there are *two* different semantics of
> deep-compare.
I don't think so. I *really* don't think so.
> Ex: $a = \$a; $b = \$b;
>
> Are $a and $b "the same"?
I see absolutely no reason not to say "yes" here. That's a pretty
canonical case, IMO.
Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
- Russ Allbery (rra@stanford.edu)
------------------------------
Date: 12 Sep 1999 14:24:34 GMT
From: bbirthisel@aol.com (Bbirthisel)
Subject: Re: UNCRAP project proposal
Message-Id: <19990912102434.01624.00005216@ng-fs1.aol.com>
Hi All:
>You could certainly start with my search engine from WT, which
>does much of what you ask already. See
>
> http://www.stonehenge.com/merlyn/WebTechniques/
And recent versions of man2html (I don't have a URL handy)
do most of what you ask, too. Except perhaps "pretty" output.
A true example of UNCRAP should scale well and adapt to a
variety of data and search types. How to "write for the future",
whether thinking of modularity or maintenance, is a factor in
determining what is "uncrap" for me.
-bill
Making computers work in Manufacturing for over 25 years (inquiries welcome)
------------------------------
Date: 12 Sep 1999 12:01:32 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: win32 disk formatting
Message-Id: <7rg4ms$1t4$1@gellyfish.btinternet.com>
On Sat, 11 Sep 1999 17:24:25 -0700 Michael Nguyen wrote:
> I'm trying to get an application I am writing to allow a user to format a
> disk in the floppy drive on a win 95/98 . I thought of using the system
> command 'format a:' but how do I know if the formatting resulted in a
> clean disk (w/o bad sectors)? I know I can specify the volume label via
> the dos command but that is of no use to me if the disk has bad sectors.
Generally the only way that you are going to be able to format a disk
in a perl program is to use some external program. You will need to
refer to the documentation for that external program and if you still have
difficulties you should ask in a newsgroup that discusses your OS.
I am assuming that you have read the Perl FAQ and now how to retrieve the
output of an external program.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 12 Sep 1999 10:40:27 -0300
From: Arved_37@chebucto.ns.ca (Arved Sandstrom)
Subject: Re: XML plus XSL to HTML?
Message-Id: <Arved_37-1209991040270001@dyip-4.chebucto.ns.ca>
In article <x9sC3.12130$1E2.83120@ozemail.com.au>, "Neale Morison"
<nmorison@ozemail.com.au> wrote:
> Hi all. I'm looking for pointers in using Perl to create an HTML document by
> running an XML document through an XSL stylesheet. I've looked at the XML
> module, searched deja news and many search engines. There's a discussion on
> the Microsoft site on how to use ASP to do this on the server side, and on
> xml.com Tim Bray talks about using Java for creating HTML from XML. I feel
> sure someone has already done this in Perl. Apologies if I missed the
> discussion thread on this earlier.
> Regards,
> Neale
>
There isn't a whole lot being done in Perl wrt XSL. Not because it can't,
but more so because the XSL situation has been fluid. That being said,
there is a Perl XSLT script by Geert Josten and Egon Willighagen that may
do what you want. It's presumably eventually going to be a module
(XML::XSLT). I have it myself, but I can't remember the exact URL for it
(a search on the author names should do it).
You probably want to be on the Perl-XML mailing list, which is run by
ActiveState (go to their website www.activestate.com and look for the
Mailing Lists link). This is a high information-density mailing list.
There is also a Perl-XML FAQ, maintained by Jonathan Eisenzopf, which you
probably want to consult for general background before doing Perl+XML.
Mostly, just be aware that what you want to do may not be doable, or may
not be easily doable, in Perl (yet). So this could end up being something
you want to use Java for. The particular problem of doing XML->HTML is
readily done with existing Java free stuff.
Arved
------------------------------
Date: 12 Sep 1999 11:50:32 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Y2K bugs on the Internet
Message-Id: <7rg428$1s6$1@gellyfish.btinternet.com>
In comp.lang.perl.misc Dave Eastabrook <news@elmbronze.demon.co.uk> wrote:
> on Sat, 11 Sep 1999 Lawrence Kirby <fred@genesis.demon.co.uk> wrote
>>
>>That everybody else has missed the point, of course.
>
> Brave man, and correct IMHO.
>
> We all have to start somewhere, and *produce* under budget pressure:
>
> http://www.elmbronze.co.uk/year2000/perlprob.htm
>
Well thankyou for referring to my post in the previous thread on this matter.
A further number of articles that provide a deeper critique of various of
Matt Wright's scripts could be found by more searching on Deja News.
e.g:
<http://www.deja.com/getdoc.xp?AN=479798920&fmt=text>
It does sadden me that an ISP could be so clueless as to offer one of these
scripts for its customers use (and I work for an ISP).
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 770
*************************************