[13354] in Perl-Users-Digest
Perl-Users Digest, Issue: 764 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Sep 11 12:07:25 1999
Date: Sat, 11 Sep 1999 09: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 Sat, 11 Sep 1999 Volume: 9 Number: 764
Today's topics:
Re: Automating Secure Copy using Perl (M.J.T. Guy)
Re: Configuring Personal Web Server with Active state P <gellyfish@gellyfish.com>
Re: Desperately searching for perl lint (M.J.T. Guy)
Re: Enable 8 Bit for Informix DBD?? <gellyfish@gellyfish.com>
File IO Question <jstraumann@worldnet.att.net>
Re: folder name question <gellyfish@gellyfish.com>
Re: Getting odd error... (Bart Lateur)
Good databases for multi-variate timeseries data? holmberg@NoSpam.net
Re: help with BNF (Bart Lateur)
Re: HELP!! 'Permission dennied' <gellyfish@gellyfish.com>
Re: How to compare references? (M.J.T. Guy)
Re: How to perform nslookup functions in perl? <gellyfish@gellyfish.com>
Re: I finally created a counter with 1 small problem <gellyfish@gellyfish.com>
Installing Msql-Mysql-modules-1.2206 (John Lathrop)
Re: MSQL.pm Please Help <gellyfish@gellyfish.com>
perl & mysql prrblem...? <o_k@mailexcite.com>
Re: Printing characters in reverse-video to screen <gellyfish@gellyfish.com>
Re: taking a query from a web browser <gellyfish@gellyfish.com>
Re: UNCRAP project proposal (Chris Nandor)
Re: UNCRAP project proposal <ltl@rgsun40.viasystems.com>
Re: Will an apology end this mess? <hyperinfo@digicron.com>
XML plus XSL to HTML? <nmorison@ozemail.com.au>
Zipping <martin123@mail.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 11 Sep 1999 12:18:00 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Automating Secure Copy using Perl
Message-Id: <7rdh9o$ga6$1@pegasus.csx.cam.ac.uk>
In article <7r37cr$ie5$1@nnrp1.deja.com>, <floodrk@my-deja.com> wrote:
>
>but this does not seem to work. Is there a way to tell open that I
>want to see standard error instead of standard output?
You can use the IPC::Open3 module to do this.
But the various other suggestions are probably better approaches to the
problem.
Mike Guy
------------------------------
Date: 11 Sep 1999 13:17:13 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Configuring Personal Web Server with Active state Perl (win32)
Message-Id: <7rdkop$gc$1@gellyfish.btinternet.com>
On 10 Sep 1999 17:36:48 GMT Robert Front wrote:
>
> Paul Foran <Paul.Foran@analog.com> wrote in message
> news:37D936D0.B7CCBD7A@analog.com...
>> How can I do it?
>> Thanks ,
>> paul.
>>
>
> Just follow the installation instructions. If you have specific problems,
> then post them.
>
Specifically the Win32 specific part of the FAQ supplied with the Activestate
Perl has an entire section about setting up various servers to work with
Perl.
If there any further problems wth server configuration then the original
poster should ask in the group comp.infosystems.www.servers.ms-windows.
/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: 11 Sep 1999 11:39:11 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Desperately searching for perl lint
Message-Id: <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.
Mike Guy
------------------------------
Date: 11 Sep 1999 13:13:10 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Enable 8 Bit for Informix DBD??
Message-Id: <7rdkh6$g9$1@gellyfish.btinternet.com>
On Fri, 10 Sep 1999 09:14:16 -0600 Duggan Dieterly wrote:
> We can't load 8 bit European chars with Informix DBD. We suspect it is
> the
> DBD that is rejecting the chars. Does anyone know anything about this?
I cant say that I have ever experienced this before and it doesnt say
anything in the DBD::Informix manpage. I suspect that it might be
something to do with the NLS setting of the Informix client you are using.
I would recommend posting to the newsgroup comp.database.informix to see
what they think.
However I figured that you might not take that as an answer so I did this
small test:
#!/usr/bin/perl -w
use strict;
use DBI;
$| = 1;
my $create =<<EO1;
CREATE TABLE woof (
woof1 CHAR(10),
woof2 INTEGER,
woof3 CHAR(10)
)
EO1
my $insert =<<EO2;
INSERT INTO woof
VALUES ("öèêäæçèê",98,"îïéèæåòôùáá")
EO2
my $select =<<EO3;
SELECT * FROM woof
EO3
my $dbh = DBI->connect("dbi:Informix:blah",'','',{ AutoCommit => 1})
or die $DBI::errstr;
$dbh->do($create) || die $dbh->errstr;
$dbh->do($insert) || die $dbh->errstr;
my $sth = $dbh->prepare($select);
$sth->execute;
my @data = $sth->fetchrow;
print "@data\n";
$dbh->disconnect();
and it worked fine :
gellyfish@gellyfish:/home/gellyfish/clpmtest > inftest.pl
öèêäæçèê 98 îïéèæåòôùá
This is on
Linux gellyfish 2.2.0 #3 Sat Mar 13 15:43:01 GMT 1999 i686 unknown
With the SE - ESQL/C bundle 7.24 UC5
I have done nothing special to the national language settings.
Sorry I cant be more help.
/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: Sat, 11 Sep 1999 11:03:22 -0400
From: "John J. Straumann" <jstraumann@worldnet.att.net>
Subject: File IO Question
Message-Id: <37DA6F3A.4E4CA917@worldnet.att.net>
Hey All:
I have a simple program that outputs some data to a file.
When I tried this:
if ( open( outFile, ">>$dataFile" ) )
{
for ( $r=0; $r<25; $r++ )
{
print outFile ( "$input[ $r ]" );
}
close( outFile );
}
it doesn't work, only prints the first data element and then nothing...
...but this does...
if ( open( outFile, ">>$dataFile" ) )
{
print outFile ( "$input[ 0 ]" );
print outFile ( "$input[ 1 ]" );
print outFile ( "$input[ 2 ]" );
print outFile ( "$input[ 3 ]" );
print outFile ( "$input[ 4 ]" );
print outFile ( "$input[ 5 ]" );
print outFile ( "$input[ 6 ]" );
.
.
.
print outFile ( "$input[ 24 ]" );
close( outFile );
}
Any idea what I am missing here?
TIA.
John.
------------------------------
Date: 11 Sep 1999 13:30:20 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: folder name question
Message-Id: <7rdlhc$gj$1@gellyfish.btinternet.com>
On 11 Sep 1999 02:26:36 -0500 Abigail wrote:
> Jake (kptoth@microdsi.net) wrote on MMCCI September MCMXCIII in
> <URL:news:rtj2pc3n1iv71@corp.supernews.com>:
> @@
> @@ Does anybody know how a perl script can identify the current folder that it
> @@ is residing in? For example, can the script process.cgi identify that it is
> @@ currently residing in a folder named Alabama?
>
>
> What if it's "residing" in more than one "folder" (you mean directory, right?)
I dont know I was thinking that if its in a folder then he must be talking
about a printout which cant possibly execute so it cant know anything
about its environment.
/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: Sat, 11 Sep 1999 11:25:08 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Getting odd error...
Message-Id: <37dd3b8c.5332393@news.skynet.be>
Drew Simonis wrote:
> while (<PARSED>) {
> ($1,$2,$3,$4,$5,$6,$7) = split(/,/, $_);
> }
>
>is returning:
>
>Modification of a read-only value attempted at phone.pl line 72,
Yup. Those are read-only variables, intended to contain submatches for
regexes.
Why not use an array?
while (<PARSED>) {
my @field = split /,/;
...
}
Where you would have used $1, now use $field[0]. Yes, the index is "off
by one".
--
Bart.
------------------------------
Date: Sat, 11 Sep 1999 11:40:22 GMT
From: holmberg@NoSpam.net
Subject: Good databases for multi-variate timeseries data?
Message-Id: <37da3cf3.4624861@news.tiac.net>
Hi,
Are there any good databases optimized for time-based data (like large
collections of time-stamped SNMP data)? The inherent time-organization of such
data, and the typical need to process blocks of data within given
time-boundaries (selected by other criteria as well) gives this kind of data
special properties.
I've typically used simple time-sorted, flat-file organizations, since
this lends itself to very rapid streaming processing, but this creates its own
management problems. I'd be interested if there are any other good
alternatives, especially ones that can work with Perl and that have operations
that 'understand' the semantics of time, interval-data, etc.
In the past, I haven't found good solutions that scale to large, dynamically
growing databases, that are efficient, but I haven't looked recently.
Thanks in advance.
Carl
Antispam address: In order to reply, change NoSpam to tiac.
------------------------------
Date: Sat, 11 Sep 1999 11:20:11 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: help with BNF
Message-Id: <37dc376a.4274483@news.skynet.be>
[posted and mailed]
cornmuffin wrote:
>I need to create a set of grammar to describe the syntax of
>Backus-Naur-Form, using BNF, so that any further constructs I make using
>BNF, like for <integer>, <real number>, <expression>, etc. would parse
>completely. appreciate any feedback.
In Perl? Look up the module YAPP on CPAN.
For intro's on machine compilation tools, look up Yacc, Lex, and their
offspring Bison and Flex. There's a good Bison tutorial online, but you
need a C-compiler to get hands-on experience, preferably GNU (which is
free). I think it's a good idea, even if you plan never to use C again
in your life.
URL's:
http://www.uman.com/lexyacc.shtml
http://www.cs.washington.edu/homes/bershad/cs413/Docs/lexyacc.html
http://www.gnu.org/manual/flex-2.5.4/flex.html
http://www.gnu.org/manual/bison-1.25/bison.html
BTW I think there *may* be ports to Pascal as well.
--
Bart.
------------------------------
Date: 11 Sep 1999 12:11:15 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: HELP!! 'Permission dennied'
Message-Id: <7rdgt3$b2$1@gellyfish.btinternet.com>
On Fri, 10 Sep 1999 10:44:51 +0200 Luis Toyos wrote:
> Hi folks;
>
> I need some help;
>
> My system is : Solaris UNIX; Perl version 5.004_04 built for
> sun4-solaris ;Apache 1.3.3
>
> I am trying to execute an open(FILE,">file.dat") from a CGI and the
> system returns a 'Permission dennied'.
>
Presumably the user your CGI program runs as does not have write permission
in the directory you are trying to create the file in. You should check
the permissions of that directory.
/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: 11 Sep 1999 11:57:54 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: How to compare references?
Message-Id: <7rdg42$fh8$1@pegasus.csx.cam.ac.uk>
Uri Guttman <uri@sysarch.com> wrote:
>
>one problem is that eq will stringify the references which slows the
>compare down. there is a new way (in 5.005 developement and coming in
>5.6 i think) which allows ref compares with == which will do a numeric
>compare of the actual addresses in the refs and is much faster.
Actually, that has been available in all versions of Perl5.
Mike Guy
------------------------------
Date: 11 Sep 1999 12:51:56 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How to perform nslookup functions in perl?
Message-Id: <7rdj9c$bq$1@gellyfish.btinternet.com>
In comp.lang.perl.misc Tom Christiansen <tchrist@mox.perl.com> wrote:
> [courtesy cc of this posting mailed to cited author]
>
> In comp.lang.perl.misc, Blair Kissel <blair.kissel@mts.mb.ca> writes:
> :I need to perform the following:
> :
> :nslookup
> :ls -t a foo.com
>
> @output = 'echo ls -t a foo.com | nslookup'
>
It might be the font in this xterm (which would be ironic in the light
of your sig quote) but they sure look a lot like single quotes rather than
backticks there (' ` - yep :) but I think I know why: is it your .vimrc that
has map ` ^[[ ?
/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: 11 Sep 1999 13:25:09 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: I finally created a counter with 1 small problem
Message-Id: <7rdl7l$gf$1@gellyfish.btinternet.com>
On Fri, 10 Sep 1999 10:42:43 -0700 Tom Phoenix wrote:
> On Fri, 10 Sep 1999, VC wrote:
>
>> Newsgroups: alt.comp.perlcgi.freelance, comp.lang.perl.misc
>
> Some of those alt.* names are getting seriously out of hand.
>
>> I created a counter that works with lots of help from many wonderfull
>> people.
>
> They might have been wonderfulll if they'd directed you to the FAQ.
>
Thats what you get for asking questions in alt.* groups I'm afraid.
/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: Sat, 11 Sep 1999 15:49:30 GMT
From: lathropj@elite.net (John Lathrop)
Subject: Installing Msql-Mysql-modules-1.2206
Message-Id: <7rdtp7$1ipf$1@berry.elite.net>
This was installed and working fine until my ISP upgraded perl. For
information...I do not have root access and was initially successful
at installing this into a directory starting from
/domains/johnlathrop.com/local_lib/
I've installed the following into /domains/johnlathrop.com/local_lib/:
Data-ShowTable-3.3
DBI-1.13
mysql-3.22.25
then when I tried to install Msql-Mysql-modules-1.2206 I got
this...any ideas...this is driving me nuts:
$ export LD_LIBRARY_PATH=/domains/johnlathrop.com/local_lib/lib/mysql/
$ /usr/local/bin/perl Makefile.PL --static --config
PREFIX=/domains/johnlathrop.com/local_lib
Which drivers do you want to install?
1) MySQL only
2) mSQL only (either of mSQL 1 or mSQL 2)
3) MySQL and mSQL (either of mSQL 1 or mSQL 2)
4) mSQL 1 and mSQL 2
5) MySQL, mSQL 1 and mSQL 2
Enter the appropriate number: [3] 1
Do you want to install the MysqlPerl emulation? You might keep your
old
Mysql module (to be distinguished from DBD::mysql!) if you are
concerned
about compatibility to existing applications! [n]
Where is your MySQL installed? Please tell me the directory that
contains the subdir 'include'. [/domains/johnlathrop.com/local_lib]
/domains/johnlathrop.com/local_lib
Which database should I use for testing the MySQL drivers? [test]
On which host is database test running (hostname, ip address
or host:port) [localhost]
User name for connecting to database test? [undef]
Password for connecting to database test? [undef]
Creating files for MySQL ....................
Warning: prerequisite DBI 1.08 not found at (eval 8) line 226.
Warning: prerequisite Data::ShowTable 0 not found at (eval 8) line
226.
WARNING from evaluation of
/domains/johnlathrop.com/local_lib/Msql-Mysql-modules
-1.2206/mysql/Makefile.PL: Can't locate DBI/DBD.pm in @INC (@INC
contains: lib /
usr/local/lib/perl5/5.00502/i386-freebsd /usr/local/lib/perl5/5.00502
/usr/local
/lib/perl5/site_perl/5.005/i386-freebsd
/usr/local/lib/perl5/site_perl/5.005 .)
at (eval 30) line 6.
BEGIN failed--compilation aborted at (eval 30) line 6.
Writing Makefile for Msql-Mysql-modules
------------------------------
Date: 11 Sep 1999 12:08:36 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: MSQL.pm Please Help
Message-Id: <7rdgo4$av$1@gellyfish.btinternet.com>
On Fri, 10 Sep 1999 11:51:46 -0400 CNspots wrote:
> .. Unfortunately I only have ftp access so I cant do a
> command line.
>
So what is wrong with your desktop computer that you cant run Perl on it ?
And please put your response below the quoted material in future.
/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: Sun, 12 Sep 1999 00:00:01 +0800
From: Andy <o_k@mailexcite.com>
Subject: perl & mysql prrblem...?
Message-Id: <37DA7C81.58162FCC@mailexcite.com>
Hi,
I am writing some perl scripts that are called the DBI
for access Mysql database with CHINESE characters,
but some queried chinese data always become error code,
why this happens? Thanks for any helps!
Andy ~
------------------------------
Date: 11 Sep 1999 12:06:01 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Printing characters in reverse-video to screen
Message-Id: <7rdgj9$as$1@gellyfish.btinternet.com>
On Thu, 09 Sep 1999 21:17:24 -0700 Kushagra Vaid wrote:
>
> Is it possible to use a sequence of escape characters (or some other method) in
> Perl, to print out
> a string of characters in reverse-video?
>
You might want to look at the Term::Cap, Win32::Console or Term::AnsiColor
modules depending on your platform.
/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: 11 Sep 1999 11:54:56 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: taking a query from a web browser
Message-Id: <7rdfug$am$1@gellyfish.btinternet.com>
On Thu, 09 Sep 1999 21:48:36 GMT dhuang11@my-deja.com wrote:
> I have just finished up writing a simple web
> server using Perl. However, there is a problem
> with it. I can make it so that when I use
> Netscape or IE to go to the URL for example:
> http://www.test.com/food
> My server will respond on port 80 and grabs a
> page automatically. How do I read in the browser
> query for in this example "food" and pass that
> along to the perl daemon as a string. Any modules
> take care of this problem? Thanks for any and all
> responses.
I hardly think that you will need a module to do that:
#!/usr/bin/perl -w
use strict;
use IO::Socket;
sub Slayer {
1 until ( -1 == waitpid(-1,0));
$SIG{CHLD} = \&Slayer;
}
$SIG{CHLD} = \&Slayer;
my $server = IO::Socket::INET->new(LocalPort => 8080,
Type => SOCK_STREAM,
Reuse => 1,
Listen => 10) or die "blah $@\n";
my $client ;
while ( $client = $server->accept())
{
next if my $pid = fork;
die "fork - $!\n" unless defined $pid;
my $headers;
my $request_resource;
while(<$client>)
{
last if /^\r\n$/;
#
# here you will want to be looking at the headers to check
# for instance that the client is prepared to accept the
# kind of resource you are going to send it (if you care)
#
$headers .= $_;
chomp;
if ( /^GET\s+(.+)\s+HTTP/)
{
$request_resource = $1;
}
}
select $client;
$| = 1;
if ( $request_resource )
{
#
# obviously here you will want to look at $request_resource
# again here to do the appropriate action and or return the
# appropriate response if it is an invalid request see rfc1945
#
print $client "HTTP/1.0 200 OK\r\n";
print $client "Content-type: text/plain\r\n\r\n";
print "you requested : $request_resource";
}
else
{
#
# Actually this is not strictly correct as the client may not
# have sent a valid method at all - see rfc1945 for the appropriate
# response
#
print $client "HTTP/1.0 501 Method not supported\r\n";
print $client "Content-type: text/plain\r\n\r\n";
print "Method not supported\n";
}
close($client);
exit;
}
continue
{
close($client);
}
__END__
/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: Sat, 11 Sep 1999 12:49:32 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: UNCRAP project proposal
Message-Id: <pudge-1109990849390001@192.168.0.77>
In article <x7zoyul8pz.fsf@home.sysarch.com>, Uri Guttman
<uri@sysarch.com> wrote:
# well, i actually have been requested to help my home town's web site
# with a search engine. here is a fine opportunity to create the first
# UNCRAP cgi program. i will write out some specs and challenge some of
What do you mean UNCRAP? Do you mean all CGI programs are crap?
# you intermediates perl hackers to do it. then the submitted code will be
# reviewed here and the best code will get put into the archive by jeff
# pinyan. we have to get the ball rolling somewhere.
I think this is a really bad idea. Contests are fun, but only if the
programming is for fun. You are asking people to do real work and then
pit it against each other. I would never ask someone to do that. I think
it is lame.
# uses CGI.pm for parsing and for some/most of the html output
I agree with Abigail here. I used to use CGI.pm for creating HTML, when I
didn't know better. Of course, I also used to use qw(:standard) when I
did not know what qw() was, and I used to use $cgi-> before every function
call to CGI.pm, too, before I knew what objects were, and before I knew I
didn't need to use them with CGI.pm.
I think a better goal would be to make sure it is HTML 4.0 compliant.
# no really obscure perl nor any newbie perl.
If what you call newbie perl is what I call newbie perl, then I don't see
what is wrong with using it. And I don't know what you think obscure is;
some people commonly use things that even _I_ think are obscure (and much
of what I do, many others think is obscure).
# assume perl 5.005 is being used. use its features.
Use the features of perl 5.005, and don't be obscure? Make up your
mind! There are very features of perl 5.005 that are unsupported by perl
5.004 that I would not call obscure. Can you give examples of what those
features are?
# get the search terms, make a proper regex with qr//.
Why use qr//? I rarely have need of qr// myself, and certainly would
never put it in the specification for something like this.
# slurp in the whole file and match against regex
I know you SAID you are trying to keep it simple and so don't want to use
Franz's intverted index module, but the rest of your spec seems to
explicilty argue against simplicity (qr//, CGI.pm for HTML, etc.).
And I personally think using Search::InvertedIndex would make life easier
in the long run. Simplicity is not always up front. Write a simple index
tool that takes no arguments (or a small number of them) and run it every
night.
# output pretty html of matched filenames with links to the files.
^^^^^^
compliant
# so if you want to create this, or make a team to do so, here is your
# chance. i expect this to take only a few hours of dedicated time. i
# and others will help you or guide your design but i/we don't want to
# code these. so this can be a group education project as well. we hope
# that the UNCRAP programs will not only be a useful cgi/code resource but
# examples of code worthy of being used for teaching perl to the unwashed
# masses.
I think that if you want this done so badly, you should either code it
yourself, or make sure that you don't take any credit at all for the final
project.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: 11 Sep 1999 15:25:11 GMT
From: lt lindley <ltl@rgsun40.viasystems.com>
Subject: Re: UNCRAP project proposal
Message-Id: <7rds8n$lgc$1@rguxd.viasystems.com>
Abigail <abigail@delanet.com> wrote:
:>Uri Guttman (uri@sysarch.com) wrote on MMCCI September MCMXCIII in
:><URL:news:x7zoyul8pz.fsf@home.sysarch.com>:
:>//
:>// here are some of the design rules:
:>//
:>// uses CGI.pm for parsing and for some/most of the html output
:>Oh gosh, I could never do the second part. I just fail to understand
:>why people prefer endless method calls over
:> print <<END_OF_HTML;
:> ...
:> END_OF_HTML
:>and just typing out what you want. CGI.pm's set of methods that output
:>html tags seems to me as useful as an English.pm module with a method
:>for every word, and using that instead of writing plain text. It's all
:>too much 'oh-golly-this-looks-like-I-am-doing-OOP' just for the sake of
:>looking like you're doing OOP.
Although I also write HTML directly (except tables where letting
CGI.pm take care of the details crosses my usefulness threshold), I'm
reconsidering for the future. The XML train is gaining momentum. If
I use standard routines (object oriented or not) to generate HTML,
then my programs will (may) still work when the definition of HTML
changes and somebody updates CGI.pm.
Do you write HTML like this?
<p>
Some paragraph text
</p>
The closing tag is required in the XML'ified version of HTML.
I know that support for old style (current) HTML isn't going anywhere
soon and may never go away. And besides, a program you write today
won't be around in 20 years anyway. Right? So maybe this is just
a FUD thought and I should continue writing my HTML directly.
--
// Lee.Lindley /// Programmer shortage? What programmer shortage?
// @bigfoot.com /// Only *cheap* programmers are in short supply.
//////////////////// 50 cent beers are in short supply too.
------------------------------
Date: Sat, 11 Sep 1999 13:16:06 GMT
From: C D <hyperinfo@digicron.com>
Subject: Re: Will an apology end this mess?
Message-Id: <37DA56DC.53C@digicron.com>
Id Est wrote:
>
> In article <7r8v51$755$0@216.39.133.47>, Robert Front wrote:
>
> (much un-necessary kowtowing deleted)
>
> geez kid, show some backbone. who gives a rats ass if Abigoon doesn't like
> you? he/she/it and his/her/its defenders are arrogant bullies who think
> they're above the rest of us. who cares? f*ck 'em and killfile 'em.
> you can learn perl quite well without their "help".
Exactly!
------------------------------
Date: Sat, 11 Sep 1999 22:41:27 +1000
From: "Neale Morison" <nmorison@ozemail.com.au>
Subject: XML plus XSL to HTML?
Message-Id: <x9sC3.12130$1E2.83120@ozemail.com.au>
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
--
Neale Morison
Wordface
Tel: 02 9555 8971 Fax: 02 9818 4257
Mobile: 0417 661 427
E-mail: mailto:nmorison@ozemail.com
Web: http://www.wordface.com.au
------------------------------
Date: Sat, 11 Sep 1999 15:58:00 +0100
From: "Martin" <martin123@mail.com>
Subject: Zipping
Message-Id: <7rdqj7$spj$1@gxsn.com>
Hi!
I'm wanting to output a zip file that's an archive of a number of other
files (jpegs in this case). The problem is, that the jpegs are not all
available at the same time. I'm looking for a way of starting to output
the ZIP file and then add to that the jpegs as they become available
without altering what has already been outputted.
e.g. I have jpeg1, jpeg2 and jpeg3. I want to make jpegs.zip
I want to be able to start making jpegs.zip and output the part of this
that contains jpeg1, then wait a little until jpeg2 is available before
adding this to what has already been outputted in the data stream and
then add jpeg3 at the end.
Is this possible?
Thanks in advance.
Martin
------------------------------
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 764
*************************************