[9305] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2900 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 18 13:17:48 1998

Date: Thu, 18 Jun 98 10:00:31 -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           Thu, 18 Jun 1998     Volume: 8 Number: 2900

Today's topics:
    Re: 2 questions about lists (Larry Rosler)
    Re: ?CGI scripts & Explorer (Larry Rosler)
    Re: Array Combinations Question <merlyn@stonehenge.com>
    Re: Excel - Perl conversion <msazonov@usa.net>
    Re: Excel - Perl conversion <schwartz@cs.tu-berlin.de>
    Re: first language <nguyend7@egr.msu.edu>
    Re: hmmm, suggestions? <upsetter@ziplink.net>
        How to use Socket.pm? (Michael Budash)
    Re: htpasswd in perl? (Joseph A. DiVerdi, Ph.D.)
    Re: I need help with my ^M problem. <burright@umbc.edu>
        Module Problems: IO object version 1.19 does not match  <intern.bill.goerlich@bentley.com>
        NT and CGI scripts using PERL.  Help! <Johnny.Sandaire@bmc.org>
        NT Challenge and Response Authentication <warp@internetcom.com.br>
    Re: NT Challenge and Response Authentication <bowlin@sirius.com>
    Re: Overriding a method <merlyn@stonehenge.com>
    Re: Perl CGI NT 4.0 follow up <warp@internetcom.com.br>
    Re: perl command line options (Larry Rosler)
        Perl program prakashpatel@hotmail.com
    Re: Perl program (Real)
    Re: Perl program <bowlin@sirius.com>
    Re: Perl with ASP? <warp@internetcom.com.br>
    Re: Processing Binary file with Perl. <rootbeer@teleport.com>
        Puzzled by int() <jvillani@lmi.org>
    Re: Puzzled by int() <bowlin@sirius.com>
    Re: regex terminator not allowed in comment in extended <rootbeer@teleport.com>
    Re: REVIEW: Perl CGI Programming - No Experience Requir (Ken Fox)
    Re: Search a file on a unix system. (Stuart McDow)
        subject and sender using open mail <claudio@crpweb.com>
        suppressing DBI error message <mislam@mindspring.net>
    Re: suppressing DBI error message (John D Groenveld)
        system() fails with 65280 <lrb@mesasys.com>
        Updated Win32::ASP <msergeant@ndirect.co.uk>
        which dynaloader for SCO 3.2v5.04 <bill@TechServSys.com>
    Re: wrap() (Tad McClellan)
        ZenSearch needs a programmer (James T Kendall)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 18 Jun 1998 09:04:20 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: 2 questions about lists
Message-Id: <MPG.ff2da4d90ebdac79896c1@nntp.hpl.hp.com>

In article <6manej$r0n$1@pegasus.csx.cam.ac.uk>, M.J.T. Guy 
<mjtg@cus.cam.ac.uk> says...
> Alex Farber <alex@kawo2.rwth-aachen.de> wrote:
> >
> >2) what happens if i do a foreach()-loop on some @list
> >and the push smth in that list IN THIS LOOP ? Like:
> >
> >foreach $elem (@list)
> >{
> >    push @list, 'xxx' if ...
> >}
> 
> "perldoc perlsyn" says about this
> 
>      If any part of LIST is an array, foreach will get very
>      confused if you add or remove elements within the loop body,
>      for example with splice.   So don't do that.

I think a subtle distinction between list and array is involved here, and 
perhaps worth more discussion.

Remember the poster who asked whether 'foreach (sort ...' caused the sort 
to be done on every loop iteration?  He was shown by various means that 
the list argument for foreach is evaluated once, before the iteration 
begins. 

How, then, is this different:  'foreach (list, @array, list) ...'? 
Because the foreach iterator (implicit $_ or explicit scalar variable) is 
an alias -- a ref -- for the current operand.  These *refs* are 
calculated and saved before the iteration begins.  As the documentation 
states clearly, changes made via these refs effect changes in the array.  
But if the array moves about after the iteration begins, "foreach will 
get very confused" because the refs are invalidated.  And this chaos 
occurs even if the refs are used only to read -- not to change -- the 
values in the array.

The distinction between list and array arguments for foreach is that 
lists cannot move during the iteration, so the refs to their values are 
valid throughout.  Writing via the refs happens, but has no visible 
effect because the list values are discarded after the iteration.  But 
array values persist.

I'm sure someone familiar with the perl implementation will clarify or 
correct my attempt to understand this situation.

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


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

Date: Thu, 18 Jun 1998 09:23:10 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: ?CGI scripts & Explorer
Message-Id: <MPG.ff2dec957d5f6ff9896c3@nntp.hpl.hp.com>

In article <3588FDC1.83B11E68@inlink.com>, Brent Michalski 
<perlguy@inlink.com> says...
> This reminds me of the joke where the guy goes into the doctors and
> says:
> 
> "Doctor, it hurts when I raise my arm."  
> 
> so the doctor says:
> 
> "Don't raise your arm."
> 
> HAHAHA ROTFL HAHAHA
> 
> I had a similar problem with a script, once I quit using Internet
> Exploder, it worked fine...  (There was nothing wrong with the script
> BTW.)

Pardon me for offending by sexual analogies, but these and the other 
similar responses are masturbatory:  "*I* had a similar problem" "*I* 
quit using Internet Explorer".  In real life, as in real sex, it takes 
two (or more) to tango.

*I* get paid for writing programs that other people access over the web 
using whatever client they damn please.  My job is to generate output  
that all HTTP/HTML standards-conforming clients will accept.  (In the 
recent past, this job has included notifying Netscape of a standards 
violation in one of their betas, which fortunately they fixed before 
product release.)

I challenge your statement above:  (There was nothing wrong with the 
script BTW.)  And "HAHAHA ROTFL HAHAHA" is just plain wrong.  It isn't 
funny at all.

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


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

Date: Thu, 18 Jun 1998 13:57:20 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Array Combinations Question
Message-Id: <8cpvg6dd8q.fsf@gadget.cscaper.com>

>>>>> "F" == F Quednau <quednauf@nortel.co.uk> writes:

F> John Porter wrote:
>> for ( rec( \@array ) ) {
>> print "$_\n";
>> }
>> 
>> sub rec {
>> my( $ar, @stack ) = @_;
>> return "@stack" unless @$ar;
>> my( $head, @a ) = @$ar;
>> map { rec( \@a, @stack, $_ ) } @$head;
>> }

F> How many years of Perl programming do I have to do to produce an answer like
F> that ?

Well, one year, presuming you have also done two years of Prolog. :)

That's certainly speaking Perl with a Prolog accent.  Or is it Lisp?

If that was *my* code, I'd have put the comment "NO USER SERVICABLE
PARTS INSIDE" above it. :-)

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 75 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
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: Thu, 18 Jun 1998 18:05:54 +0400
From: "Michael Sazonov" <msazonov@usa.net>
Subject: Re: Excel - Perl conversion
Message-Id: <6mb6rr$f8k@xpress.inforis.nnov.su>

Deva Seetharam wrote in message
<6ma0mn$dj0@newsops.execpc.com> ...
>
>Juli@my-dejanews.com wrote:
>
>> I am looking for a script that will convert excel into
perl.
>> Any idea if a script like this exists?  and where I could
possibily obtain it?
>
>If u want to read a Excel file in perl, you can save the
file in csv format.Fields
>will be separated by commas; perl can read the file using
>comma as FS and if the fields contain any commas, the field
will be quoted.
>
>If u want to do it programatically, I know of one tool
called XESS,
>it can read excel files and convert into unix text file
format.
>
>Have a look at http://www.ais.com, for further details.
>
If you work on Wintel, I recommend Win32:OLE or Win32:ODBC
packages. Well, you have to install MS Excel 97 and Excel
ODBC driver (available with MS Access).

If you want a script that convert Excel to CSV format, look
the following.

=to_csv_m.pl
$#ARGV+1 > 0 or die "usage: to_csv_m.pl <filemask>\n";

$xlCSV = 6;            # Microsoft constant

print "Converting to CSV format\n";
use OLE;
$excel = CreateObject OLE 'Excel.Application'
 or die "\nCouldn't create new instance of Excel App!!\n";
$excel->{'Visible'} = 0;

$curdir = `cd`;
$curdir =~ s/\n$/\\/;
while($path = shift @ARGV) {
  $path =~ /^(.*\\)?([^\\]+)$/;        # select path and
filename
  ($argpath, $name) = ($1, $2);
  $path = ($argpath =~ /^(\w:)?\\/) ? $argpath :
$curdir.$argpath;

  $newname = $name;
  $newname =~ s/\.\w+$/.csv/;        # change extention to
"csv"

  print "$name -> $newname.. ";
  -f $path.$name or die "\nCan't find $path$name\n";

  $excel->Workbooks->Open($path.$name);
  $book = $excel->Workbooks($name)
    or ($excel->Quit(), die "\nExcel can't open
$argpath$name\n");
  $book->SaveAs($path.$newname, $xlCSV);
  $book->{'Saved'} = 1;
  $book->Close();
  print "Ok\n";
}

$excel->Quit();
print "All files processed\n";
=cut





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

Date: 18 Jun 1998 15:54:11 GMT
From: Martin Schwartz <schwartz@cs.tu-berlin.de>
Subject: Re: Excel - Perl conversion
Message-Id: <6mbd73$l76$1@news.cs.tu-berlin.de>

Alexander Farber <eedalf@eed.ericsson.se> wrote:

>>> I am looking for a script that will convert excel into perl.

>> It's like asking for a tire that will convert your chair into a banana.

> i think there's no such script yet. But maybe Laola can help - 
> see http://wwwwbs.cs.tu-berlin.de/~schwartz/pmh/index.html

There's in fact a tire converting a chair into a banana, and in fact
it can be found at the above address. Laola got a perl 5 successor
called OLE::Storage and is shipped with a utility "herbert" that
converts Excel-Sheets to HTML.

Martin


-- 
// Le degre zero de l'ecriture? Zero probleme!


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

Date: 18 Jun 1998 14:32:32 GMT
From: Dan Nguyen <nguyend7@egr.msu.edu>
Subject: Re: first language
Message-Id: <6mb8e0$74l$1@msunews.cl.msu.edu>

F.Quednau <quednauf@nortel.co.uk> wrote:
: Fred Kunkel wrote:
: > 
: > Is perl a good language for the non-programer to attempt learning a cgi
: > programing language?  Is there a logical aproach to learning perl or
: > should one start with some other language that might be easier to
: > understand?

: Many people say that Perl isn't a good choice for a start. But it depends so
: much what kind of person you are. [snip]

The person needs to be a "natural" programmer.  Generally I feel that
most people have hard time not with the language but with the process
of programming.  A person could learn Perl as a first language very
easily and have no problems, while others could become stuck on the
syntax of the language.  What help me was knowing C.  Perl IMHO is a
C-type language.  Most of the operators and control constructs are
derived from C.  That made learnging the simple stuff simple.  I did
have a really hard time with pattern matching.  That was due to it
being a brand new concept.  I hadn't learn it before in any other language.

: Perl is the first laguage that I am trying to explore in depth. And
: that is only because Perl is what it is, and  Fortran, Delphi and
: VBasic failed to do the same, that is, gripping my imagination.

Well Fortran is not usually an all purpose language.  It tends to be
used more often by scientist, because it has good handling of
formulas.  BASIC (where VBasic comes from) is more of an all purpose
language, but certain programming concepts were nearly imposible to
implement with its core compenents.  Pascal (where Delphi is derived)
was a teaching language.  I think its a good langauge to learn.  Its
similar to many pseudolanguages that are used in text books.  Pascal's
goal was to keep programmers from doing really dangerous things,  and
learn how to program correctly.  If you wanted to do "bad" things you
would need to jump through many hoops.

: I perceive Perl as a kind of freestyle language, where you have so
: many ways to do something that people tend to say 'this is no good
: for a beginner'.

I have to agree with you there.  There tends to be many ways to solve
a problem.  But with many other programming languages.  There usually
are a few other ways too.

: But hey, you can grow with the language, and
: you can use Perl on a very basic level (I know what I am talking
: about). And, not to forget, Perl is FREE. It's availability is
: excellent, Documentation is good, and you get to speak to nice
: people :). So if you like coolness, and a bit
: of weirdness , go for Perl! I luvvit!

Perl on the very basic level tends to be the only thing you need to
learn in other languages like C.  Where there is almost no built in
functions.  C is free too.  You can get a compiler released under the
GNU license as well.  But the perl world is the best.  The people are
awesome.

It may sound like I'm telling people not to learn Perl.  I think that
perl is a terrific language.  And if you can learn it.  You'll love it.

-dan
-- 
Dan Nguyen                         |
nguyend7@cps.msu.edu               |   Remember Byron.
http://www.cps.msu.edu/~nguyend7   |   



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

Date: 18 Jun 1998 16:36:02 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: hmmm, suggestions?
Message-Id: <6mbfli$k7m@fridge.shore.net>

Lord Byron <lordbyron@rapidnet.net.au> wrote:
: Hi.  I realise this is probably an annoying message, but I'm (trying) to
: learn Perl, and I was wondering if any of you knew of a good way to
: accelerate things?  Are there any particularly good tutorials or books that
: would help things out?  

The best way to learn perl, from my experience, is to have some boring,
repetitive, text-based task to accomplish. Nothing inspired me to learn
perl more than updating my calendar by hand for a couple of weeks. 

I like the Llama book, too.

--Art
--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
            http://www.ziplink.net/~upsetter/ska/calendar.html
--------------------------------------------------------------------------


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

Date: Thu, 18 Jun 1998 09:20:55 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: How to use Socket.pm?
Message-Id: <mbudash-1806980920550001@d152.pm4.sonic.net>

Hey all -

Can someone tell me how to, in a perl script, execute this:

http://www.domain.com/cgi-bin/pgm.cgi?parm1=value1&parm2=value2

then collect the returned html into a variable?

I have the feeling I'll need Socket (or possibly LWP), but I just can't
seem to find the documentation or example that I need...

TIA -

-- 
Michael Budash, Owner * Michael Budash Consulting
mbudash@sonic.net * http://www.sonic.net/~mbudash
707-255-5371 * 707-258-7800 x7736


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

Date: Thu, 18 Jun 1998 10:03:23 -0600
From: diverdi@XTRsystems.com (Joseph A. DiVerdi, Ph.D.)
Subject: Re: htpasswd in perl?
Message-Id: <diverdi-1806981003240001@tulip16.verinet.com>

In article <6mb28a$1i0$2@due.unit.no>, Morten Simonsen
<mortensi@idt.ntnu.no> wrote:

>> I think  Dr. DiVerdi owes Mr  Schwartz at least an expleantion.
>
>I think someone is taking this a little too serious. Not everybody
>knows the Perl gurus, and if he really was offended (why should he?)
>by this, I am pretty sure that he could speak for himself. And if not
>Randal Schwartz needed the Perl-lesson (who knows, maybe he had
>forgotton that stuff:-)), maybe some other did..
>
>Morten Simonsen

Whew!

First, I was just trying to help someone that was requesting help by
providing a somewhat detailed explanation of how a task _might_ be
accomplished even though a module exists which can accomplish the same.
And I thought I was performing a public service by taking the time to
write it all out...

Second, I _accidently_ left in the wrong name in my posting, meant no
insult or offense of any kind to Mr. Schwartz whose work I sincerely
admire and own. As it turns out, I am new to the newsgroup world and made
a mistake. To everyone who was offended by my error please accept my
apologies also.

Third, thank you to the posters who wondered if mistake might have been
made rather than to take umbrage and provide sacrasm.

-- 
Joseph A. DiVerdi, Ph.D.                          970.221.3982 (voice)    
diverdi@XTRrsystems.com (email)                   970.224.3723 (fax)
http://www.XTRsystems.com
%PGPKey=('BB1469AB',[1024,'24DA 2D00 ABB0 D26F 4E14 56C9 0CEF 1053 BB14 69AB'])


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

Date: Thu, 18 Jun 1998 10:45:29 -0400
From: Scott Burright <burright@umbc.edu>
To: Larry Rosler <lr@hpl.hp.com>
Subject: Re: I need help with my ^M problem.
Message-Id: <Pine.SGI.3.96.980618104135.12577B-100000@umbc7.umbc.edu>

On Wed, 17 Jun 1998, Larry Rosler wrote:

> [This followup was posted to comp.lang.perl.misc and a copy was sent to 
> the cited author.]
> 
> In article <Pine.SGI.3.96.980617165915.3901E-100000@umbc7.umbc.edu>, 
> burright@umbc.edu says...
> > Just backslash the ^.
> > 
> > 	$blah =~ s/\^M//gs;
> > 
> > On 17 Jun 1998, Bobby Chan wrote:
> > 
> > > 
> > > Hi...
> > > 
> > > 	I'm taking a class on CGI/Perl programming and I can't figure out
> > > how to get rid of the ^M appended to the data sent by Windows based
> > > machines. I can get rid of the \n using regular expressions, but I can't
> > > seem to be able to get rid of the ^M.
> 
> NO!!!

Yes.

>  Even the most rudimentary test would show that this substitution 
> does nothing.  What your editor may display as '^M' is a single 
> character, not the two characters '^' and 'M'.  Perl's way of 
> representing Control-M is '\cM' and
> 
> $blah =~ s/\cM//gs;
> 
> works just fine.  Please don't spew crap into the archives of this 
> newsgroup without testing it first.

Excuse me?

I did test it, and it worked.  I also tested the \cM, which did not work
on my system.

Some of these things are system-dependent.  I would think that, of all
people, a Hewlett Packard employee should know that.

Thanks for flaming me, though.  You seem like such a nice guy.

--Scott Burright



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

Date: Thu, 18 Jun 1998 10:59:20 -0400
From: William Goerlich <intern.bill.goerlich@bentley.com>
Subject: Module Problems: IO object version 1.19 does not match $IO:: 1.15
Message-Id: <35892B47.F9471C5D@bentley.com>

the error:
staging.bentley.com% /usr/local/bin/perl -c middleman.cgi
IO object version 1.19 does not match $IO:: 1.15 at
/usr/local/lib/perl5/sun4-solaris/5.00403/DynaLoader.pm line 172.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/sun4-solaris/5.00403/IO/Socket.pm line 112.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/Net/FTP.pm line 18.
BEGIN failed--compilation aborted at middleman.cgi line 24.

middleman.cgi line 24:
use Net::FTP;

what exactly is crapping out on me? and what do I need to
update/replace/fix?

Thanks,
 Bill



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

Date: Thu, 18 Jun 1998 10:22:26 -0400
From: "Johnny Sandaire" <Johnny.Sandaire@bmc.org>
Subject: NT and CGI scripts using PERL.  Help!
Message-Id: <6mb7uu$b0h6$1@newssvr04-int.news.prodigy.com>

'D:\InetPub\wwwroot\cgi-bin\test.cgi' script produced no output

is the answer that I received after I installed the Perl software on my NT4
/ IIS3.0.
Please help me to configure Perl to run on NT4.0 with IIS.  Please Send
information directly by email to: Johnny.Sandaire@bmc.org

Thanks,
----------------------------------------


I called the cgi page directly from a command line, such as:
http://diet-aid.bmc.org/trakkit.cgi

The page that I called contains 548 lines of code, which I have taken the
liberty of patching a piece below:
----------------------------------
############################################################################
## This code is part of Trakkit Win32
## both Trademarks of and Copyright (C) 1997, World Media Services.
## All Rights Reserved.
## Authored by Barrett W. Nuzum and Paul Helinski
############################################################################

require "cgi-lib.pl";
require "config.cfg";

&ReadParse;

if ($trakkit_password ne "") {
    $password = $trakkit_password;
}

### obtain the potential log files

opendir(LOGDIR, "d:/InetPub/wwwroot/sitewrap/logs/");
@files_in_logs = sort grep(/(.*)\.(.*)\.(.*)\.log/, readdir(LOGDIR));
closedir(LOGDIR);

### this makes our frame interface work -- outputting frame-oriented
documents utilizing
### HTTP GET requests

if ($ENV{'QUERY_STRING'} =~ /frame_1/) {
 &head;
    &frame_1;
 &tail;
    exit;
} elsif ($ENV{'QUERY_STRING'} =~ /bottom/) {
    if ( $ENV{'PERLXS'} eq "PerlIS" ) {
        print "HTTP/1.0 200 OK\n";
    }
    print "Content-type: text/html\n\n";
    &bottom;
    exit;
} elsif ($ENV{'QUERY_STRING'} =~ /menu/) {
 &head;
    &menu;
 &tail;
    exit;
} elsif ($ENV{'QUERY_STRING'} =~ /blank/) {
    &blank;
    exit;
}

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







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

Date: Thu, 18 Jun 1998 11:22:45 -0300
From: "BBQ" <warp@internetcom.com.br>
Subject: NT Challenge and Response Authentication
Message-Id: <6mb7rv$hoi@www001.itanet.com.br>

Does anyone know where I can find docs on how NT authenticates (crypts and
decrypts) using Challenge and Response?

Ie: is there a server var that keeps track of things?
Anyone ever try implementing this?

My current setup is NT 4.0, IIS 3.0, ActiveState Perl (build 316).

I thought Win32:: would have something on this, but apparently it doesn't...





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

Date: Thu, 18 Jun 1998 08:45:47 -0700
From: Jim Bowlin <bowlin@sirius.com>
To: BBQ <warp@internetcom.com.br>
Subject: Re: NT Challenge and Response Authentication
Message-Id: <3589362B.7E312A9E@sirius.com>

BBQ wrote:
> 
> Does anyone know where I can find docs on how NT authenticates (crypts and
> decrypts) using Challenge and Response?
> 
> Ie: is there a server var that keeps track of things?
> Anyone ever try implementing this?
> 
> My current setup is NT 4.0, IIS 3.0, ActiveState Perl (build 316).
> 
> I thought Win32:: would have something on this, but apparently it doesn't...

Why don't you ask an NT news group.

-- Jim Bowlin


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

Date: Thu, 18 Jun 1998 14:06:20 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Overriding a method
Message-Id: <8clnqudctr.fsf@gadget.cscaper.com>

>>>>> "Matt" == Matt Ackeret <mattack@area.com> writes:

Matt> From the Perl documentation for LWP::UserAgent

Matt>      $ua->redirect_ok

Matt>      This method is called by request() before it tries to do any
Matt>      redirects.  It should return a true value if the redirect is
Matt>      allowed to be performed. Subclasses might want to override
Matt>      this.

Matt>      The default implementation will return FALSE for POST
Matt>      request and TRUE for all others.


Matt> Could someone give me an example of how to override that to return true?

You could follow the link:

	http://www.stonehenge.com/cgi/wtsearch

and in the search box type:

	redirect_ok

and see which of my columns at http://www.stonehenge.com/merlyn/WebTechniques/
talk about this feature of LWP.

Or you could do it the hard way. :-)

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 75 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
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: Thu, 18 Jun 1998 11:27:04 -0300
From: "BBQ" <warp@internetcom.com.br>
Subject: Re: Perl CGI NT 4.0 follow up
Message-Id: <6mb842$hrf@www001.itanet.com.br>

Check your NTFS persmissions for the directory and files.
Remember that IIS checks permissions on NTFS before giving data to IIS and
consequently IUSR_Whatever...

HTH

Edgar wrote in message <3587DFC4.D7775C5E@sbrt.com>...
>This is a follow up of my yesterday's posting.
>If any one is experiencing something of the sort or anyone knows how to
>fix the problem please help.
[snip]





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

Date: Thu, 18 Jun 1998 09:29:31 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: perl command line options
Message-Id: <MPG.ff2e0493aa052fa9896c4@nntp.hpl.hp.com>

In article <nl7i1.421$Ro2.491840@pm01nn>, Norman Bunn 
<norman.bunn@mci.com> says...
> Does NT Server 4.0 have an equivalent?
> 
> Norman
> 
> >On Wed, 17 Jun 1998, Norman Bunn wrote:
> >
> >> Is there anyway to tell perl from the command line not to look for input?
> >
> >Check your shell's documentation about redirecting input to come from
> >/dev/null (or your system's equivalent).
> >
> >Tom Phoenix       Perl Training and Hacking       Esperanto
> >Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/

Try the "filename" NUL: which I know works as a bit-bucket for output; 
presumably it is also an end-of-file source for input (like /dev/null).

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


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

Date: Thu, 18 Jun 1998 15:23:57 GMT
From: prakashpatel@hotmail.com
Subject: Perl program
Message-Id: <6mbbed$ktd$1@nnrp1.dejanews.com>

Hello,
      Can someone tell me where i can find Perl program for windows95.
Thank you.

Prakash

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Thu, 18 Jun 1998 17:55:48 +0200
From: real@earthling.net (Real)
Subject: Re: Perl program
Message-Id: <MPG.ff356ed9d7ef1eb9896a9@news.surfnet.nl>

prakashpatel@hotmail.com wrote;
> Hello,
>       Can someone tell me where i can find Perl program for windows95.
> Thank you.

Take a look at http://www.perl.com/latest.html and follow the 
instructions.
Ans while you're in the neighbourhood, also check the other pages of the 
Perl site. They are very usefull.

Real


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

Date: Thu, 18 Jun 1998 09:40:39 -0700
From: Jim Bowlin <bowlin@sirius.com>
To: prakashpatel@hotmail.com
Subject: Re: Perl program
Message-Id: <35894307.4E8A4BF9@sirius.com>

prakashpatel@hotmail.com wrote:
> 
> Can someone tell me where i can find Perl program for windows95.

I suggest you follow the link that Real gave and use 
Gurusamy Sarathy's binary version of Perl.

-- Jim Bowlin


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

Date: Thu, 18 Jun 1998 12:35:33 -0300
From: "BBQ" <warp@internetcom.com.br>
Subject: Re: Perl with ASP?
Message-Id: <6mbc4c$jgl@www001.itanet.com.br>


Tom Phoenix wrote in message ...
>On Tue, 16 Jun 1998, BBQ wrote:
>
>> Does anyone know if it is possible to use Perl as the default scripting
>> language within Active Server Pages (instead of VBScript or JavaScript)?
>
>The docs, FAQs, and newsgroups about Active Server Pages (and related
>topics) may be of some assistance. Hope this helps!
>


Thanks Tom, but that isn't that exactly what I'm doing? (except that this is
the perl newsgroup and not the ASP one)

:o)






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

Date: Thu, 18 Jun 1998 16:57:07 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Processing Binary file with Perl.
Message-Id: <Pine.GSO.3.96.980618095648.13348G-100000@user2.teleport.com>

On Thu, 18 Jun 1998 ahmadz@comm.mot.com wrote:

> Could somebody guide me how can I process a binary file with perl?

See section four of the FAQ. Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Thu, 18 Jun 1998 12:06:40 -0400
From: "James A. Villani" <jvillani@lmi.org>
Subject: Puzzled by int()
Message-Id: <35893B0F.E15653E5@lmi.org>

The results of this code befuddle me:

     1  #! /usr/local/bin/perl
     2
     3  $x=1.2;
     4
     5  print $x, ":\t";
     6
     7  #$y = int (($x - 1) * 100);
     8  $y = $x - 1;
     9  #$y = .2;
    10  print $y, "\t";
    11  $y *= 100;
    12  print $y, "\t";
    13  $y = int $y;
    14  print $y, "\t";
    15
    16  $y = (($x - 1) * 100);
    17  print $y, "\n";

Instead of getting the expected

1.2:    0.2     20      20      20

I get

1.2:    0.2     20      19      20

However, if I uncomment line 9, the results are as expected. This
happens on both an HP and a Sun platform. Are my expectations wrong?

Jim
--
James A. Villani                Research Fellow
jvillani@lmi.org                Logistics Management Institute




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

Date: Thu, 18 Jun 1998 09:35:48 -0700
From: Jim Bowlin <bowlin@sirius.com>
To: jvillani@lmi.org
Subject: Re: Puzzled by int()
Message-Id: <358941E4.74F0EDB5@sirius.com>

James A. Villani wrote:
> 
> The results of this code befuddle me:
> 
>      1  #! /usr/local/bin/perl
>      2
>      3  $x=1.2;
>      4
>      5  print $x, ":\t";
>      6
>      7  #$y = int (($x - 1) * 100);
>      8  $y = $x - 1;
>      9  #$y = .2;
>     10  print $y, "\t";
>     11  $y *= 100;
>     12  print $y, "\t";
>     13  $y = int $y;
>     14  print $y, "\t";
>     15
>     16  $y = (($x - 1) * 100);
>     17  print $y, "\n";
> 
> Instead of getting the expected
> 
> 1.2:    0.2     20      20      20
> 
> I get
> 
> 1.2:    0.2     20      19      20
> 
> However, if I uncomment line 9, the results are as expected. This
> happens on both an HP and a Sun platform. Are my expectations wrong?
> 

Jim,

Your expectations are very high.  The code would work as you expect
only if floating point numbers were stored with infinite precision.
>From you example, it looks like the floating point number "1.2" is
stored as something like "1.1999999999999999999".  Once you realize 
this, the operation of your code becomes clear.  This is not a problem
with Perl, but rather a problem with floating point arithmetic in
general.

If you really want to get your expected results, check out the
Math::BigFloat module.

-- Jim Bowlin


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

Date: Thu, 18 Jun 1998 16:53:52 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: regex terminator not allowed in comment in extended regex?
Message-Id: <Pine.GSO.3.96.980618094301.13348F-100000@user2.teleport.com>

On Thu, 18 Jun 1998, Larry Rosler wrote:

> It would be nice if
> 
> /(?x) regex stuff     # comment stuff / more comment stuff
>  more regex stuff /
> 
> were parsed so as to strip the comments while seeking the closing 
> delimiter.  I doubt that this would change the semantics of any valid 
> program.

You could do that for that limited case, but there are other possibilites
which would become inconsistent. For example, what about this? 

    @parts = split /[/]/, $filename;

Shouldn't that work as well? If not, why not? :-)

Here's another; how (and when?) should Perl recognize that the second
slash is part of a comment?

    $comment = $something ? '' : '#';
    $x_mode = $otherthing ? '' : '(?x)';
    if (/do what	$comment $x_mode /
      I mean/) {
	print "How did you manage to parse that!\n";
    }

You have to parse the pattern at compile time, but you may not know about
/x extensions, comments, or other contents until runtime. So the solution
seems to be the status quo. Of course, using paired delimiters is
generally a good idea here!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 18 Jun 1998 14:38:56 GMT
From: kfox@pt0204.pto.ford.com (Ken Fox)
Subject: Re: REVIEW: Perl CGI Programming - No Experience Required
Message-Id: <6mb8q0$cuo1@eccws1.dearborn.ford.com>

pudge@pobox.com (Chris Nandor) writes:
> Here it is, your definition, which was already 100 percent inferrable
> from the above information:
> 
>   an array is a variable.  a list is not.

Isn't an "array" a value and an "array variable" a variable? ;)

I've always thought of Perl's "lists" as synonymous with "argument
lists."

- Ken

-- 
Ken Fox (kfox@ford.com)                  | My opinions or statements do
                                         | not represent those of, nor are
Ford Motor Company, Powertrain           | endorsed by, Ford Motor Company.
Analytical Powertrain Methods Department |
Software Development Section             | "Is this some sort of trick
                                         |  question or what?" -- Calvin


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

Date: 18 Jun 1998 16:02:49 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: Search a file on a unix system.
Message-Id: <6mbdn9$1c6$1@ns1.arlut.utexas.edu>

Morten Simonsen <mortensi@idt.ntnu.no> writes:
>
> find . -name "the_name_of_the_file"

This would be slow to run.

find . -print | grep the_name_of_the_file 

is faster, depending on the size of the tree into which you're
descending.

--
Stuart McDow                                     Applied Research Laboratories
smcdow@arlut.utexas.edu                      The University of Texas at Austin
            "Look for beauty in roughness, unpolishedness"


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

Date: Wed, 17 Jun 1998 23:13:34 +0200
From: "Claudio Villa Santa" <claudio@crpweb.com>
Subject: subject and sender using open mail
Message-Id: <6mbfjf$s8r$1@news0-alterdial.uu.net>

Somebody can tell me what I'll can specify subject and sender using the the
command

open (mail, "pippo@ppp.com")

Thanks

Claudio V.S.




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

Date: Thu, 18 Jun 1998 12:22:04 -0400
From: Mir S Islam <mislam@mindspring.net>
Subject: suppressing DBI error message
Message-Id: <35893EAC.B5783A70@mindspring.net>

Hi is there a way to suppress error message that is being sent to the
terminal ? Example, supose my query to insert some data failed because
of duplicate entry. Now usually this error message is sent to the
terminal as well as $dbh->stderr

Can I suppress it from being going to the terminal ? Thanks. I am using
perl 5.004 with DBI/DBD and mysql server on a linux box.

-- 
Mir S Islam
Server Administrator // Product Development
Mindspring Enterprise : MSPG
(404)815-0770 x2633


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

Date: 18 Jun 1998 12:33:21 -0400
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: suppressing DBI error message
Message-Id: <6mbfgh$157$1@tholian.cse.psu.edu>

my $dbh = DBI->connect($ds, $user, $pass, {PrintError => 0})
	or die "$DBI::err: $DBI::errstr";
John
groenveld@acm.org


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

Date: Thu, 18 Jun 1998 11:13:13 -0400
From: Lou Bershad <lrb@mesasys.com>
Subject: system() fails with 65280
Message-Id: <35892E89.59C1ACDD@mesasys.com>

I have a perl script that does a lot of processing and file I/O.
Approximately every minute I execute two system() calls (one calls zip,
the other calls ps).  At tenth invocation, the system calls fail.  I get

no output from either of the calls and the system variables have the
following values:
    $! = 65280 (0xFF00)
    $? and $@ are blank.

What could cause system() to not do anything?
What can I do to find out what is going wrong?

            Thank you,
            Lou Bershad
            lrb@mesasys.com



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

Date: Thu, 18 Jun 1998 17:51:14 +0100
From: Matt Sergeant <msergeant@ndirect.co.uk>
To: Perl-Win32-Web@Lyris.Activestate.com, Perl-Win32-Users@Lyris.Activestate.com
Subject: Updated Win32::ASP
Message-Id: <35894582.2B7EBC88@ndirect.co.uk>

I've updated Win32::ASP (a perl module to simplify using PerlScript
active server pages).

New additions:

 - Print supports output > 128000 characters
 - GetFormValue works in array context (returning all values for a
particular item.
 - Supports using strict mode in PerlScripts (this is of major
importance IMHO).

download from http://www.geocities.com/SiliconValley/Way/6278/perl.html

Remember to rename it to ASP.pm when you download it.

-- 
<Matt/>


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

Date: Thu, 18 Jun 1998 08:31:21 -0400
From: -bill- <bill@TechServSys.com>
Subject: which dynaloader for SCO 3.2v5.04
Message-Id: <35890899.446B@TechServSys.com>

I need to make Perl5.0004_04 with dynamic loading but I can't figure out
which dynaloader to specify.
I would apprectiate a mail replay as well as a posting.

TIA
-- 

-bill-

Technical Service Systems - bill@TechServSys.com


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

Date: Thu, 18 Jun 1998 08:42:19 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: wrap()
Message-Id: <rf5bm6.36n.ln@localhost>

Glen (glen@perfectday.com) wrote:

: Has anyone used wrap() ?

   I expect that at the very least the person that wrote it used it.

   That was a rhetorical question, right?


: I'm trying to perform the following to send an email, and wrapping
: long lines, but I just get no message contents being sent as a result
: of the print.

: print MAIL wrap("","",$string);


   What does it say when you enable warnings?


   #!/usr/bin/perl -w


   You have the appropriate 'use' directive in your program, I expect...


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


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

Date: Thu, 18 Jun 1998 11:25:15 -0400
From: webmaster@zensearch.com (James T Kendall)
Subject: ZenSearch needs a programmer
Message-Id: <MPG.ff2fb64eb84b54d989680@news.surfsouth.com>

I've decided to go after some funding for my
search engine project and concluded if/before
I do that I'll need a serious programmer.  

ZenSearch is the project I work on in my spare
time, would like it to become at some point  
what I do full time.  Looking for someone interested
in something similar. - no $$$ up front - 25% ownership.

Perl required, C a plus ;)   Anyone interested or know of
anyone that may be interested can check out:
http://www.zensearch.com/Partners/index.html


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

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

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