[12551] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6151 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 28 03:07:15 1999

Date: Mon, 28 Jun 99 00: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           Mon, 28 Jun 1999     Volume: 8 Number: 6151

Today's topics:
    Re: check for NT process (Abigail)
    Re: Command line parameters / Wildcard characters / Rec (Alan Curry)
    Re: Communication between CGI and apache (Abigail)
    Re: Comparing two associative arrays (Mark-Jason Dominus)
    Re: Comparing two associative arrays (Mark-Jason Dominus)
    Re: David J Pimlott/GB/ITEC/ICI is out of the office. (Mark-Jason Dominus)
    Re: David J Pimlott/GB/ITEC/ICI is out of the office. (Abigail)
    Re: deleting part of a string (Ronald J Kimball)
        each-ing on $rec{'thing'}{'subthing'} <design@crucial-systems.com>
    Re: each-ing on $rec{'thing'}{'subthing'} (Larry Rosler)
    Re: each-ing on $rec{'thing'}{'subthing'} <uri@sysarch.com>
    Re: FAQs and attitudes (was Re: How can I read a whole  (Abigail)
        Help with CGI-BIN <match49@hotmail.com>
    Re: how to connect oracle 8 thru perl on NT <chetan_gautam@hotmail.com>
    Re: Linux better than perl? (Jon Bell)
    Re: Linux better than perl? <david@kasey.umkc.edu>
    Re: Linux better than perl? <nedred@my-deja.com>
    Re: Linux better than perl? (Abigail)
    Re: Mr. Christiansen ptimmins@itd.sterling.com
        MX record validation <david@kasey.umkc.edu>
    Re: offline testing of Perl/CGI's (Ronald J Kimball)
    Re: perl script for URLs? (Jon Skeet)
    Re: Perl under Win32--file date. <ehpoole@ingress.com>
    Re: Please don't read, test only <david@kasey.umkc.edu>
    Re: Re-directing stderr (Abigail)
    Re: regex question (Abigail)
    Re: Regular expressions (Tad McClellan)
    Re: Upload Module? (David Efflandt)
        values obtained from a browser in a multiple option lis <derek@realware.com.au>
    Re: weirdness with Netcom (Ronald J Kimball)
    Re: Where can I download Perl? <ppjohn@ncs.com.sg>
    Re: Why is this broken... <portboy@home.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 28 Jun 1999 01:18:43 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: check for NT process
Message-Id: <slrn7ne4tm.v72.abigail@alexandra.delanet.com>

David Cassell (cassell@mail.cor.epa.gov) wrote on MMCXXVII September
MCMXCIII in <URL:news:3776C000.9C162100@mail.cor.epa.gov>:
?? Abigail wrote: 
?? > Clinton Carr (ccarr@websocket.com) wrote on MMCXXVI September MCMXCIII in
?? > <URL:news:3775B05E.DA89CCE1@websocket.com>:
?? > ## Is there a way to check to see if a Win32 application is running?
?? > ## Is there a way to kill a running Win32 application?
?? > 
?? > Press some random keys on the keyboard, or wave with the mouse.
?? > Chance are the OS will crash, and your application will terminate.
?? > 
?? > What does Win32 process management have to do with Perl?
?? 
?? Everything.  Think about it this way:
?? 
?? How would you do win32 process management *without* Perl?


Get a Linux/*BSD/Solaris CD, put it in the CDROM drive and boot the box.



Abigail
-- 
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Mon, 28 Jun 1999 06:07:38 GMT
From: pacman@defiant.cqc.com (Alan Curry)
Subject: Re: Command line parameters / Wildcard characters / Recursive    directories
Message-Id: <KiEd3.7443$d5.970836@news21b.ispnews.com>

In article <37765AED.654704B4@cc.gatech.edu>,
Eric Anderson  <eman@cc.gatech.edu> wrote:
>
>Well, I guess there isn't a way to get it to do what I want it to do. Oh
>well, thanks for everybody's help. Since this script will be mainly run
>on Win32 I will get it to work there how I want and for UNIX quotes will
>have to be required. Again thanks for everybody's help in clearing up
>how some things worked.
>

You have achieved understanding, but not enlightenment.

A unix user does not _want_ your program to do recursive file finding. A unix
user already has a tool to do that, called "find". If he wants to run foo on
all files matching *.gz that are found below the current subdirectory, he
will say

  foo `find . -name '*.gz' -print`

If he does that kind of thing frequentely and gets tired of typing all that
suff, he will become a zsh user and then he will say

  foo **/*.gz

You would rather have him say

  foo -R '*.gz'

and that will work, but there is no need for it. Why should he bother with
your -R flag and quoted globs when he already has two methods of achieving
the same thing, which are not limited to your specific foo program?

The above listed methods do not follow symlinks to directories encountered
during the recursion. If the unix user wants to have the search include
symlinked directories, he will say

  foo `find . -follow -name '*.gz' -print`

or, for the zsh user,

  foo ***/*.gz

If he was foolish enough to use your -R flag, would you also provide the
-follow flag to follow symlinks? Will you then add an option to exclude files
whose size is less than 10k or greater than 10 megs? Both find and zsh
extended globs can do this easily. You will have to reinvent a lot of wheels
to make your -R flag as useful as the file-finding functionality that came
with the system and is already integrated with the command line environment.

If you write a dozen useful programs, and each of them includes their own
recursion flag, with slightly different semantics, the whole system just got
a lot harder to learn than if each user only had to learn one file-finding
program that he could apply to all of his command lines in a consistent way.

Work with the system, not against it.
-- 
Alan Curry    |Declaration of   | _../\. ./\.._     ____.    ____.
pacman@cqc.com|bigotries (should| [    | |    ]    /    _>  /    _>
--------------+save some time): |  \__/   \__/     \___:    \___:
 Linux,vim,trn,GPL,zsh,qmail,^H | "Screw you guys, I'm going home" -- Cartman


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

Date: 28 Jun 1999 01:45:30 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Communication between CGI and apache
Message-Id: <slrn7ne6fr.v72.abigail@alexandra.delanet.com>

weixian_shen@my-deja.com (weixian_shen@my-deja.com) wrote on MMCXXVII
September MCMXCIII in <URL:news:7l6knh$3vj$1@nnrp1.deja.com>:
[] I am writing a web search engine.  It search engine is very
[] CPU intensive, and may take up to 2~3 min to complete.  I would
[] like to stop the search when users become inpatient and hit
[] the "STOP" button on the browser.  Is there a way to detect that
[] from the CGI?  I thought apache will send a SIGPIPE or SIGHUP,
[] but it doesn't.  Any suggestion will be greatly appreciated.


Read the manual of your server to see how it tells your program
that the reader has pushed the stop button.

Then use that method.

clpm is not the group to ask about the behaviour of apache.
For question about behaviour of apache, call apache tech support.



Abigail
--
    Anyone who slaps a "this page is best viewed with Browser X" label
    on a Web page appears to be yearning for the bad old days, before the
    Web, when you had very little chance of reading a document written on
    another computer, another word processor, or another network.
	    [Tim Berners-Lee in Technology Review, July 1996]
-- 
    Anyone who slaps a "this page is best viewed with Browser X" label
    on a Web page appears to be yearning for the bad old days, before the
    Web, when you had very little chance of reading a document written on
    another computer, another word processor, or another network.
	    [Tim Berners-Lee in Technology Review, July 1996]


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Mon, 28 Jun 1999 04:30:46 GMT
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Comparing two associative arrays
Message-Id: <7l6tof$o4e$1@monet.op.net>

In article <3776426b.3875343@news.skynet.be>,
Bart Lateur <bart.lateur@skynet.be> wrote:
>The exact order is determined by the hashing
>function. "Pseudo-random" is more like it. Therefore, if all keys are
>identical, their order (in "foreach (keys %hash)", for example) will be
>the same, too.

Sorry, Bart.  This gets my nomination for this month's `little
knowledge is a dangerous thing' award. 

	#!/usr/bin/perl
	
	%h1 = (acd => 1, aaf => 1);
	%h2 = (aaf => 1, acd => 1);
	
	print "It didn't work.\n" unless "@{[%h1]}" eq "@{[%h2]}";

Guess what?   It didn't work.



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

Date: Mon, 28 Jun 1999 04:41:44 GMT
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Comparing two associative arrays
Message-Id: <7l6ud5$o7d$1@monet.op.net>

In article <7l6tof$o4e$1@monet.op.net>, Mark-Jason Dominus <mjd@op.net> wrote:
>Guess what?   It didn't work.

I forgot to mention: Thanks to John Cochran, because without his post
on this matter I probably wouldn't have thought about it.





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

Date: Mon, 28 Jun 1999 04:55:12 GMT
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: David J Pimlott/GB/ITEC/ICI is out of the office.
Message-Id: <7l6v66$obj$1@monet.op.net>

In article <8025679E.00007C8B.00@gbrhn001.ici-group.com>,
 <david_pimlott@ici.com> wrote:
>IMPORTANT NOTICE:
>This email is confidential, may be legally privileged, and is for the
>intended recipient only.  Access, disclosure, copying, distribution, or
>reliance on any of it by anyone else is prohibited and may be a criminal
>offence.  Please delete if obtained in error and email confirmation to the
>sender.

OK DUDE I DELETED IT PLZ DONT SUE ME!!!!!!


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

Date: 28 Jun 1999 01:37:41 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: David J Pimlott/GB/ITEC/ICI is out of the office.
Message-Id: <slrn7ne617.v72.abigail@alexandra.delanet.com>

david_pimlott@ici.com (david_pimlott@ici.com) wrote on MMCXXVII September
MCMXCIII in <URL:news:8025679E.00007C8B.00@gbrhn001.ici-group.com>:
== 
== IMPORTANT NOTICE:
== This email is confidential, may be legally privileged, and is for the
== intended recipient only.  Access, disclosure, copying, distribution, or
== reliance on any of it by anyone else is prohibited and may be a criminal
== offence.  Please delete if obtained in error and email confirmation to the
== sender.


By distributing this on Usenet, does that make you a criminal?



Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Mon, 28 Jun 1999 01:17:34 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: deleting part of a string
Message-Id: <1du33h5.18b1mnp4au2ioN@p108.tc1.metro.ma.tiac.com>

Abigail <abigail@delanet.com> wrote:

> () > ** Longer to type, yes....
> () > ** but beside to mererly show another way, I also
> () > ** blindly assumed that he wanted to extract string
> () > ** contains file path (or URL).  And that's what
> () > **                         ^
> () > **                         |
> () > **                         +--------------------+

> [snip]

> ()                                                   |
> () This is the first mention of URLs in this thread. |How do you know that
>                                  |                   |
>                                  +-------------------+

Oops!  This was not the first mention of URLs in this thread.  Sorry
about that.

You were absolutely right to point out that File::Basename is not
appropriate for URLs.

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Mon, 28 Jun 1999 01:52:11 -0400
From: "crucial" <design@crucial-systems.com>
Subject: each-ing on $rec{'thing'}{'subthing'}
Message-Id: <930549323.729.34@news.remarQ.com>

hello, I'm trying to figure out how to iterate over the
inner and the outer hashes as in the example below.


$qr{'a'}{11}='first';
$qr{'a'}{12}='justasec';
$qr{'b'}{35}='something';
$qr{'b'}{42}='else';

while(($key,$value) = each (%qr)) {
 print " $key $value \n";

}

this above prints :

   a HASH(0x6d4b5c8)
   b HASH(0x6d4d7b8) 

so $value is a hash as one might suspect.
but 'each' doesn't believe me...

$qr{'a'}{11}='first';
$qr{'a'}{12}='justasec';
$qr{'b'}{35}='something';
$qr{'b'}{42}='else';

while(($key,$value) = each (%qr)) {
 print " $key $value \n";

 while(($key2,$value2) = each ($value)) {
  print " $key2 $value2 \n ";

}

# Type of arg 1 to each must be hash (not scalar deref), near "$value)"
File 'Untitled #2'; Line 11
# Execution of Untitled #2 aborted due to compilation errors.


Or do I have to find another way ?


__________________________________________ :\\_______
                          http://crucial-systems.com                        
               
__________________________________________ :\\_______


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

Date: Sun, 27 Jun 1999 23:38:00 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: each-ing on $rec{'thing'}{'subthing'}
Message-Id: <MPG.11e0b819ad9a761a989c61@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <930549323.729.34@news.remarQ.com> on Mon, 28 Jun 1999 
01:52:11 -0400, crucial <design@crucial-systems.com> says...
 ...
> while(($key,$value) = each (%qr)) {
>  print " $key $value \n";
> 
>  while(($key2,$value2) = each ($value)) {
>   print " $key2 $value2 \n ";
> }
> 
> # Type of arg 1 to each must be hash (not scalar deref), near "$value)"
> File 'Untitled #2'; Line 11
> # Execution of Untitled #2 aborted due to compilation errors.
> 
> Or do I have to find another way ?

No.  Just let the diagnostic be your guide.  It says it wants a hash, so 
give it a hash, not a reference to a hash.

   while(($key2,$value2) = each (%$value)) {

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 28 Jun 1999 02:43:56 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: each-ing on $rec{'thing'}{'subthing'}
Message-Id: <x7wvwo6d03.fsf@home.sysarch.com>

>>>>> "c" == crucial  <design@crucial-systems.com> writes:

  c>    a HASH(0x6d4b5c8)
  c>    b HASH(0x6d4d7b8) 

  c> so $value is a hash as one might suspect.
  c> but 'each' doesn't believe me...

no, each is right. you are wrong. trust perl, it knows what is right for
you.

  c> while(($key,$value) = each (%qr)) {
  c>  print " $key $value \n";

  c>  while(($key2,$value2) = each ($value)) {

$value is a hash, and each takes a hash and not a ref, so you have to
convert it. this is done by simply either prepending a % in this case or
in the more general case, wrapping it with %{}.

  c> Or do I have to find another way ?

not another way, but the right way. read perlref and perldsc for more
help. then read them again. then have your mother read them to you as a
goodnight story. then you will know hash refs. and then they will be your
tools and not your demons.

uri


-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: 28 Jun 1999 01:32:17 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: FAQs and attitudes (was Re: How can I read a whole file in one go ?)
Message-Id: <slrn7ne5n3.v72.abigail@alexandra.delanet.com>

Larry Rosler (lr@hpl.hp.com) wrote on MMCXXVI September MCMXCIII in
<URL:news:MPG.11e04221215b7b07989c5c@nntp.hpl.hp.com>:
:: In article <slrn7nd197.v72.abigail@alexandra.delanet.com> on 27 Jun 1999 
:: 15:10:28 -0500, Abigail <abigail@delanet.com> says...
:: > Larry Rosler (lr@hpl.hp.com) wrote on MMCXXVI September MCMXCIII in
:: > <URL:news:MPG.11df207e5d066137989c52@nntp.hpl.hp.com>:
:: > -- In article <slrn7nas3k.npo.abigail@alexandra.delanet.com> on 26 Jun 1999 
:: > -- 19:29:53 -0500, Abigail <abigail@delanet.com> says...
:: > -- ...
:: > -- > $ cd ~/Src/perl5.005_57/pod
:: > -- > $ cat *.pod | grep -ci 'billtax'
:: > -- > 1
:: > -- > $ cat *.pod | grep -ci 'prisoner of bill'
:: > -- > 1
:: > -- > $
:: > --
:: > -- I think Randal owes you two Useless Use of Cat Awards for that.  Or 
:: > -- perhaps only one.  :-) 
:: > 
:: > Oh really? How would you do this without cat then?
:: > 
:: > (Hint: grep -ci 'billtax' *.pod doesn't give the same output, and quickly
:: > glancing over the man page of grep didn't enlighten me with a command line
:: > option that did.)
:: 
:: When the total count is 1, the summing done by the cat doesn't add 
:: information, and it loses the other datum produced by grepping the files 
:: themselves, the name of the file in which the single match is found.

Well, yeah. I could just have posted all the podfiles, just to minimize
the loss of information. But I wanted to minimize the number of lines.

:: OK.  So that's a special case.  However...

No. It's the _general_ case. Many "useless uses of cat" are handed out
for the special case (dealing with one file). 

:: You could also get your exact result in general without cat, by:
:: 
:: grep -ci 'billtax' *.pod |
::     perl -ne '/(\d+)$/ and $i += $1; END { print "$i\n" }'

Well, yes, but that's a useless use of perl. Piping the output of grep in
perl, such that get the same output as when using cat, just to avoid using
cat is silly in my book.

And you missed a backslash.

I could also have done:

perl -pe0 *.pod | grep -ci 'billtax'  # Look ma, no cat!

but that would have been equally silly.

:: I'm sure that last command would be easier to write in Awk, but I'm 
:: rustier in that these days and I'd better show some Perl here in any 
:: case.

I first considered using awk. Then I realized cat was more efficient
in programmer time.

:: OK, maybe your way was easier to write after all.  :-)

Yes. I even thought 'I bet there will be someone claiming this is a
useless use of cat' ....

People should think first, then wave with awards.


Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
 .qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
 .qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Mon, 28 Jun 1999 02:12:20 -0400
From: sam <match49@hotmail.com>
Subject: Help with CGI-BIN
Message-Id: <37771243.4D100483@hotmail.com>


--------------6E11301607BE8216A4048765
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I've download it a Shopping Cart Script from
http://www.arpanet.com/PerlShop/perlshop.html#What's New
if there's  anyone who has the time and patience to explain to me how to
install the script into my CGI-BIN, it will be very nice of him or her.
I will make it up to you.
There is instruction on this web page but I don't understand since I'm
new to CGI and Perl. Please be kind and help me with this, I really need
to know how this thing work.

(Sorry for the bad English, I'm from Quebec and I'm forced to learn
French as the first language.)
Thanks
ICQ me at  7890531

--------------6E11301607BE8216A4048765
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
I've download it a Shopping Cart Script from <A HREF="http://www.arpanet.com/PerlShop/perlshop.html#What">http://www.arpanet.com/PerlShop/perlshop.html#What</A>'s
New
<br>if there's&nbsp; anyone who has the time and patience to explain to
me how to install the script into my CGI-BIN, it will be very nice of him
or her. <b>I will make it up to you</b>.
<br>There is instruction on this web page but I don't understand since
I'm new to CGI and Perl. Please be kind and help me with this, I really
need to know how this thing work.
<p>(Sorry for the bad English, I'm from Quebec and I'm forced to learn
French as the first language.)
<br>Thanks
<br><b>ICQ me at&nbsp; 7890531</b></html>

--------------6E11301607BE8216A4048765--



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

Date: Mon, 28 Jun 1999 05:37:54 GMT
From: CHETAN <chetan_gautam@hotmail.com>
Subject: Re: how to connect oracle 8 thru perl on NT
Message-Id: <7l71nh$7v9$1@nnrp1.deja.com>

In article <37709D8F.180761B2@hotmail.com>,
  Richard H <rhrh@hotmail.com> wrote:
> > reference and comments both are welcome :)
>
> > my $field ;
> > while (($field) = $cursor->fetchrow_array()) {
>
> comment :-), do you really want to be reading an array into a
scalar???
> unless of course that was your intention!,
>
> Richard H
>





You caught that :-)
Any way that was the intention that time
just to handshake between the Oracle and Perl
Now I  have to figureout this
I think I shd take an array at that place
instead of scalar.Am I correct ?????

Regards
Chetan


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Mon, 28 Jun 1999 04:49:53 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: Linux better than perl?
Message-Id: <FE0tF5.IAw@presby.edu>

 J.Y. <joey@hecnyyvr.com> wrote:
>Linux better than perl?

I think this is the same guy who posted "Linux better than C++?" in
comp.lang.c++.  :-/

-- 
Jon Bell <jtbell@presby.edu>


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

Date: Mon, 28 Jun 1999 05:14:22 +0000
From: "David L. Nicol" <david@kasey.umkc.edu>
To: "J.Y." <joey@hecnyyvr.com>
Subject: Re: Linux better than perl?
Message-Id: <377704AE.F035C993@kasey.umkc.edu>

"J.Y." wrote:
> 
> Linux better than perl?
> -JY

Las Vegas better than blackjack?

________________________________________________________________________
  David Nicol 816.235.1187 UMKC Network Operations david@news.umkc.edu
                 "multiple valid approaches exist"


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

Date: Mon, 28 Jun 1999 05:26:32 GMT
From: Nedret <nedred@my-deja.com>
Subject: Re: Linux better than perl?
Message-Id: <7l7121$7pe$1@nnrp1.deja.com>

In article <7l6lmt$vio$10@newsfeed.smartt.com>,
  joey@hecnyyvr.com (J.Y.) wrote:
> Linux better than perl?
> -JY
>
>

- What is the difference between the crocodile?
- The crocodile is longer than green.

:-)

--
Nedret


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 28 Jun 1999 01:39:33 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Linux better than perl?
Message-Id: <slrn7ne64p.v72.abigail@alexandra.delanet.com>

J.Y. (joey@hecnyyvr.com) wrote on MMCXXVII September MCMXCIII in
<URL:news:7l6lmt$vio$10@newsfeed.smartt.com>:
== Linux better than perl?


Potatoes better than blankets?



Abigail
-- 
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
             "\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
             "\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Mon, 28 Jun 1999 04:45:19 GMT
From: ptimmins@itd.sterling.com
Subject: Re: Mr. Christiansen
Message-Id: <7l6ukt$75g$1@nnrp1.deja.com>

In article <7l00m6$qi3$1@holly.prod.itd.earthlink.net>,
  "Laran Coates" <lcoates@bu.edu> wrote:

[snip]
> I got in touch with you personally because you clearly know what's
> going on in the world of perl and I wanted your advice on how I
> should proceed.  Should I continue writing the script myself?  If so,
> do you have any particularly good suggestions for resources where I
> can get advice on how to proceed with the script and get some help
> debugging it.  In addition, what are your comments on the safety
> concerns and potential problems mentioned by the person who replied
> to my previous post? Otherwise, how much do you think it would cost
> to get someone to write something like what I described?  And
> where would I find them?

Additionally, which is better: steak or lobster? Would you recommend
using a Preferred Provider or an HMO for general healthcare? Is the
stock market overvalued or is it still in a sustainable growth phase?
What is the top air-speed velocity of a stone-laden swallow? And
finally, as others have argued, Linux better than Perl?

Any help is appreciated.

$monger{Omaha}[0]
Patrick Timmins
ptimmins@itd.sterling.com


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Mon, 28 Jun 1999 05:33:15 +0000
From: "David L. Nicol" <david@kasey.umkc.edu>
Subject: MX record validation
Message-Id: <3777091B.5B81D169@kasey.umkc.edu>


This issue is not dealt with at

http://language.perl.com/newdocs/pod/perlfaq9.html#How_do_I_send_mail_

Who has a good method for validating an e-mail domain exists? 

I'm looking for something tighter than

sub GoodMXp($){my $hostname=shift;
  my $digreply=`(dig +pfmin $hostname; dig MX +pfmin $hostname)|grep -v
^\;\;`;
  $digireply =~ m/\S/s and return 1;
  return 0;
};



  


________________________________________________________________________
  David Nicol 816.235.1187 UMKC Network Operations david@news.umkc.edu
                 "multiple valid approaches exist"


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

Date: Mon, 28 Jun 1999 01:17:35 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: offline testing of Perl/CGI's
Message-Id: <1du343k.2eb3r2uu3cgqN@p108.tc1.metro.ma.tiac.com>

Laar <laar@ix.netcom.com> wrote:

> On 27 Jun 1999 16:18:47 -0500, abigail@delanet.com (Abigail) wrote:
> 
> >So, what's your Perl question?
> 
> Was it *really* that unclear to you Abigail, or are you just in a bad
> mood? Or does it just bother you prefer that a queries was posted here
> involving Perl in combination with other factors? As you read, my
> dilema involved multiple possible factors, including an HTML doc, a
> browser, and a Perl CGI script.
> 
> The question is, Why were you compelled to spew out such a snotty
> response? Jeez, Abby, cheer up.

Your question was about how to get your CGI script to execute.  Note
that CGI scripts can be written in any language.  If your CGI script
runs properly from the command line, but you have trouble running it via
CGI, then it's not a Perl problem, and it should be asked in a more
appropriate newsgroup; either one about CGI, or one about your web
server.

If you want to know why people who ask off-topic questions like this get
snotty responses, then you haven't been reading the newsgroup long
enough.  (You _did_ read the newsgroup before posting, right?  Basic
rule of netiquette, you know...)

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Mon, 28 Jun 1999 08:01:37 +0100
From: skeet@pobox.com (Jon Skeet)
Subject: Re: perl script for URLs?
Message-Id: <MPG.11e12e2d9b5bad92989901@news>

gellyfish@gellyfish.com wrote:

> Of course it isnt anything to do with Perl but I think that you might
> either want to replace that "\n" on every row with "<BR>\n" or use
> a list as Bart suggested .

Whoops, doh :)

Indeed. Hopefully the original poster can work that bit out :)

-- 
Jon Skeet - skeet@pobox.com
http://www.pobox.com/~skeet/


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

Date: Tue, 29 Jun 1999 01:08:23 -0400
From: "Ethan H. Poole" <ehpoole@ingress.com>
Subject: Re: Perl under Win32--file date.
Message-Id: <377854C7.7EB1EDFB@ingress.com>

Jeremy wrote:
> 
>     How do I retrieve the date on a file with Perl under Win32?
> 
>     -Jeremy

The same way you would under UNIX.

hint: stat()

-- 
Ethan H. Poole           ****   BUSINESS   ****
ehpoole@ingress.com      ==Interact2Day, Inc.==
(personal)               http://www.interact2day.com/


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

Date: Mon, 28 Jun 1999 05:16:00 +0000
From: "David L. Nicol" <david@kasey.umkc.edu>
Subject: Re: Please don't read, test only
Message-Id: <37770510.13A14C6F@kasey.umkc.edu>

"j.k." wrote:
> 
> Please don't read, test only

what?
 
________________________________________________________________________
  David Nicol 816.235.1187 UMKC Network Operations david@news.umkc.edu
                 "multiple valid approaches exist"


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

Date: 28 Jun 1999 01:41:22 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Re-directing stderr
Message-Id: <slrn7ne686.v72.abigail@alexandra.delanet.com>

Greg Miller (gmiller@iglou.com) wrote on MMCXXVII September MCMXCIII in
<URL:news:3777e061.316706619@news.alt.net>:
<> 	How can stderr be redirected to stdio?
<> 
<> Greg Miller: Senior Consultant 


*Senior* Consultant? And unable to read the FAQ? 



Abigail
-- 
perl -wlne '}{print$.' file  # Count the number of lines.


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 28 Jun 1999 01:35:02 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: regex question
Message-Id: <slrn7ne5sa.v72.abigail@alexandra.delanet.com>

Gene Dolgin (Gened@ohinter.net) wrote on MMCXXVII September MCMXCIII in
<URL:news:3776E9A8.380A6460@ohinter.net>:
:: How do i set $1 and $2, i was told for some reason, that $1 and $2 would
:: automatically be the results...

I'd tell you, but you reverse the order of quoted material and your
reply. On top of that, you quote the entire message, including sig
and advertisement.

Please come back when you've learned some basic Usenet rules.

Don't be afraid to read news.announce.newusers.



Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sun, 27 Jun 1999 19:18:03 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Regular expressions
Message-Id: <bfb6l7.qr1.ln@magna.metronet.com>

eliot5581@my-deja.com wrote:

: I'm fairly new to Perl and have come up against a problem with regard
: to regular expressions.

: What I want to do is grab from an HTML file the first entry of the form
: <TABLE>
: any html goes here
: </TABLE>


   I don't think you are having a problem with regular expressions
   (see how simple they are below).

   I think you just don't know about the "range operator".

   It is discussed in the "Range Operators" section of the 
   perlop.pod man page. In the code elow it is used in 
   a scalar context.


: Any hints on how I can get this info. via a regular expression, or a
: better way of doing it would be appreciated.


----------------------
#!/usr/bin/perl -w
use strict;

while (<DATA>) {
   print if m#<TABLE>#i .. m#</TABLE>#i;

   last if m#</TABLE>#i;
}

__DATA__
<TABLE>
 .
 .
first any html goes here
 .
 .
</TABLE>
----------------------


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 28 Jun 1999 05:25:50 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Upload Module?
Message-Id: <slrn7ne1mj.1iv.efflandt@efflandt.xnet.com>

On Mon, 21 Jun 1999 22:28:39 -0400, Matt <splinter@monmouth.com> wrote:
>Hi,
>
>Anyone know of any modules used for uploading images of types such as .gif
>or .jpeg.  I'm sure they are out there, I have seen some I'm pretty sure but
>I need an opinion on a "best one".

Uploading from where?  This sounds like a CGI question in disguise, so you
may want look at CGI.pm (perldoc CGI).  It will do forms and file upload
among other things.

-- 
David Efflandt   efflandt@xnet.com   http://www.xnet.com/~efflandt/
http://www.de-srv.com/   http://cgi-help.virtualave.net/


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

Date: Mon, 28 Jun 1999 14:59:11 +1000
From: Derek Lavine <derek@realware.com.au>
Subject: values obtained from a browser in a multiple option list
Message-Id: <3777011E.19DEF9C0@realware.com.au>

Hi all

I have an HTML page that contains the following option controll. That
will allow the user to specifiy multiple OS's

<select name=platform_list multiple size=4>
    <option value=32> Mac OS X
    <option value=2> MacOS
    <option value=8> Netware 4
    <option value=16> Netware 5
    <option value=0 selected> None specified
    <option value=4> Unix/Linux
    <option value=1> Win95/98 NT
</select>

My perl script read this from the browser using

use CGI;

 ....

$platforms = param("platform_list" );

 ....

if I now print $platforms I only get the one of the selections made in
the list. Does any one know how to get all the selections made by the
user.

Thanks for any help you may be able to offer

Derek



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

Date: Mon, 28 Jun 1999 01:17:36 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: weirdness with Netcom
Message-Id: <1du34jx.1kgn08w1k0ohkiN@p108.tc1.metro.ma.tiac.com>

Laar <laar@ix.netcom.com> wrote:

> Problem: I'm going through the write --> upload --> test --> debug -->
> upload again ... cycle, and when I upload a new version of a script,
> the upload just seems to corrupt the existing script rather than
> replace it. FWIW, the same thing was happening with HTML docs
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Then this is obviously not a Perl problem.  Why are you asking here,
isntead of contacting your ISP's technical support?


> Any idea why an FTP upload would corrupt a file rather than replace
> it?

Perhaps a newsgroup about FTP would be a more appropriate place for this
question?

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Mon, 28 Jun 1999 12:59:12 +0800
From: John Paopeng <ppjohn@ncs.com.sg>
Subject: Re: Where can I download Perl?
Message-Id: <37770120.74CE602A@ncs.com.sg>

Patrick wrote:
> 
> As title
> 
> Patrick

www.perl.com
there is link there.. just look at it..

John
-- 
=========================================================================
mailto:ppjohn@ncs.com.sg
PGP key: http://www.nai.com/products/security/public_keys/lookup_key.asp
Home page: http://www.geocities.com/TheTropics/Island/5251/
==========================================================================


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

Date: Mon, 28 Jun 1999 06:18:12 GMT
From: Mitch <portboy@home.com>
Subject: Re: Why is this broken...
Message-Id: <3777136D.6F715406@home.com>

Does anyone have any ideas why this doesn't work?  I'm still totally stumped
as to why it is broken??????  I've put in print statements all over the
place, but can't figure out why it is writing just the portion I want to the
file, and wiping everything else out.

frustrated, mitch





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

Date: 12 Dec 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 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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