[8239] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1856 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Feb 11 04:15:13 1998

Date: Wed, 11 Feb 98 01:00:29 -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           Wed, 11 Feb 1998     Volume: 8 Number: 1856

Today's topics:
    Re: 50MB - 200MB FREE WEBSPACE! CGI PROGRAMMER NEEDED sloop@mailcity.com
    Re: 50MB - 200MB FREE WEBSPACE! CGI PROGRAMMER NEEDED (James L. Taylor)
    Re: Counter problem - resets (Martien Verbruggen)
        Creating HTML documentation <boris@i3.informatik.rwth-aachen.de>
        GDBM_File question <siffert@tangrams.com>
        Help!  PERL Problem <xyz@sonic.net>
    Re: How do I get the time? (Martien Verbruggen)
        how do I mail results in perl? <sls@ni.net>
    Re: how do I mail results in perl? (David Oswald)
    Re: how do I mail results in perl? <tchrist@mox.perl.com>
        How to receive the output of a file upload form? (Bud Bundy)
    Re: HTTP::Request -- Using POST to cgi forms (Martin Vorlaender)
        link exchange/swap script <otis@POPULUS.net>
        Padding out a string <tan@morline.com>
        Padding out a string <tan@morline.com>
        Padding out a string <tan@morline.com>
        Padding out a string <tan@morline.com>
        Padding out characters <tan@morline.com>
        perl in free(): (Andrew K. Adams)
    Re: perl in free(): <tchrist@mox.perl.com>
    Re: perl in free(): (Martien Verbruggen)
    Re: Perl to Java/C <tchrist@mox.perl.com>
        POST without a form? <Wayne.C.Wood@jpl.nasa.gov>
    Re: save away filehandles... <rjk@coos.dartmouth.edu>
    Re: Sending formatted mail with NET:SMTP  ????? (Martien Verbruggen)
    Re: substitution/expression (Martien Verbruggen)
    Re: Syntax-coloring editor for NT <dformosa@st.nepean.uws.edu.au>
    Re: Text databases.  Was: Should I stock up on food and <lamber45@EGR.msu.edu>
    Re: Year 2000 Compliance: Lawyers, Liars, and Perl (Gary L. Smith)
    Re: Year 2000 Compliance: Lawyers, Liars, and Perl (Craig Smith)
    Re: Yet Another Sorting Question(TM) <dfetter@shell4.ba.best.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Wed, 11 Feb 1998 05:05:21 GMT
From: sloop@mailcity.com
Subject: Re: 50MB - 200MB FREE WEBSPACE! CGI PROGRAMMER NEEDED
Message-Id: <34e12b85.155697440@news.xmission.com>

On Tue, 10 Feb 1998 14:47:28 EST, Brian Hancock
<whs010@conrad.appstate.edu> wrote:

>My partner and I are in desperate need of a very experienced and very
>profesional CGI Programer.  You would be the main CGI Programmer for our
>sites and get 100mb - 200mb of free web space as pay.  You must be willing
>to work for free.  We are getting 2-5 new sites soon and will need a very
>very good cgi programmer for our sites.  Thank You.
>Preferably a programer that also knows how to make cgi databases and keep
>them up.  PLEASE RESPOND BY E-MAIL IF YOU ARE INTERESTED AT ALL!!  DO NOT
>RESPOND IN THE NEWSGROUP.

No, I'm afraid I do have to respond to this one right here.  You
apparently can't afford a clue, but perhaps someone else reading this
may think better of asking a similar question tomorrow.

A 200mb hard drive costs what, around fifteen dollars in a used
computer junkyard?  You're asking for the initial services of a
professional programmer, and the ongoing upkeep of the software by a
professional programmer; potentially tens, hundreds or even thousands
of hours of work in trade for the storage of a few megabytes of web
space on a server that presumably this fan-damn-tastic Perl programmer
will be maintaining in the first place?  A "very experienced very
professional, very good cgi programmer" is a person who is also "very
sought after, very busy, and very paid."

Would you offer a doctor a bag of stethoscopes in trade for all his
medical knowlege?  Would you offer an attorney a stack of paper on
which he may write contracts in trade for his contract writing
services?  Would you offer a car dealer a parking space in your
driveway in trade for a new car and all the gas you can consume?
Would you insult a concert pianist by offering him the use of your
dusty parlor piano in return for a weekly concert from which you plan
to retain all the profits at the local symphony hall?

I don't know where you learned to do business; certanly you wouldn't
be equally willing to work your own butt off for a scrap of nothing.
Why insult the professionalism of a group of people who have dedicated
countless hours to the acquisition of knowlege that you have neither
the interest nor the patience to develop yourself?

To you and your partner I wish the best of luck in your persuit, but
if you can't afford to be in business you can't expect other
businesspeople to be anxious to participate in your endeavor.




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

Date: Wed, 11 Feb 1998 07:18:23 GMT
From: cowboy@cnnw.net (James L. Taylor)
Subject: Re: 50MB - 200MB FREE WEBSPACE! CGI PROGRAMMER NEEDED
Message-Id: <34e1509d.23762503@news.cnnw.net>

Well said!


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

Date: 11 Feb 1998 05:44:25 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Counter problem - resets
Message-Id: <6brdrp$snv$3@comdyn.comdyn.com.au>

In article <34E12E4C.26D4@idi-ut.com>,
	"Doug Munn (Technical Wizard)" <doug@idi-ut.com> writes:
> The code is below:

[EEK!SNIPSNIPSNIP!]

Throw it away. Then go and read Randal Schwartz's web technique
columns, which tell you how to do it more correctly.

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

>          * * * * * * * * * * * * * * * * * * * * * * * * * * * *

[SNIP huge sig]

Do you really need a signature this big?

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | I took an IQ test and the results were
Commercial Dynamics Pty. Ltd.       | negative.
NSW, Australia                      | 


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

Date: Wed, 11 Feb 1998 09:37:46 +0100
From: Boris Boehlen <boris@i3.informatik.rwth-aachen.de>
Subject: Creating HTML documentation
Message-Id: <34E1635A.EBC9FE2F@i3.informatik.rwth-aachen.de>

Hi,

How can I use `pod2html' to create a HTML documentation for all
installed Perl modules and pods? 

Or is there another tool to do this?

Thanx in advance
	Boris

-- 
- Boris Boehlen    | Kirchrather Strasse 41
-                  | 52074 Aachen
-                  | Phone: +49 241 870034
-                  | EMail: boris@i3.Informatik.RWTH-Aachen.de


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

Date: Wed, 11 Feb 1998 00:06:27 -0800
From: "Curt Siffert" <siffert@tangrams.com>
Subject: GDBM_File question
Message-Id: <6brlkr$f4n$1@nntp2.ba.best.com>

I wrote a script that created a gdbm file on one machine.
I have another script that counts the rows by getting the
scalar value of "keys" once it opens it.

I've sinced moved the gdbm file to another machine.
It was on Solaris, now it's on FreeBSD.  The same
counting script (appended below) isn't able to open the file
anymore.  It craps out on the "dbmopen" command
(which I'm using instead of tie), by saying that the
file doesn't exist - although it does pass the -e test.

Can anyone tell me why?  Is the format of a gdbm file
system dependent or something?  I really wanted to be
able to just port these gdbm files over to another machine.

Thanks,
Curt Siffert
siffert@tangrams.com

#!/usr/local/bin/perl5

use GDBM_File;
use strict;

use vars qw (
  $dbmfile
  $count
  %ADV
);

if (@ARGV!=1) {
  print "Usage: count [table]\n";
  exit(1);
}

$dbmfile="/path/to/file/tables/$ARGV[0]";

if (-e $dbmfile) {
  dbmopen(%ADV, $dbmfile, 0666) || die "Can't open $dbmfile: $!";
  $count=keys %ADV;
  print "$count\n";
  dbmclose(%ADV);
}
else {
  print "File does not exist.\n";
  exit(1);
}






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

Date: Tue, 10 Feb 1998 23:48:33 -0800
From: aardvark <xyz@sonic.net>
Subject: Help!  PERL Problem
Message-Id: <34E157D1.1751@sonic.net>

Hi, 

	I'm trying to create a guestbook using the following perl script. 
Currently, it displays each user guestbook entry above earlier
entries.   Can anyone show me how to modify it so that each user
guestbook entry will instead be displayed below earlier entries?    

-----------------------------------BEGIN----------------------------------

#!/usr/local/bin/perl

print "Content-type: text/html\n\n\n";

$directory = $0;
$directory =~ s#/[^/]*$##;
$program = $0;
$program =~ s#^.*/##;
$directory="." if ($directory eq $program);
unshift(@INC, $directory);

#----------------------------PATH TO .HTM
FILE---------------------------

$file="/home/WWW_pages/xyz/guestbk.htm";

#---------------------------------------------------------------------------------

$separator="<!--start-->";

$formdata=<STDIN>;
$formdata=~s/\s+$//;
foreach (split(/&/, $formdata))
{
($name, $value)=split(/=/, $_);
$name=~s/\+/ /g;
$name=~s/%([0-9|A-F]{2})/pack(C,hex($1))/eg;
$value=~s/\+/ /g;
$value=~s/%([0-9|A-F]{2})/pack(C,hex($1))/eg;
$data{$name}=$value;
}
$message=$data{"comments"};
$new=$separator."\n$data{'name'} <a
href=\"mailto:$data{'e_mail'}\">$data{'e_mail'}</a> \n";  
$new.="$message<br>\n<hr>\n";

unless (open (FILE, "$file"))
	{
	print "Cannot open $file for reading. The path may be incorrect.";
	exit;
	}

flock (FILE, 2);
undef ($/);
$page=<FILE>;
$page=~s/$separator\s*/$new/;
close FILE;

unless (open (FILE, ">$file"))
	{
	print "Cannot open $file for writing. The permission may be incorrect. 
It should be 666 (read+write).";
	exit;
	}

print FILE $page;
flock (FILE, 8);
close FILE;
open (FILE, "$file");
print (<FILE>);

#--------------------------------------END-------------------------------------


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

Date: 11 Feb 1998 05:38:44 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: How do I get the time?
Message-Id: <6brdh4$snv$2@comdyn.comdyn.com.au>

In article <34E10D39.13CD2921@hkstar.com>,
	Richard Jackson <k383@hkstar.com> writes:
> I want to write a cgi to get the time. However, I've only know how to
> write a script to get local server time. How can I get the other server
> time?

What other server time? 
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Begin at the beginning and go on till
Commercial Dynamics Pty. Ltd.       | you come to the end; then stop.
NSW, Australia                      | 


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

Date: Tue, 10 Feb 1998 19:20:18 -0800
From: sls <sls@ni.net>
Subject: how do I mail results in perl?
Message-Id: <34E118F2.2EDB@ni.net>

I have a program which runs in perl as follows:

$ret = ./dfrun program

$ret captures the results from the ./dfrun program.

Now I want to mail that - the $ret

how can I do this using the mail command?


Thanks for any and all assistance - Paul


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

Date: Wed, 11 Feb 1998 05:40:24 GMT
From: doswald@xmission.com (David Oswald)
Subject: Re: how do I mail results in perl?
Message-Id: <34e138c4.159088955@news.xmission.com>

On Tue, 10 Feb 1998 19:20:18 -0800, sls <sls@ni.net> wrote:

>I have a program which runs in perl as follows:
>
>$ret = ./dfrun program
>
>$ret captures the results from the ./dfrun program.
>
>Now I want to mail that - the $ret
>
>how can I do this using the mail command?
>

It appears that your question is a shell question, not a perl one.
The fact that the program that outputs the data you wish to mail is
written in perl is unimportant unless you actually wish to modify the
perl code itself somehow.  

Anyway, go to work on honing your unix skills if the question you
asked is indeed what you intended to communicate.  You'll find the
answer there.

Look up the man pages for csh and mail for starters...

Dave


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

Date: 11 Feb 1998 06:25:53 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: how do I mail results in perl?
Message-Id: <6brg9h$gi8$2@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, sls@ni.net writes:
:I have a program which runs in perl as follows:
:
:$ret = ./dfrun program

That doesn't look like Perl code to me, nor that of any other shell.

:$ret captures the results from the ./dfrun program.

Really?  What an odd shell you have.

:Now I want to mail that - the $ret
:how can I do this using the mail command?

The same way you normally do using the shell or C, of course.

    mail -s 'this is the stuff' $somewhere < $filename

Or some such.  I guess you didn't like the solution 
given in the perlfaq9 manpage, eh?  I guess I'd 
just talk to sendmail myself, too, though.

--tom

    "Let none post who have not first read the FAQ."

-- 
	Tom Christiansen	tchrist@jhereg.perl.com
    Sorry.  My testing organization is either too small, or too large, depending
    on how you look at it.  :-)
            --Larry Wall in <1991Apr22.175438.8564@jpl-devvax.jpl.nasa.gov>


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

Date: Sun, 08 Feb 1998 00:50:13 GMT
From: sbc@iol.it (Bud Bundy)
Subject: How to receive the output of a file upload form?
Message-Id: <34dd00d0.8299696@mikasa.iol.it>

You know that INPUT TYPE=file. What is the quickest and simplest way
to manage the output with a perl script?

Thanks



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

Date: Wed, 11 Feb 1998 07:12:54 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
To: y-pisan@nwu.edu
Subject: Re: HTTP::Request -- Using POST to cgi forms
Message-Id: <34e14166.524144494f47414741@radiogaga.harz.de>

Yusuf Pisan (y-pisan@nwu.edu) wrote:
: I am trying to use the program below to 'POST' a message-id to
: dehanews pages and read the response.  I get the following error when
: I try to run the program
:
: 	Can't call method "clone" on unblessed reference at
: 	/usr/local/lib/perl5/site_perl/HTTP/Message.pm line 50.

[...]
: # Variables in the form are
: # <input type="text" name="MID" size="42">
: # <input type="hidden" name="ST" size="QS">
: # <input type="hidden" name="AH" value="1">

Form variables go into the body of a POST message, not into the header...

: require HTTP::Request;
: require LWP::UserAgent;
:
: $ua = new LWP::UserAgent;
:
: $request = new HTTP::Request 'POST', $post,
:     [ MID  => $message_id,
:      ST => '',
:      AH => '1'
:      ];

 ...so this is wrong anyway (apart from not supplying the correct value for
ST). But on what causes the error you're seeing:

Shall we read the POD? Shall we?

  $r = new HTTP::Request $method, $url, [$header, [$content]]

    [...]
    The $header argument should be a reference to a HTTP::Headers
    object.

As the anonymous array ref you're supplying is not an object ref, it's
not blessed. So none of the methods of the expected HTTP::Headers object
can be called inside HTTP::Message.

Have a look at the LWP cookbook, lwpcook.pod, on how to POST.

cu,
  Martin
--
                          | Martin Vorlaender | VMS & WNT programmer
 Ceterum censeo           | work: mv@pdv-systeme.de
 Redmondem delendam esse. |       http://www.pdv-systeme.de/users/martinv/
                          | home: martin@radiogaga.harz.de


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

Date: Wed, 11 Feb 1998 00:36:53 -0600
From: Otis Gospodnetic <otis@POPULUS.net>
Subject: link exchange/swap script
Message-Id: <887178215.1005780999@dejanews.com>

Hello,

does anyone know of any perl scripts that will allow me to create some
sort of banner-exchange for web sites?  I want to allow a few sites to
exchange their banners (and let them do it by themselves using a
web-based interface).

Thanks!

Otis

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Wed, 11 Feb 1998 08:07:02 -0000
From: "Tan Aksoy" <tan@morline.com>
Subject: Padding out a string
Message-Id: <34e15b42.0@newsread1.dircon.co.uk>

How would I pad out a string with extra characters?

e.g. I have the number 10 but would like to represent it as a 6-digit
number/string i.e. 000010.

Is there a command that will do this or should I write a little algorithm?

Regards
Tan





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

Date: Wed, 11 Feb 1998 08:07:02 -0000
From: "Tan Aksoy" <tan@morline.com>
Subject: Padding out a string
Message-Id: <34e15c43.0@newsread1.dircon.co.uk>

How would I pad out a string with extra characters?

e.g. I have the number 10 but would like to represent it as a 6-digit
number/string i.e. 000010.

Is there a command that will do this or should I write a little algorithm?

Regards
Tan





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

Date: Wed, 11 Feb 1998 08:07:02 -0000
From: "Tan Aksoy" <tan@morline.com>
Subject: Padding out a string
Message-Id: <34e15b6e.0@newsread1.dircon.co.uk>

How would I pad out a string with extra characters?

e.g. I have the number 10 but would like to represent it as a 6-digit
number/string i.e. 000010.

Is there a command that will do this or should I write a little algorithm?

Regards
Tan





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

Date: Wed, 11 Feb 1998 08:07:02 -0000
From: "Tan Aksoy" <tan@morline.com>
Subject: Padding out a string
Message-Id: <34e15c0b.0@newsread1.dircon.co.uk>

How would I pad out a string with extra characters?

e.g. I have the number 10 but would like to represent it as a 6-digit
number/string i.e. 000010.

Is there a command that will do this or should I write a little algorithm?

Regards
Tan





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

Date: Wed, 11 Feb 1998 08:10:24 -0000
From: "Tan Aksoy" <tan@morline.com>
Subject: Padding out characters
Message-Id: <34e15c51.0@newsread1.dircon.co.uk>

Is there a Perl command that will allow padding of characters?

e.g. If I have 10 then I would like this to be represented as a 6-digit
string i.e. 000010

Otherwise I would have to write a simple algorithm.

Regards
Tan





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

Date: 10 Feb 1998 22:38:16 GMT
From: akadams@psc.edu (Andrew K. Adams)
Subject: perl in free():
Message-Id: <6bqkso$9pe@news.psc.edu>

I am using perl5.004_04 on a pentium running FreeBSD 2.2.5-RELEASE,
when I execute a program that forks off a job scheduler and then
processes a bunch of small message via the sockets api, my program
dies with the following errors:

	.
	.
	.
perl in free(): warning: recursive call.
perl in free(): warning: recursive call.
perl in free(): warning: recursive call.
perl in free():perl in malloc(): warning: recursive call.
Out of memory!


Does anyone know if this is a problem with my coding or perl?  


Thanks,
Andrew


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

Date: 11 Feb 1998 06:21:55 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: perl in free():
Message-Id: <6brg23$gi8$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, akadams@psc.edu (Andrew K. Adams) writes:
:Does anyone know if this is a problem with my coding or perl?  

Sounds like a perl bug.  Try on other platforms and other versions.
Submit it to perlbug when you have a bit more data, including minimal
source for repeating the problem.

thanks,

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com
"People think it must be fun to be a super genius, but they don't
 realize how hard it is to put up with all the idiots in the world."
	--Calvin 


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

Date: 11 Feb 1998 05:50:42 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: perl in free():
Message-Id: <6bre7i$snv$5@comdyn.comdyn.com.au>

In article <6bqkso$9pe@news.psc.edu>,
	akadams@psc.edu (Andrew K. Adams) writes:

> Does anyone know if this is a problem with my coding or perl?  

Without actually seeing your code, I'll just have a guess: Your coding?

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 
Commercial Dynamics Pty. Ltd.       | What's another word for Thesaurus?
NSW, Australia                      | 


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

Date: 11 Feb 1998 05:23:20 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl to Java/C
Message-Id: <6brck8$8bn$1@csnews.cs.colorado.edu>

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

Using that travesty of a mistake for a newsreader, Mozilla 4.04
[en] (WinNT; I), Jeff Liu <jeff@MelbourneIT.com.au> writes in
comp.lang.perl.misc:

:Is there any tools to convert Perl scripts to Java or C?

Besides what the FAQ says, you mean?  Probably not.

    % man perlfaq3 

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

    "I can only bend the rules so much before it starts looking like I'm breaking
    the rules." --Larry Wall


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

Date: Tue, 10 Feb 1998 12:47:18 -0800
From: Wayne C Wood <Wayne.C.Wood@jpl.nasa.gov>
Subject: POST without a form?
Message-Id: <34E0BCD6.5229@jpl.nasa.gov>

this is the problem...
 
1) i have a web-page that contains a form containing two text fields
which are the name/password for a given users.  the action item of this
form is a perl CGI.
 
2) the perl CGI performs some processing on the Content of the form
contained in the previous HTML file.  then it's purpose is to call
another CGI, along with a "Query String".  unfortunately, i can't figure
out how to pass the "Query String" on to the final destination script
without including it in the URL.
 
is there a way to do a POST type transaction so i can send the
transition information on to the final CGI?
 
i am using a "META REFRESH" now but that leaves the QUERY string on the
URL.  got anyting better?
 

-- 
######################################################
## mailto:Wayne.Wood@jpl.nasa.gov ## M/S 171-300    ##
## 4800 Oak Grove Drive           ## (VOX) 354-4251 ##
## Pasadena, CA 91109-8099        ## (FAX) 393-5009 ##
######################################################
## Some mornings, it's just not worth chewing       ##
## through the leather straps. -- Emo Phillips      ##
######################################################


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

Date: Tue, 10 Feb 1998 23:51:29 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: Daniel Suen <ttdsuen@ln.edu.hk>
Subject: Re: save away filehandles...
Message-Id: <34E12E56.DA3CE996@coos.dartmouth.edu>

[posted and mailed]

Daniel Suen wrote:
> 
> print $ofilehandle[5] "hello, world\n";

Try this instead:

print { $ofilehandle[5] } "hello, world\n";

Chipmunk


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

Date: 11 Feb 1998 05:37:18 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Sending formatted mail with NET:SMTP  ?????
Message-Id: <6brdee$snv$1@comdyn.comdyn.com.au>

[Newsgroups: comp.lang.perl.misc,yosefy@iil.intel.com]

Since when is your email addrss a newsgroup? And your newsreader and
news server let you get away with this?

In article <34E092AC.7EF2AEC9@iil.intel.com>,
	yuval yosef <yosefy@iil.intel.com> writes:

> --------------8B8B137A5E0292487F2175C2
> Content-Type: text/html; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> 
> <HTML>

Don't do this, please. Usenet is a plain text medium, HTML is for the
web. Reconfigure your excuse for a newsreader, please.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | For heaven's sake, don't TRY to be
Commercial Dynamics Pty. Ltd.       | cynical. It's perfectly easy to be
NSW, Australia                      | cynical.


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

Date: 11 Feb 1998 05:48:54 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: substitution/expression
Message-Id: <6bre46$snv$4@comdyn.comdyn.com.au>

In article <tloser-1002980940320001@168.133.124.5>,
	tloser@valdemar.microserve.com (Thomas A. Loser) writes:

>   I am attempting to capitalize any character in a field that follows a " "
>   or a "/".
 
Just for a chuckle, you might have a look at the FAQ, section 4:

perldoc perlfaq4
/How do I capitalize all the words on one line

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 
Commercial Dynamics Pty. Ltd.       | Curiouser and curiouser, said Alice.
NSW, Australia                      | 


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

Date: 11 Feb 1998 06:58:48 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Syntax-coloring editor for NT
Message-Id: <887180288.284908@cabal>

In <6bqaro$5sl$1@mainsrv.main.nc.us> scott@softbase.com writes:

[...]

>Microsoft is not "screwing the rest of us". Remember the free market,
>the thing that makes the economy run? If there's demand, a product will
>be viable. If there's no demand, then a product does not survive. 

This glorious situation only comes about if everbody was perfectly
informed and had full knowlige of the pros and cons of the product and its
compeadtors.  However the world is not like that.

--
Please excuse my spelling as I suffer from agraphia see the url in my header. 
Never trust a country with more peaple then sheep. 
Support NoCeM http://www.cm.org/                   
I'm sorry but I just don't consider 'because its yucky' a convincing argument


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

Date: Wed, 11 Feb 1998 01:41:43 -0500
From: David Lee Lambert <lamber45@EGR.msu.edu>
Subject: Re: Text databases.  Was: Should I stock up on food and buy an AK-47?
Message-Id: <Pine.GSO.3.96.980211012838.12279A-100000@area51>

On Tue, 10 Feb 1998, A. T. Hagan wrote:

> kiyoinc@ibm.net         (cory hamasaki) wrote:
> 
> >In <34e471e4.642618051@nntp.a001.sprintmail.com>, athagan@sprintmail.com (A. T. Hagan) writes:
> >>Cory, we went through all of this with you the last time.  Did you not keep
> >>any of it?
> >
> >I probably kept all of it, I put two 1.44's of c.s.y2k archives on the shelf 
> >every month.   The problem is, I haven't figured out how to retrieve it yet. 
> >Yes, I know about text databases and inversions....  I haven't been able to 
> >set aside the time to work on that.
> 
> I'm beginning to have a problem with this myself.  I have somewhere between
> sixty and seventy megabytes of files relating to food, food storage and
> food preservation.  I use these files for FAQ updates and other writing.
> The problem is that I know I have a particular piece of information, but
> can't recall what the file name is.  I can use Norton Utilities to do a
> search of the my hard disk for a particular text string, but it does not
> tell me what the file name is when it makes a hit.  Keeping a written list
> of what each file contains has not worked well for me so a program that
> will search a particular directory or the entire disk for a text string
> that I give it seems to be the way to go.  Any one know of anything like
> this that I can use with Windoze 3.11?  Freeware or shareware is to be
> preferred since money is always an issue, but I can probably propitiate the
> boss for the dough if I must.

Try porting grep using Turbo C or djgpp,  or else upgrade to Win '95 and
get perl.  (Actually,  djgpp might come with a port of grep.)  I myself
use Linux,  so I just need to do something like

grep -i 'rice.*beans' `find ~/survive-info`

I imagine that perl and procmail could be mixed to do fuzzy
measurement of files for relevance to an ill-defined phrase.  Perhaps
someone has done this already?

Linux and perl are more year 2000 compliant than MS-DOG and Win 3.11
anyway.

David Lee Lambert   MHm 16x20   Hack Programmer and Student
Admin of lmert.dyn.ml.org           http://lmert.dyn.ml.org
My web pages are at http://web.egr.msu.edu/~lamber45



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

Date: Wed, 11 Feb 1998 07:58:02 GMT
From: gls@infinet.com (Gary L. Smith)
Subject: Re: Year 2000 Compliance: Lawyers, Liars, and Perl
Message-Id: <eScE.8$E2.565152@news2>

Tom Christiansen (tchrist@mox.perl.com) wrote:

: I'm still thinking about the issue of people learning bad 
: habits from the bad old days of Cobol.

Fortunately, those bad old days are gone forever.  Now people learn bad 
habits from the bad new days of C/C++.

--
 
Gary L. Smith                    gls@infinet.com
Columbus, Ohio                 Gary_Smith@oclc.org


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

Date: 11 Feb 1998 07:55:51 GMT
From: smith@aragorn (Craig Smith)
Subject: Re: Year 2000 Compliance: Lawyers, Liars, and Perl
Message-Id: <SMITH.98Feb11085551@aragorn>

>>>>> "Cameron" == Cameron Dorey <camerond@mail.uca.edu> writes:

    Cameron> Jon R. Kibler wrote:
    >> [snip] If data was stored on disk or tape, the common means of
    >> backing it up was to create a punched card backup of the disk
    >> or tape.
    >> 
    >> Man, THE TREES WE WASTED in those days...

    Cameron> But, the punches made GREAT confetti for football games!
    Cameron> The longhairs (girls _and_ boys) couldn't get it out of
    Cameron> their hair for days, the punches were so small... Waste,
    Cameron> nah - entertainment value!

My father, when he worked at MIT Lincoln Labs, used to bring home
punch cards and we would make Christmas wreathes out of 'em! High
entertainment value!

(raig

-- 
-------------------------------------------------------------
Craig Smith                          Personal address
Mitarbeiter, Informatik              by request only
University of Trier
Trier, Germany
smith'xxx'psi.uni-trier.de (replace 'xxx' with you know what)
http://www.informatik.uni-trier.de/~smith   Carpe A Cappellam
-------------------------------------------------------------
'Discussion is an exchange of knowledge;
   argument an exchange of ignorance.' - Robert Quillen
-------------------------------------------------------------


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

Date: 11 Feb 1998 05:16:05 GMT
From: David Fetter <dfetter@shell4.ba.best.com>
Subject: Re: Yet Another Sorting Question(TM)
Message-Id: <6brc6l$ibi$1@nntp1.ba.best.com>

John Porter <jdporter@min.net> wrote:

[snip]

> I think what you want is the Sprite module from CPAN.
> You did scan the CPAN, didn't you?

It was, of course, completely obvious that something like SQL
or "sorting on multiple fields" would be called Sprite :)

> > Right now, I have a crude, inextensible hack that doesn't quite work
> > right--bombs when it runs across blanks in the key fields.

> Show Us The Code!

Oops.  Here it is:  sorts by one field iff there are no blank spaces.

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

use CGI qw(:all);
open FILE,"<whoswho.data";

$query = new CGI;
$sortby = $query->param('sortby');

while(<FILE>) {
    push @LoL, [ split(/;/) ];
}
$LAST_FIELD = $#{$LoL[1]};

for $i (0..$#LoL) {
    for $j (0..$LAST_FIELD) {
        if ($LoL[$i][$j] eq '') {
            $LoL[$i][$j] = 'N/A';
        }
    }
}

print header;
print start_html(-title=>"Sort by fields",
                 -bgcolor=>"#FFFFFF"),
      center(h1("Sort by fields")), br,"\n";
print start_form(-action=>"sortfield.cgi");
# print start_form(-action=>"test3.cgi");

print "<table border>";
print "\n    <tr>";
    print "\n    <td> <a href='sortfield.cgi?sortby=0'>$LoL[0][0]</a>",
          "\n <a href='sortfield.cgi?sortby=1'>$LoL[0][1]</a>";
for $i (2..$LAST_FIELD) {
    print "\n    <td> <a href='sortfield.cgi?sortby=$i'>$LoL[0][$i]</a>";
}
print br,"\n";

if(param()) {
    if ($sortby<0 || $sortby>$LAST_FIELD || $sortby != int($sortby)) {
        die "Wrong number: Try again, buster!\n";
    }
    for $i (1..$#LoL) {
        $key = splice(@{$LoL[$i]},$sortby,1);
        @values = @{$LoL[$i]};
        $HoL{$key} = [ @values ];
    }
    foreach $it (sort keys %HoL) {
        print "\n    <tr>";
        splice( @{$HoL{$it}} ,$sortby,0,$it);
        print "\n    <td>$HoL{$it}[0] $HoL{$it}[1] ";
        print "\n    <td>",join("\n    <td>", @{$HoL{$it}}[2..$LAST_FIELD] );
        # print "\n    <td>",join("\n    <td>", @{$HoL{$it}}[0..$LAST_FIELD] );
        print br,"\n";
    }

} else {
    for $i (1..$#LoL) {
        print "\n    <tr>";
        print "\n    <td>$LoL[$i][0] $LoL[$i][1] ";
            for $j (2..$LAST_FIELD) {
                print "\n    <td>$LoL[$i][$j]";
            }
        print br,"\n";
    }
}

print "</table>";
print end_html;

-- 
            David Fetter         888 O'Farrell Street Apt E1205
   shackle@ren.glaci.com          San Francisco, CA 94109-7089 USA
  http://www.best.com/~dfetter     +1 415 567 2690 (voice)
print unpack ("u*",q+92G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R"@``+)

"Wired" combines the technical depth of "Omni" with layout that brings
to mind the worst of kindergarten art period.
                                       Tim Smith(tzs@halcyon.com)


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

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

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