[10055] in Perl-Users-Digest
Perl-Users Digest, Issue: 3648 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Sep  6 15:06:41 1998
Date: Sun, 6 Sep 98 12:00:25 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest           Sun, 6 Sep 1998     Volume: 8 Number: 3648
Today's topics:
    Re: A short question (Kevin Reid)
    Re: Beginner's question (Kevin Reid)
    Re: Blocked pipes (?) <rra@stanford.edu>
    Re: Change of array construction behaviour (5.00401 to  <tobez@plab.ku.dk>
        fork problem: two children finishes at the same time! dwiesel@my-dejanews.com
    Re: help with mail sending. (Matthias Kahle)
    Re: History of Perl - round 1 (Norman UNsoliciteds)
    Re: loosing variable values in a large program (Tye McQueen)
    Re: MS Word to Text conversion <oscar@charpy.etsiig.uniovi.es>
    Re: or vs || with open function (Andrew M. Langmead)
        Password checking? <ketanp@NOSPAMxwebdesign.com>
        Perl beautifier <surf@trader.net>
    Re: Perl gurus opinion needed. (Ronald J Kimball)
    Re: Perl gurus opinion needed. therobot@vegtabl.com
        Perl or Windows bug with Sockets? (Malcolm Hoar)
    Re: Question regarding perl-script as suid <rra@stanford.edu>
    Re: Randal Schwartz in Dallas on 10/3 <merlyn@stonehenge.com>
    Re: Reading file names but not directories <jdw@dev.tivoli.com>
        Regex/File/substitution/CGI e_blumenau@my-dejanews.com
        Regex/File/substitution/CGI e_blumenau@my-dejanews.com
    Re: Tom Phoenix: ANSWERS WANTED! birgitt@my-dejanews.com
    Re: Tom Phoenix: ANSWERS WANTED! (Nathan V. Patwardhan)
    Re: WE MASS E-MAIL YOUR EXCLUSIVE AD TO 900k - $99 (Josh Kortbein)
    Re: Why is 5.005* a pain to switch to safely? (Malcolm Hoar)
    Re: Windows95, Perl, PWS (IIS) <maierc@chesco.com>
    Re: Windows95, Perl, PWS (IIS) (Jonathan Stowe)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 6 Sep 1998 13:05:22 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: A short question
Message-Id: <1dew6q3.cfku35133d07eN@slip-32-100-246-42.ny.us.ibm.net>
Antonio Cisternino <cisterni@di.unipi.it> wrote:
> I wrote this program (that must be stored in a file called 't'):
> 
> open(I,"<t");print<I>
> 
> There is a shortest program that print itself? I'm a novice Perl
> programmer and I don't know all the required tricks?
> Another question: anyone has written the shortest Perl program that
> writes itself?
Haven't seen anything shorter than this:
open+0;print<0>
Obfuscated version:
#!perl -w-e'seek DATA, 0, 0; print <DATA>'
$_=q;\;0+nepo; ;$_?$_:$!=s;^(.*)$;(join+q..,
reverse+split+m++,$1).q.print<0>.;see? 00:01
This one doesn't open its own file:
$string = q<qq{\$string = q<},
$string, qq{>;\nprint eval \$string;\n}>;
print eval $string;
-- 
  Kevin Reid.      |         Macintosh.
   "I'm me."       |      Think different.
------------------------------
Date: Sun, 6 Sep 1998 13:05:20 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Beginner's question
Message-Id: <1deugux.1x3ptaz1afryyuN@slip-32-100-246-42.ny.us.ibm.net>
Kamran <kamrani@ifi.uio.no> wrote:
> Hi
> 
> How do I tell perl to extract text between to pattern encounter ?
> For instance I want to print out whatever is of text between
> the first and the second encounter of the word "public" in
> the following example
> 
> -----------
> 
> public abstract void translate(int x,int y)
> 
>           Translates the origin of the graphics context to the point
>           (x, y) in the current coordinate system. Modifies this
>           graphics context so that its new origin corresponds to the
>           point (x, y) in this graphics context's original coordinate
>           system. All coordinates used in subsequent renderingoperations
>           on this graphics context will be relative to this new origin.
>           
> 
> public abstract color getColor()
> ...
> ...
> ..
> 
> -------------
Other people have suggested regular expressions for extracting chunks of
a single scalar; here's a solution that'll work for reading from a file:
$/ = 'public ';
After that, each <FILE> will return something like the string q{abstract
void translate(int x,int y)
          Translates the origin of the graphics context to the point
          (x, y) in the current coordinate system. Modifies this
          graphics context so that its new origin corresponds to the
          point (x, y) in this graphics context's original coordinate
          system. All coordinates used in subsequent renderingoperations
          on this graphics context will be relative to this new origin.
          
}.
-- 
  Kevin Reid.      |         Macintosh.
   "I'm me."       |      Think different.
------------------------------
Date: 06 Sep 1998 10:04:48 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Blocked pipes (?)
Message-Id: <ylk93hdvf3.fsf@windlord.stanford.edu>
Donovan Rebbechi <elflord@pegasus.rutgers.edu> writes:
> I am writing some programs that use pipes. I am getting some sort of
> "blockage", ie the programs freeze if I put a large amount of data into
> the pipe.
Yup.  Pipes have finite buffer space.
> #!/usr/bin/perl
> pipe (READ,WRITE);
> for ( $i=0; $i<150; $i++ ){
>       print WRITE "hello there. How are you ? \n";
>       }
> close WRITE;
> while (<READ>){ print; }
> close READ;   
> # end
> This only hangs if I move the loop up to around 150 iterations. It works
> fine if I use less iterations.
> What is wrong with it ?
Nothing at all is wrong with it in the sense of doing something
unexpected.  Data that you write into a pipe is stored in a kernel buffer
until the other end of the pipe reads it back out again.  That kernel
buffer has a finite size.  In fact, you have all the information to
calculate that size from the above; you have a string of about 30
characters and you can print it 150 times, which is a buffer of somewhere
around 4.5K.
Pipes created with socketpair() rather than pipe() tend to have larger
buffers on most systems, but it's still possible to run into this problem.
The only way to write an arbitrary amount of data into a temporary storage
location where you can read it back again is to create a temporary file.
-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: 06 Sep 1998 15:28:01 +0200
From: Anton Berezin <tobez@plab.ku.dk>
Subject: Re: Change of array construction behaviour (5.00401 to 5.00502)
Message-Id: <86iuj18j6m.fsf@lion.plab.ku.dk>
damian@cs.monash.edu.au (Damian Conway) writes:
> Is the change in behaviour of the following code documented somewhere?
Yes.  Though it is not a ``change of array construction behaviour''.
What you see here is a failed match in list context.  From man perlop:
               When there are no parentheses
               in the pattern, the return value is the list (1)
               for success.  With or without parentheses, an
               empty list is returned upon failure.
This is also a ``change back'' to perl4-behaviour.
> 	#!/usr/local/bin/perl -w
> 
> 	$_ = 0;
> 
> 	@array1 = (1, /2/,   3);
> 	@array2 = (1, undef, 3);
> 
> 	print "[", join('|',@array1), "]\n";
> 	print "[", join('|',@array2), "]\n";
> 
> 
> Under Perl 5.00401:
> 
> 	Use of uninitialized value at test.pl line 9.
> 	[1||3]
> 	[1||3]
> 
> 
> Under Perl 5.00502:
> 
> 	Use of uninitialized value at test.pl line 9.
> 	[1|3]
> 	[1||3]
> 
> 
> I liked the old behaviour better :-/
Well, in other situations the current behaviour makes a lot
of sense.  But in your example, as well as in this one:
#! /usr/local/bin/perl -w
sub howmany { scalar(@_); }
$_ = 'no match';
print howmany(1,2,/^match$/), "\n";
__END__
the behaviour is IMHO counter-intuitive.  You should
be very careful for such constructs.  scalar(/^match$/)
usually helps a lot.
Hope this helps.
-- 
Anton Berezin <tobez@plab.ku.dk>
The Protein Laboratory, University of Copenhagen
------------------------------
Date: Sun, 06 Sep 1998 14:05:47 GMT
From: dwiesel@my-dejanews.com
Subject: fork problem: two children finishes at the same time!
Message-Id: <6su4rr$kph$1@nnrp1.dejanews.com>
Hi,
I've got a perl program where I do a lot of forking. Each fork prints a string
to STDOUT and each fork takes some seconds to complete.
My problem is that sometimes two children finishes at the same time and then
one or both of the children doesn't print to STDOUT. I wan't to be sure that
two children don't finish at the same time. I can't 'sleep' for a random
number seconds because they can finish at the same time anyway.
Is there a solution to this problem?
// Daniel
I've been to the site http://www.positionagent.com. It seems as they also do a
lot of forking. My program is very similar to their program - but I've never
seen their program fail... Therefore I assume that there is a solution...
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum
------------------------------
Date: 6 Sep 1998 15:29:42 GMT
From: MKahle@t-online.de (Matthias Kahle)
Subject: Re: help with mail sending.
Message-Id: <6su9p6$q9e$1@news02.btx.dtag.de>
Just in case the system your're running on doesn't have a sendmail at
all, you may want to consider using the module (Net::SMTP; available on
CPAN, part of the libnet bundle).
Here's a small example of how to use it:
----------------------------------------
use Net::SMTP;
#
#...
#
$smtp = Net::SMTP->new($mailHost)
    || die "Cannot connect to '$mailHost'\n";
$smtp->mail($sender)
    || die "Invalid sender mail address '$sender'\n";
$smtp->recipient($mailID)
    || die "Invalid recipient mail address '$mailID'\n";
$smtp->data();
$smtp->datasend($mailText);
$smtp->dataend();
$smtp->quit;
----------------------------------------
$mailHost: the SMTP host where you deliver the mail to
$sender:   you@yourMailHost.yourDomain
$mailText: is a multi-line string containing the mail (can include other
header fields like Subject: bla bla, ...
regards,
matthias
Ewgeniy Kartavtchenko wrote:
> 
> Hi.
> 
> I want to send email from perl-script without any questions and
> notifications. All of scripts, that i've seen, used
> "/usr/lib/sendmail" file. But it isn't work... Certainly, the way to
> solve it is exist, but I don't know it.
> Can anybody help me ? Of course, I'll be very thankful if somebody
> dlows some pl-code in me...
> 
> EWG
--
Matthias Kahle
  Datacom Network Engineer
  Fax   : +49 6126 990827
  E-Mail: MKahle@T-Online.de
  --- Idstein/Germany ---
------------------------------
Date: Mon, 07 Sep 1998 03:48:51 +0900
From: No.unsoiliciteds@dead.end (Norman UNsoliciteds)
Subject: Re: History of Perl - round 1
Message-Id: <No.unsoiliciteds-0709980348510001@cs11j45.ppp.infoweb.or.jp>
In article <6st791$21s@smelt.openface.ca>, yuiop@smelt.openface.ca (Neil
Kandalgaonkar) wrote:
 
> That's going to be page one of your history of Perl. Your average geek may
> or may not care about language. Perl geeks are invariably hyperaware of
> language and often linguistics. Some are more prescriptive than others.
but then Larry (dear old  Larry) does also point out that one of the
prerequisites of Perlers is laziness, so I guess "geek" is shorter (and
therefor easier to write) than "anal retentive"
-- 
It took a learned man to teach me the true meaning 
of ignorance - the willingness to believe learning 
is finite
Norman Unsoliciteds -The Wilderness Years, Boscara Press 1967
------------------------------
Date: 6 Sep 1998 00:21:28 -0500
From: tye@fumnix.metronet.com (Tye McQueen)
Subject: Re: loosing variable values in a large program
Message-Id: <6st64o$lrd@fumnix.metronet.com>
) sabhay@my-dejanews.com <sabhay@my-dejanews.com> wrote:
) >I am facing a problem of loosing variable values. In a large program a
) >variable looses its value in between unless I redifne that variable with new
) >name.
alastair@calliope.demon.co.uk (Alastair) writes:
) There's something wrong with line 11.
Yeah, I know what you mean.  But I've only got 9 lines on my phone.
Just a wild guess, but the original problem might be "variable
suicide" which is described in the FAQ which is included with Perl.
Go to lib/pod and search for "suicide" in *.pod for more info.
-- 
Tye McQueen    Nothing is obvious unless you are overlooking something
         http://www.metronet.com/~tye/ (scripts, links, nothing fancy)
------------------------------
Date: Sun, 06 Sep 1998 18:07:26 +0200
From: Oscar Fernandez Sierra <oscar@charpy.etsiig.uniovi.es>
To: Michael Shavel <mshavel@erols.com>
Subject: Re: MS Word to Text conversion
Message-Id: <35F2B33E.6897@charpy.etsiig.uniovi.es>
Michael Shavel wrote:
> 
> In article <35ed7a77.415180768@news.wma.com>, emercer@wma.com (Ernie
> Mercer) wrote:
> 
> > I'm in urgent need of a Perl module/script (heck, any command line
> > application) that can be used to convert larger numbers of MS Word
> > (.doc) documents into plain text (.txt) files. Anyone know of such a
> > critter? Thanks.
> >
> > Ernie Mercer
> > emercer@wma.com
> 
> I have just been working on such a script and came looking in this newsgroup
> for some advice as well. My first shot at this is to use the UNIX
> (strings) program to parse out all the Ugly Binay stuff and then parse the
> remaning stuff
> as well. I know this is not the BEST way to do this but for my purposes
> (extracting a few lines from a series of word docs) it is working pretty
> well.
> If you would like to see the beginnings of the script let me know.
> 
> You are a programmer working on Writing a script I assume. Otherwise this
> will not do you much good.
> 
> -Mike
> mshavel@erols.com
Perhaps this can help:
Package name:     catdoc
Version number:   0.33
Original author:  V.B.Wagner <vitus@fe.msk.su>
Original URL:    
http://www.nl.debian.org/Packages/unstable/text/catdoc.html
Install tree:     /opt/catdoc
Report bugs to:   steff@csc.liv.ac.uk
Tested on:        HP 9000/715/G running HP-UX 10.20
C compiler used:  Version A.10.32.16
Purpose:
Translates MS-Word files to plain text. I behaves like cat but it reads
MS-Word
files and produces human-readable text on standard output. Optionally
catdoc
can use escape sequences for characters which have special meaning for
LaTeX.
It makes some effort to recognise MS-Word tables. There is a nice
version for
running under wish in this package.
Date archived:    Thu  2 Apr 1998
------------------------------
Date: Sun, 6 Sep 1998 16:33:54 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: or vs || with open function
Message-Id: <EyvFCJ.CsM@world.std.com>
rjk@coos.dartmouth.edu (Ronald J Kimball) writes:
>Andrew M. Langmead <aml@world.std.com> wrote:
>>      open FILE, 'filename' || die "Can't open file: $!\n";
>> 
>> only works in perl 4. In perl 5, it evaluates "'filename' || die ..."
>> first and passes the result to open as the second argument.
>The precedence of '||' changed between perl4 and perl5???
That's not what I said. I said that the context to open() has
changed. (Trying to cover up that the example that I gave was wrong.)
>open FILE, 'filename' || die "Can't open file: $!\n";
>does the same thing in perl4 as it does in perl5, and in neither case is
>it what you'd want.
Your right about this one, what I was thinking about was the 
open FOO || die;
documented in the perltrap man page. It has changed since open() now
always takes a list as an argument.
-- 
Andrew Langmead
------------------------------
Date: Sun, 06 Sep 1998 10:02:04 -0400
From: Ketan Patel <ketanp@NOSPAMxwebdesign.com>
Subject: Password checking?
Message-Id: <35F295DC.9D061B75@NOSPAMxwebdesign.com>
Anyone know how I would go about checking the password on a website? 
For example, if given a URL, a login, and a password, how can I check if
they are valid?  Can I use some module to attempt to retrieve the page
at that URL using the given L/P (using http://login:pass@www.test.com)?
Thanks
------------------------------
Date: Sun, 6 Sep 1998 14:22:26 -0400
From: Andre' Doles <surf@trader.net>
Subject: Perl beautifier
Message-Id: <Pine.SOL.3.95.980906142037.4702G-100000@ns>
Has anyone seen a program that can logically format perl source? We have
some programmers that start *everything* from the left hand side of the
screen and work their way over. There is no structure (indentations etc.)
Help appreciated!
	Andre'
------------------------------
Date: Sun, 6 Sep 1998 10:45:05 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Perl gurus opinion needed.
Message-Id: <1dexk2t.c7htgq1k60680N@bay1-248.quincy.ziplink.net>
Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> wrote:
> > What is _wrong_ with Perl guy? (Note my e-mail address :-)
> 
> nothing...just lacks a certain je nais sais qois...besides...not _all_
> of us are guys :) at least not the last time i checked....
Aren't you from the Midwest?  I grew up in the Midwest, and we used
'guys' to refer to males and females.  :-)
-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sun, 06 Sep 1998 17:30:51 GMT
From: therobot@vegtabl.com
Subject: Re: Perl gurus opinion needed.
Message-Id: <fFzI1.9348$f01.6872079@news.teleport.com>
thor <thor@eznet.net> wrote:
>Tom Phoenix wrote:
>> 
>> A little over a year ago, just after the first Perl Conference, I asked
>> Larry and some others if they knew of a good collective noun for Perl
>> programmers, developers, or hackers. So far, I haven't seen anything worth
>> propagating.
>why not just "perl" as in:
     Prrls just wanna have fun.
------------------------------
Date: Sun, 06 Sep 1998 18:06:50 GMT
From: malch@malch.com (Malcolm Hoar)
Subject: Perl or Windows bug with Sockets?
Message-Id: <6suivr$j4h$2@nntp1.ba.best.com>
Running Gurusamy Sarathy's port on Win NT 4.0 SP3:
This is perl, version 5.004_02
I can create and use TCP/IP sockets just fine. However, 'netstat'
suggests that the sockets are not completely destroyed after a
close(). Dozens of connections are apparently left half-open
until the program exit()'s. Here's a small sample:
  TCP    malch:1878             0.0.0.0:0              LISTENING
  TCP    malch:1887             0.0.0.0:0              LISTENING
  TCP    malch:1896             0.0.0.0:0              LISTENING
  TCP    malch:1905             0.0.0.0:0              LISTENING
  TCP    malch:1914             0.0.0.0:0              LISTENING
Adding a "shutdown ($Mysocket, 2)" before the close() doesn't
appear to help and nor does anything else I have been able to
try.
The easiest way to reproduce the problem is to run the 'lwp-rget'
script included with the 5.004_02 binary distribution for Win 32,
and monitor it with 'netstat -a'.
Is this a Perl problem, Windows problem or just an artifact of
the Win netstat? TIA for any comments.
-- 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Malcolm Hoar           "The more I practice, the luckier I get". |
| malch@malch.com                                     Gary Player. |
| http://www.malch.com/               Shpx gur PQN.                |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: 06 Sep 1998 10:05:33 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Question regarding perl-script as suid
Message-Id: <ylhfyldvdu.fsf@windlord.stanford.edu>
Ekenberg <joreb@algonet.se> writes:
> I'm trying to make a small perl cgi-script to run as its owner (me..).
> The script is chmod 4705 (I also tried 6705) I want it to write to a
> directory that's chmod 700.
> But it doesn't work. Checking the UID:s with $< and $> shows that the
> script is run as nobody, although the suid bit is set.
Are you sure that the system on which you're running this script supports
secure setuid scripts?
-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Sun, 06 Sep 1998 16:03:13 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Randal Schwartz in Dallas on 10/3
Message-Id: <8cyarxrzyr.fsf@gadget.cscaper.com>
>>>>> "Brand" == Brand Hilton <bhilton@tsg.adc.com> writes:
Brand> I've just learned from Randal that he's going to be in Dallas on
Brand> Saturday, October 3rd.  I'll give you more details as plans firm up,
Brand> but in the mean time, everybody in Dallas and Ft. Worth free up your
Brand> Saturday evening!  
Well, if *everybody* in DFW comes, we're gonna need a bigger room.
Say, are those Cowboys using that there little stadium of yours that
evening?
:-)
-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 05 Sep 1998 22:33:32 -0500
From: "Jim Woodgate" <jdw@dev.tivoli.com>
Subject: Re: Reading file names but not directories
Message-Id: <obu32lx6cz.fsf@alder.dev.tivoli.com>
Mike <mhanson@prtel.com> writes:
> I have been using the following code to retrieve the name of the files
> in my directory and its sub directories but how do you PREVENT it from
> listing the sub directory names in their too? I just want it to list all
> the file names in the directory and sub directories.
> $files = "";
> $dir = "$ads_dir/$INPUT{'login'}";
> chdir($dir);
> $ls = `ls $files`;
> @ls = split(/\s+/,$ls);
start with perldoc -f opendir and perldoc -f readdir
Given the first two lines of your code, here is how to get a list of
everything that's not a directory:
opendir(IN,$dir) || die "Could not opendir $dir: $!, stopped";
@ls = grep { ! -d $_ } readdir(IN);
closedir(IN);
If your looking for files in the current directory and below, but
still don't want any directory names.  Do a man find, and find a find
command that does what you want, maybe:
find . -type f -print
then, replace that find with find2perl, to get a perl script which
does the same thing for you:
find2perl . -type f -print
require "find.pl";
# Traverse desired filesystems
&find('.');
exit;
sub wanted {
    (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &&
    -f _ &&
    print("$name\n");
}
-- 
Jim Woodgate 
Tivoli Systems
E-Mail: jdw@dev.tivoli.com
------------------------------
Date: Sun, 06 Sep 1998 18:06:58 GMT
From: e_blumenau@my-dejanews.com
Subject: Regex/File/substitution/CGI
Message-Id: <6suj02$6ni$1@nnrp1.dejanews.com>
Greetings,
  I am working on the old Mad-Libs project as I teach myself Perl.  I have a
form submitting parameters via GET.  Here is (some of) the code:
$stmt = <B>;
while ($temp=<Q>)
  {
    $val = $c->param($key);
#     $stmt =~ s/b/$val/;
    $stmt =~ s/$temp/$val/;
    $i++;
    $key = "t$i";
  }
<B> is the file with the body of the Mad-Lib.  <Q> is the file with the entry
types(NOUN,ADJECTIVE,VERB,etc).  Basically, whereever NOUN appears in $stmt,
I want to replace it with the value from the GET parameter.  The commented
statement works.  So why doesn't the next one?	Why isn't it recognizing
$temp in $stmt?  Obviously I am missing something.  Any help, esp. via email,
would be appreciated.
Eric Blumenau
e_blumenau@yahoo.com
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum
------------------------------
Date: Sun, 06 Sep 1998 18:06:57 GMT
From: e_blumenau@my-dejanews.com
Subject: Regex/File/substitution/CGI
Message-Id: <6suj01$6nh$1@nnrp1.dejanews.com>
Greetings,
  I am working on the old Mad-Libs project as I teach myself Perl.  I have a
form submitting parameters via GET.  Here is (some of) the code:
$stmt = <B>;
while ($temp=<Q>)
  {
    $val = $c->param($key);
#     $stmt =~ s/b/$val/;
    $stmt =~ s/$temp/$val/;
    $i++;
    $key = "t$i";
  }
<B> is the file with the body of the Mad-Lib.  <Q> is the file with the entry
types(NOUN,ADJECTIVE,VERB,etc).  Basically, whereever NOUN appears in $stmt, I
want to replace it with the value from the GET parameter.  The commented
statement works.  So why doesn't the next one?  Why isn't it recognizing $temp
in $stmt?  Obviously I am missing something.  Any help would be appreciated.
Eric Blumenau
e_blumenau@yahoo.com
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum
------------------------------
Date: Sun, 06 Sep 1998 15:44:59 GMT
From: birgitt@my-dejanews.com
Subject: Re: Tom Phoenix: ANSWERS WANTED!
Message-Id: <6sualr$rna$1@nnrp1.dejanews.com>
In article <No.unsoiliciteds-0609980540390001@cs11i36.ppp.infoweb.or.jp>,
  No.unsoiliciteds@dead.end (Norman UNsoliciteds) wrote:
> In article <6ska9g$h2$1@trader.ipf.de>, birgitt@hamburg.citde.net wrote:
>
> > What almosts fascinates me, is that there is apparently this zealeous
> > belief in a couple of posters here assuming that clpm responses to
> > newbie's FAQs are something of great importance. They are not. The
> > answers to real Perl questions are -and they get always very good responses.
>
> What, however does seem to be an issue in this thread,
> is the fact that someone actually takes it upon themselves to be helpful
> and polite (or not).
>
My answers to the original question from Nathan Patwardhan (read in context)
should have made it clear that I found the arguments of Mr. Patwardhan's
point of view unreasonable. Mr. Patwardhan did the right thing in ignoring the
answers HE ASKED FOR. May be he realized that his question was not
that good.
In case you should have missed what I tried to say, here for the record:
I don't complain about polite posters and the arguments brought forward
against Tom Phoenix don't hold and can't be proven. Mr. Patwardhan has
also not tried to defend his own arguments indicating that this thread
should be put to rest.
Birgitt Funk
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum
------------------------------
Date: Sun, 06 Sep 1998 17:06:36 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Tom Phoenix: ANSWERS WANTED!
Message-Id: <wizI1.209$k6.2176672@news.shore.net>
birgitt@my-dejanews.com wrote:
: I don't complain about polite posters and the arguments brought forward
: against Tom Phoenix don't hold and can't be proven. Mr. Patwardhan has
: also not tried to defend his own arguments indicating that this thread
Sorry that you missed the point of my followups but if it's any
consolation, most people did and the folks who I wanted to understand:
understood.  As always, Hope this helps!
--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>
------------------------------
Date: 6 Sep 1998 16:57:37 GMT
From: kortbein@iastate.edu (Josh Kortbein)
Subject: Re: WE MASS E-MAIL YOUR EXCLUSIVE AD TO 900k - $99
Message-Id: <6sueu1$oo7$3@news.iastate.edu>
Jonathan Stowe (Gellyfish@btinternet.com) wrote:
: On 5 Sep 1998 05:32:16 GMT, massmail@aol.com wrote :
: >
: >An unregistered version of Newsgroup AutoPoster PRO
: >posted this article!
: Cheap skate
: >---
: >
: >We will mass e-mail your exclusive ad to 900,000 recipients on the internet!  Talk about $$$$$!
: >Our satisified clients agree... mass e-mails are effective and profitable!  For more info:
: >
: Can someone tell me why that more than 50% of spam is to do with
: creating more spam ?
Spam is a virus?
Josh
-- 
Music is the pleasure the human soul experiences from counting without being
aware that it is counting.
       - Gottfried Wilhelm Leibniz
------------------------------
Date: Sun, 06 Sep 1998 14:55:33 GMT
From: malch@malch.com (Malcolm Hoar)
Subject: Re: Why is 5.005* a pain to switch to safely?
Message-Id: <6su7p3$gpf$1@nntp1.ba.best.com>
In article <86k93h8k2m.fsf@lion.plab.ku.dk>, Anton Berezin <tobez@plab.ku.dk> wrote:
>> I found the Perl 5.005_01 install a major pain (under FreeBSD).
>
>What exactly was wrong with it?  It's not just a curiosity -- it
>worked fine for me on FreeBSD.
I don't recall the *exact* details but Configure did not detect
the right libraries for setting up the load dynamic options
and the build kept blowing up until I figured out some manual
kludges. Even then, there were some failures in 'make test'.
>> Today, I upgraded to 5.005_02 and it was the breeze to which I
>> have become accustomed. Kudos to those who cleaned it up.
5.005_02 was clean as a whistle (including make test) accepting
all of the defaults in Configure. Also, the performance seems
to be significantly improved (~10-20%), at least for one of my
major apps.
-- 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Malcolm Hoar           "The more I practice, the luckier I get". |
| malch@malch.com                                     Gary Player. |
| http://www.malch.com/               Shpx gur PQN.                |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: Sun, 06 Sep 1998 10:13:39 -0400
From: Charles Maier <maierc@chesco.com>
Subject: Re: Windows95, Perl, PWS (IIS)
Message-Id: <35F29893.7E193F55@chesco.com>
Jonathan Stowe wrote:
( Snip..)
    http://www.btinternet.com/docs/map.html
This link does NOT work.  Can you repost the a correct URL?
-- 
Chuck
------------------------------
Date: Sun, 06 Sep 1998 18:43:18 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Windows95, Perl, PWS (IIS)
Message-Id: <35f2d595.763677@news.btinternet.com>
On Sun, 06 Sep 1998 18:14:03 GMT, Sean McKenna wrote :
>On Sun, 06 Sep 1998 10:13:39 -0400, Charles Maier <maierc@chesco.com>
>wrote:
>
>>Jonathan Stowe wrote:
>>( Snip..)
>>    http://www.btinternet.com/docs/map.html
>>
>>
>>This link does NOT work.  Can you repost the a correct URL?
>
>Huh!  Works fine for me.  Maybe you need to try it again.
>
No he was right that should be
http://www.btinternet.com/~gellyfish/docs/map.html
I was getting hassle to go to the pub you know how it is.
This was sunday morning after all.
/J\
-- 
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:
	subscribe perl-users
or:
	unsubscribe perl-users
to almanac@ruby.oce.orst.edu.  
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 3648
**************************************