[12420] in Perl-Users-Digest
Perl-Users Digest, Issue: 6020 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 16 16:07:28 1999
Date: Wed, 16 Jun 99 13:00:22 -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 Wed, 16 Jun 1999 Volume: 8 Number: 6020
Today's topics:
Re: Afraid to ask about Y2K! (Jerome O'Neil)
ANNOUNCE Perl 5.005_02 Documentation in HTMLHelp format (doug edmunds)
Re: binary file transfer on Win32 <rootbeer@redcat.com>
cookies <leonid76@erols.com>
creating a chat room dhulnick@my-deja.com
Re: expire a https session <rootbeer@redcat.com>
Re: File Processing (Randal L. Schwartz)
Re: Formatting Unix file permissions eg., 755 -> rwxr-x (Randal L. Schwartz)
Integrating MySQL database across a network...w/ perl. (Jim Matzdorff)
Re: Is it better perl than awk ? <uri@sysarch.com>
Re: Is it better perl than awk ? (Lee)
Re: Multidimensional Associative (hash) array <uri@sysarch.com>
Re: my and interpolation? <uri@sysarch.com>
Re: my and interpolation? (Tramm Hudson)
Re: net::ftp boris_cownie@my-deja.com
Re: net::ftp <craig@mathworks.com>
Re: newbie learning "my" declarations (Lee)
pattern matching question <dscapin@harris.com>
Re: pattern matching question (Greg Bacon)
Re: pattern matching question <craig@mathworks.com>
perl and progress database <m.vlemmings@goldmine.nl>
Perl print to stdout just causes beeps. gharris8158@my-deja.com
Perl print to stdout not functioning gharris8158@my-deja.com
Perl print to stdout not functioning gharris8158@my-deja.com
Perl print to stdout not working...causes beeps. gharris8158@my-deja.com
Perl print to stdout not working...causes beeps. gharris8158@my-deja.com
Perl print to stdout not working...causes beeps. gharris8158@my-deja.com
Re: Problems with File-module <rootbeer@redcat.com>
Re: Searching for file types on a web site <rootbeer@redcat.com>
Re: writing results (Twarren10)
Re: writing results (Twarren10)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 16 Jun 1999 19:19:29 GMT
From: jeromeo@atrieva.com (Jerome O'Neil)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <7k8tc1$cl6$1@brokaw.wa.com>
In article <7k8s5i$m80$3@info2.uah.edu>,
gbacon@itsc.uah.edu (Greg Bacon) writes:
> In article <7k8das$3ep$1@brokaw.wa.com>,
> jeromeo@atrieva.com (Jerome O'Neil) writes:
>: > "The power of accurate observation is commonly called [pedantry] by
>: > those who have not got it."
>:
>: Spoken like a true pedant.
>
> "When a man is more right than his neighbor, that constitutes a
> majority of one."
> -- Thoreau
"It wasn't the first time I was the only right guy in the room."
--Miller
--
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947
The Atrieva Service: Safe and Easy Online Backup http://www.atrieva.com
------------------------------
Date: Wed, 16 Jun 1999 19:51:16 GMT
From: dae_alt@juno.com (doug edmunds)
Subject: ANNOUNCE Perl 5.005_02 Documentation in HTMLHelp format
Message-Id: <3767fac3.9007115@news.pacifier.com>
Posted: complete Perl 5.005_02 html documentation
in Windows HTMLHelp file format at:
http://www.pacifier.com/~edmunds/perltools.html
Source document for file:
http://language.perl.com/CPAN/doc/manual/html/PerlDoc.tar.gz
Doug Edmunds
16 June 1999
------------------------------
Date: Wed, 16 Jun 1999 12:57:46 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: binary file transfer on Win32
Message-Id: <Pine.GSO.4.02A.9906161254450.26850-100000@user1.teleport.com>
On Wed, 16 Jun 1999, Andreas Geesen wrote:
> Subject: binary file transfer on Win32
> i can't find a way around the odd CR/LF conversion.
binmode?
> if (!open(OUTFILE, ">$SAVE_DIR\/$Filename")) {
> binmode( $fh );
> while ($Bytes = read( $fh,$Buffer,1024)) {
> $BytesRead += $Bytes;
> print OUTFILE $Buffer;
> }
I didn't see that you made OUTFILE binmode. If it's getting binary data on
a machine that cares, that's vital.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 16 Jun 1999 15:59:06 -0400
From: "Leonid Goltser" <leonid76@erols.com>
Subject: cookies
Message-Id: <7k8vk8$co4$1@autumn.news.rcn.net>
Where can I find a tutoring about creating cookies with perl?
------------------------------
Date: Wed, 16 Jun 1999 18:53:49 GMT
From: dhulnick@my-deja.com
Subject: creating a chat room
Message-Id: <7k8rrn$sm3$1@nnrp1.deja.com>
I would like to create a question and answer forum chatroom, where the
user sends the question, then a moderator receives it, checks for
appropriateness and then sends it on the the person who answers it who
then posts the answers up -- this will be a live sort of conference --
how should i go about doing this?
email me at davidari@psu.edu
thanks,
David
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 16 Jun 1999 12:49:56 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: expire a https session
Message-Id: <Pine.GSO.4.02A.9906161248210.26850-100000@user1.teleport.com>
On Wed, 16 Jun 1999, Kevin Read wrote:
> The user would...
>
> Click on a button, calling the script and their https session will be
> invalidated (cleared) and they would be redirected to a new URL -
> outside of the https site.
>
> Should they wander/surf back into the secure site they must be asked to
> login/authenticate again.
It sounds as if you're wanting to tell a remote browser to do something.
Check the docs, FAQs, and newsgroups about browsers and their protocols
for more information. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 16 Jun 1999 12:28:29 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: File Processing
Message-Id: <m11zfcdjxe.fsf@halfdome.holdit.com>
>>>>> "Bart" == Bart Lateur <bart.lateur@skynet.be> writes:
Bart> local($r) = scalar <f>;
Or even local $r = <f>;
--
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: 16 Jun 1999 12:39:53 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Formatting Unix file permissions eg., 755 -> rwxr-xr-x
Message-Id: <m1wvx4c4ty.fsf@halfdome.holdit.com>
>>>>> "PLB" == <plb@concentric.net> writes:
PLB> I'm looking for a pointer to an algorithm that takes the
PLB> octal unix file permissions (like 0755) and converts them
PLB> to the symbolic output as used by 'ls -l' such as rwxr-xr-x.
PLB> I've run across this once before, but can't seem to locate it now.
The output of any find2perl command where you've included "-ls" as one
of the arguments contains exactly such code.
print "Just another Perl hacker,"
--
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: 16 Jun 1999 12:19:40 -0700
From: syran@best.com (Jim Matzdorff)
Subject: Integrating MySQL database across a network...w/ perl. :)
Message-Id: <7k8tcc$3kl$1@shell18.ba.best.com>
I should probably cross post this somewhere, but I'll start with this
group.
I have set up a MySQL database on a particular (NetBSD) machine, and
want to use Perl to access this database. I went out and got DBI,
DataDumper, and... Msql perl modules and installed them successfully.
Everything works fine. I can access the database and much around.
Now, I want to be able to access this database from different
networked machines. I realize I need to have the Perl modules installed
on all those machines to do this. However, when I go to make them (and
install them) it always complains that I am missing some sub-set of
files that were installed when I installed the original MySQL database
(mostly include files).
I've looked on mysql.com, perl.com and various other MySQL/Perl sites,
but have not found anything explaining client side needs in order to
access the database server on another machine. I can't believe you need
to have the full database server installed on each machine, but I can't
figure out how to install the modules without doing just that.
Help! (if ya can).
--jim
--
--
One tequila, two tequila, three tequila, floor.
------------------------------
Date: 16 Jun 1999 15:12:26 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Is it better perl than awk ?
Message-Id: <x7emjcdko5.fsf@home.sysarch.com>
>>>>> "SK" == Stepan Kasal <kasal@matsrv.math.cas.cz> writes:
SK> On Wed, 16 Jun 1999 09:48:53 GMT, Bart Lateur <bart.lateur@skynet.be> wrote:
>> Also, if you're already somewhat familiar with programming, Perl may
>> look more familiar.
SK> I don't agree. I like to go through the specification of a
SK> tool or programming language. This way I have learnt Pascal, C,
SK> sed, awk, ... Things like Perl or Mathematica are simply to large
SK> to glance. You have to learn a subset (depending on what you
SK> read) and then continuously hear things like "this can be written
SK> sipler"... I don't like those coloses -- in history it was PL/1
SK> (I think), combining all the best features of all it's
SK> predecessors, and endig up as unusable vehicle. I don't thing
SK> perl is unusable, I just think there is an elegance in doing
SK> things with sed or awk (or even head, tail, cut, ...) when
SK> appropriate. When you are planning to do complex evaluation of a
SK> huge amount of date, perl is appropriate, but the data may still
SK> be preprocessed by awk and sed if you wish it. I have to admit
SK> that I don't know perl. Stepan
that admission makes you unqualified to compare awk and perl. as one who
IMO knows perl well and who has done lots of awk in my pre-perl days,
there is no comparison. and the concept of using awk or sed to
preprocess data for perl is ludicrous. perl can do anything those 2 can
inside perl. i am not advocating removal of sed and awk but i would
never use them for anything other than little tools inside small shell
scripts. but then again i rarely need small shell scripts now as i would
rather do anything above 5 lines in perl. unless it was just calling
lots of programs and commands which is what shells are better at than
perl. as for perl being a colossus like PL/I, it is irrelevent. you can
program in a subset of perl without any problems. name anyone who uses
all the features of a language all the time.
and as for little elegant things, perl one-liners or short scripts
usually can do more with less code than awk/sed/shell combinations. as
you mentioned awk is good for quick cuts, but if that is in a larger
shell script, i would just as soon do it in perl.
i don't want this to become a flame war like we have seen with perl
vs. (python, lisp, c++, your favorite langauge). perl and awk/sed don't
even occupy the same problem space so comparing them is moot.
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: Wed, 16 Jun 1999 14:29:28 -0500
From: rlb@intrinsix.ca (Lee)
Subject: Re: Is it better perl than awk ?
Message-Id: <B38D65489668894578@204.112.166.88>
In article <7k8rl7$a3r$1@fcnews.fc.hp.com>,
ada@fc.hp.com (Andrew Allen) wrote:
>Lee (rlb@intrinsix.ca) wrote:
>: At the very bottom of the list lies C.
>
>I guess you've never programmed in Ada.
My karma's not *that* bad!
Next life, I'm coming back as a rodent, not a slug.
Lee
------------------------------
Date: 16 Jun 1999 15:36:34 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Multidimensional Associative (hash) array
Message-Id: <x77lp4djjx.fsf@home.sysarch.com>
>>>>> "j" == jtubaugh <jtubaugh@cftnet.com> writes:
j> Does anybody know of a way to store a hash array within another hash
j> array?
read perldsc in you online documentation. also the perl cookbook has
plenty on this subject. when you have digested that, and you have code
that needs some help, post here again.
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: 16 Jun 1999 15:35:10 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: my and interpolation?
Message-Id: <x7btegdjm9.fsf@home.sysarch.com>
>>>>> "CC" == Craig Ciquera <craig@mathworks.com> writes:
CC> In the second example you are missing a semi-colon:
CC> $file_size = ${"file_size_$compression"}
CC> should be
CC> $file_size = ${"file_size_$compression"};
that had nothing to do with his problem. he was using symrefs to access
a lexical variable which has no symbol.
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: 16 Jun 1999 13:15:45 -0600
From: hudson@swcp.com (Tramm Hudson)
Subject: Re: my and interpolation?
Message-Id: <7k8t51$4bu@llama.swcp.com>
[just posted. no cc's sent]
Nenad Vidovic wrote originally (with some snips):
: $compression = "gz";
: my $file_size_gz = "3";
: $file_size = ${"file_size_$compression"}
: print "$file_size\n";
:
: Anybody have any ideas why this doesn't work. Thanks for helping out?
to which Craig Ciquera <craig@mathworks.com> replied, pointing
out the syntax error without answering the question or supplying any
context from the original post:
> In the second example you are missing a semi-colon:
> file_size = ${"file_size_$compression"}
> should be
> $file_size = ${"file_size_$compression"};
While the real answer to Nenad's question is that lexically scoped
variables are outside the reach of symbolic references since they
do not reside in the symbol table, as documented in perlref. This
is a Good Thing (tm).
'use strict' would have prevented such a problem. -w would have
reported the undefined value. Proper data structures are good.
etc etc etc.
Obligatory flame bait: I L1k3 symbolic referencez, d00d!!!1!
Tramm
--
o hudson@swcp.com tbhudso@cs.sandia.gov O___|
/|\ http://www.swcp.com/~hudson/ H 505.266.59.96 /\ \_
<< KC5RNF @ N5YYF.NM.AMPR.ORG W 505.284.24.32 \ \/\_\
0 U \_ |
------------------------------
Date: Wed, 16 Jun 1999 18:37:05 GMT
From: boris_cownie@my-deja.com
Subject: Re: net::ftp
Message-Id: <7k8qsg$s7f$1@nnrp1.deja.com>
> Use the PPM (ActiveState's Perl Package Manager) to install libnet,
> which contains Net::FTP (amongst other things). Just open a command
> wndow, type "ppm", and then, within the ppm, type "install libnet".
I've done all this and installed it on NT. However it looks
like transfering big binary files from the NT machine does
not work. Only the first couple of hundred bytes get sent,
ascii files are sent OK. Has anyone else seen a similar problem ?
I'm transfering to a linux box.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 16 Jun 1999 15:43:35 -0400
From: Craig Ciquera <craig@mathworks.com>
Subject: Re: net::ftp
Message-Id: <3767FE67.18D0CC0E@mathworks.com>
Are you possibly exceeding a timeout??
Craig
------------------------------
Date: Wed, 16 Jun 1999 14:11:11 -0500
From: rlb@intrinsix.ca (Lee)
Subject: Re: newbie learning "my" declarations
Message-Id: <B38D60FF966888439E@204.112.166.88>
In article <7k8o7n$8sj$1@monet.op.net>,
mjd@op.net (Mark-Jason Dominus) wrote:
>In article <B38C77AC966851720D@204.112.166.88>, Lee <rlb@intrinsix.ca> wrote:
>>"Make me a brand new variable, call it $total, and set its value to one
>>more than it used to be."
>
>You can say that, but not the way the other guy wanted to:
>
> my $total = $total + 1;
With use strict, that gives a compilation error.
With -w, my $total; $total = $total + 1; gives a warning.
But my $total; $total++; invokes the Greater Daemons of Semantic
Absolution, and all is well.
Lee
------------------------------
Date: Wed, 16 Jun 1999 14:44:14 -0400
From: Deamon George Scapin <dscapin@harris.com>
Subject: pattern matching question
Message-Id: <3767F07E.10183659@harris.com>
I am trying to take the first part off of a url and return only the
sub-directories and files.
Eg. http://www.someplace.com/dir1/dir2/dir3/picture.jpg
to
dir1/dir2/dir3/picture.jpg
I looked at perldoc perlre but have a difficulty understanding all the
rules. Guess I have to read, re-read, re-read until it clicks but can
someone help me out with this simple task?
Thanks
George
------------------------------
Date: 16 Jun 1999 19:25:34 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: pattern matching question
Message-Id: <7k8tne$mlf$1@info2.uah.edu>
In article <3767F07E.10183659@harris.com>,
Deamon George Scapin <dscapin@harris.com> writes:
: I am trying to take the first part off of a url and return only the
: sub-directories and files.
:
: Eg. http://www.someplace.com/dir1/dir2/dir3/picture.jpg
: to
: dir1/dir2/dir3/picture.jpg
I would use the URI module:
#! /usr/bin/perl -w
use strict;
use URI;
my $url = "http://www.someplace.com/dir1/dir2/dir3/picture.jpg";
my $uri = URI->new($url);
my $path = $uri->path;
$path =~ s,^/,,;
print $path, "\n";
If you're determined to use a regular expression
($path = $url) =~ s,^.*?//.*?/,,;
Greg
--
There's a lovely paper which compares Unix to Zork in both cognitive and user
motivational terms. Maybe you like Unix because it's an adventure game?
Still, I just don't think Unix will succeed as a theme park (some small
fraction of :-) -- Bruce Cohen
------------------------------
Date: Wed, 16 Jun 1999 15:41:05 -0400
From: Craig Ciquera <craig@mathworks.com>
Subject: Re: pattern matching question
Message-Id: <3767FDD1.8F45AEBF@mathworks.com>
You may not want to use regex's directly here:
#!/usr/local/bin/perl -w
use strict;
use URI::URL;
my $url = new URI::URL
'http://www.someplace.com/dir1/dir2/dir3/picture.jpg';
my $path = $url->path;
print $path . "\n";
__END__
Craig
Deamon George Scapin wrote:
> I am trying to take the first part off of a url and return only the
> sub-directories and files.
>
> Eg. http://www.someplace.com/dir1/dir2/dir3/picture.jpg
> to
> dir1/dir2/dir3/picture.jpg
>
> I looked at perldoc perlre but have a difficulty understanding all the
> rules. Guess I have to read, re-read, re-read until it clicks but can
> someone help me out with this simple task?
>
> Thanks
> George
------------------------------
Date: Wed, 16 Jun 1999 21:08:42 +0200
From: Marco Vlemmings <m.vlemmings@goldmine.nl>
Subject: perl and progress database
Message-Id: <3767F63A.49991EE5@goldmine.nl>
Hi all,
Is it posible to use Progress Database width Perl?
Can someone give me some information?
Width kind regards,
Marco Vlemmings
email : m.vlemmings@chello.nl
------------------------------
Date: Wed, 16 Jun 1999 18:48:20 GMT
From: gharris8158@my-deja.com
Subject: Perl print to stdout just causes beeps.
Message-Id: <7k8rhf$sgt$1@nnrp1.deja.com>
We have 2 NT web servers running Microsoft
Internet Server manager, one for development, one
for production. One server(the development
server) is running Server Manager 3.0, while the
other is running a later version (sorry, don't
have that information handy at this time).
>From a link on a web page, a user can request a
file to be viewed. The link submits a NT command
file (.cmd), which runs a perl script. The perl
script ftp's the requested file from a file
server, then prints the file to STDOUT in binary
mode. There's more that goes on after this
point, in preparation for the browser to display
the file. On the development server, this works
fine and the browser tries to launch the
appropriate viewer for the file, but when the
perl script runs on the production server, the
computer just starts beeping, and the browser
eventually returns the message :
CGI Error
The specified CGI application misbehaved by not
returning a complete set of HTTP headers. The
headers it did return are:
And that is it! Nothing! I'm assuming that the
computer quits beeping when it's finally sent the
last of the file's output to wherever it might be
sending it. I've definitely isolated the problem
to the print to stdout. The code that outputs
the file to STDOUT is simply:
binmode(Repfile);
binmode(stdout);
while (<Repfile>){
print ;
}
Has anyone ever encountered this type of problem
trying to write to stdout? Do you have any ideas
how to resolve or where to look for answers? I
thought I'd read somewhere that problems with
STDIN/STDOUT could be due to configuration or
file associations, but the article never
mentioned how to fix. The cmd file runs. The
perl script is definitely executing. Why the
heck is the computer just beeping! If you can
help, I'd sure appreciate hearing from you.
Just a note that when the perl script and/or cmd
file is run from the DOS command line, it works
fine, and output is displayed. It's just when it
is submitted from within a URL (eg.
http://.../scripts/discovery.cmd&v_filename=blah.d
oc)
Gord
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 16 Jun 1999 18:48:20 GMT
From: gharris8158@my-deja.com
Subject: Perl print to stdout not functioning
Message-Id: <7k8rhg$sgv$1@nnrp1.deja.com>
We have 2 NT web servers running Microsoft
Internet Server manager, one for development, one
for production. One server(the development
server) is running Server Manager 3.0, while the
other is running a later version (sorry, don't
have that information handy at this time).
>From a link on a web page, a user can request a
file to be viewed. The link submits a NT command
file (.cmd), which runs a perl script. The perl
script ftp's the requested file from a file
server, then prints the file to STDOUT in binary
mode. There's more that goes on after this
point, in preparation for the browser to display
the file. On the development server, this works
fine and the browser tries to launch the
appropriate viewer for the file, but when the
perl script runs on the production server, the
computer just starts beeping, and the browser
eventually returns the message :
CGI Error
The specified CGI application misbehaved by not
returning a complete set of HTTP headers. The
headers it did return are:
And that is it! Nothing! I'm assuming that the
computer quits beeping when it's finally sent the
last of the file's output to wherever it might be
sending it. I've definitely isolated the
problem to the print to stdout. The code that
outputs the file to STDOUT is simply:
binmode(Repfile);
binmode(stdout);
while (<Repfile>){
print ;
}
Has anyone ever encountered this type of problem
trying to write to stdout? Do you have any ideas
how to resolve or where to look for answers? I
thought I'd read somewhere that problems with
STDIN/STDOUT could be due to configuration or
file associations, but the article never
mentioned how to fix. The cmd file runs. The
perl script is definitely executing. Why the
heck is the computer just beeping! If you can
help, I'd sure appreciate hearing from you.
Gord
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 16 Jun 1999 18:48:22 GMT
From: gharris8158@my-deja.com
Subject: Perl print to stdout not functioning
Message-Id: <7k8rhh$sh0$1@nnrp1.deja.com>
We have 2 NT web servers running Microsoft
Internet Server manager, one for development, one
for production. One server(the development
server) is running Server Manager 3.0, while the
other is running a later version (sorry, don't
have that information handy at this time).
>From a link on a web page, a user can request a
file to be viewed. The link submits a NT command
file (.cmd), which runs a perl script. The perl
script ftp's the requested file from a file
server, then prints the file to STDOUT in binary
mode. There's more that goes on after this
point, in preparation for the browser to display
the file. On the development server, this works
fine and the browser tries to launch the
appropriate viewer for the file, but when the
perl script runs on the production server, the
computer just starts beeping, and the browser
eventually returns the message :
CGI Error
The specified CGI application misbehaved by not
returning a complete set of HTTP headers. The
headers it did return are:
And that is it! Nothing! I'm assuming that the
computer quits beeping when it's finally sent the
last of the file's output to wherever it might be
sending it. I've definitely isolated the
problem to the print to stdout. The code that
outputs the file to STDOUT is simply:
binmode(Repfile);
binmode(stdout);
while (<Repfile>){
print ;
}
Has anyone ever encountered this type of problem
trying to write to stdout? Do you have any ideas
how to resolve or where to look for answers? I
thought I'd read somewhere that problems with
STDIN/STDOUT could be due to configuration or
file associations, but the article never
mentioned how to fix. The cmd file runs. The
perl script is definitely executing. Why the
heck is the computer just beeping! If you can
help, I'd sure appreciate hearing from you.
Gord
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 16 Jun 1999 18:48:24 GMT
From: gharris8158@my-deja.com
Subject: Perl print to stdout not working...causes beeps.
Message-Id: <7k8rhk$sh2$1@nnrp1.deja.com>
We have 2 NT web servers running Microsoft
Internet Server manager, one for development, one
for production. One server(the development
server) is running Server Manager 3.0, while the
other is running a later version (sorry, don't
have that information handy at this time).
>From a link on a web page, a user can request a
file to be viewed. The link submits a NT command
file (.cmd), which runs a perl script. The perl
script ftp's the requested file from a file
server, then prints the file to STDOUT in binary
mode. There's more that goes on after this
point, in preparation for the browser to display
the file. On the development server, this works
fine and the browser tries to launch the
appropriate viewer for the file, but when the
perl script runs on the production server, the
computer just starts beeping, and the browser
eventually returns the message :
CGI Error
The specified CGI application misbehaved by not
returning a complete set of HTTP headers. The
headers it did return are:
And that is it! Nothing! I'm assuming that the
computer quits beeping when it's finally sent the
last of the file's output to wherever it might be
sending it. I've definitely isolated the
problem to the print to stdout. The code that
outputs the file to STDOUT is simply:
binmode(Repfile);
binmode(stdout);
while (<Repfile>){
print ;
}
Has anyone ever encountered this type of problem
trying to write to stdout? Do you have any ideas
how to resolve or where to look for answers? I
thought I'd read somewhere that problems with
STDIN/STDOUT could be due to configuration or
file associations, but the article never
mentioned how to fix. The cmd file runs. The
perl script is definitely executing. Why the
heck is the computer just beeping! If you can
help, I'd sure appreciate hearing from you.
Gord
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 16 Jun 1999 18:48:23 GMT
From: gharris8158@my-deja.com
Subject: Perl print to stdout not working...causes beeps.
Message-Id: <7k8rhj$sh1$1@nnrp1.deja.com>
We have 2 NT web servers running Microsoft
Internet Server manager, one for development, one
for production. One server(the development
server) is running Server Manager 3.0, while the
other is running a later version (sorry, don't
have that information handy at this time).
>From a link on a web page, a user can request a
file to be viewed. The link submits a NT command
file (.cmd), which runs a perl script. The perl
script ftp's the requested file from a file
server, then prints the file to STDOUT in binary
mode. There's more that goes on after this
point, in preparation for the browser to display
the file. On the development server, this works
fine and the browser tries to launch the
appropriate viewer for the file, but when the
perl script runs on the production server, the
computer just starts beeping, and the browser
eventually returns the message :
CGI Error
The specified CGI application misbehaved by not
returning a complete set of HTTP headers. The
headers it did return are:
And that is it! Nothing! I'm assuming that the
computer quits beeping when it's finally sent the
last of the file's output to wherever it might be
sending it. I've definitely isolated the
problem to the print to stdout. The code that
outputs the file to STDOUT is simply:
binmode(Repfile);
binmode(stdout);
while (<Repfile>){
print ;
}
Has anyone ever encountered this type of problem
trying to write to stdout? Do you have any ideas
how to resolve or where to look for answers? I
thought I'd read somewhere that problems with
STDIN/STDOUT could be due to configuration or
file associations, but the article never
mentioned how to fix. The cmd file runs. The
perl script is definitely executing. Why the
heck is the computer just beeping! If you can
help, I'd sure appreciate hearing from you.
Gord
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 16 Jun 1999 18:48:26 GMT
From: gharris8158@my-deja.com
Subject: Perl print to stdout not working...causes beeps.
Message-Id: <7k8rhl$sh4$1@nnrp1.deja.com>
We have 2 NT web servers running Microsoft
Internet Server manager, one for development, one
for production. One server(the development
server) is running Server Manager 3.0, while the
other is running a later version (sorry, don't
have that information handy at this time).
>From a link on a web page, a user can request a
file to be viewed. The link submits a NT command
file (.cmd), which runs a perl script. The perl
script ftp's the requested file from a file
server, then prints the file to STDOUT in binary
mode. There's more that goes on after this
point, in preparation for the browser to display
the file. On the development server, this works
fine and the browser tries to launch the
appropriate viewer for the file, but when the
perl script runs on the production server, the
computer just starts beeping, and the browser
eventually returns the message :
CGI Error
The specified CGI application misbehaved by not
returning a complete set of HTTP headers. The
headers it did return are:
And that is it! Nothing! I'm assuming that the
computer quits beeping when it's finally sent the
last of the file's output to wherever it might be
sending it. I've definitely isolated the
problem to the print to stdout. The code that
outputs the file to STDOUT is simply:
binmode(Repfile);
binmode(stdout);
while (<Repfile>){
print ;
}
Has anyone ever encountered this type of problem
trying to write to stdout? Do you have any ideas
how to resolve or where to look for answers? I
thought I'd read somewhere that problems with
STDIN/STDOUT could be due to configuration or
file associations, but the article never
mentioned how to fix. The cmd file runs. The
perl script is definitely executing. Why the
heck is the computer just beeping! If you can
help, I'd sure appreciate hearing from you.
Gord
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 16 Jun 1999 12:47:44 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Problems with File-module
Message-Id: <Pine.GSO.4.02A.9906161232500.26850-100000@user1.teleport.com>
On Tue, 15 Jun 1999, Thomas Weholt wrote:
> I used the File::Find to do a recursive search on a mounted cd-rom,
> only to find that the module only found the first level of folders and
> it didn`t dive into the folders it found at all.
That sounds like a bug, although it may be that something else was going
on. Did you try using the debugger to see what File::Find was doing?
> I ended up using the ls command, putting the contents of it into a
> variable, and processing it from there,
Yuck! There's nothing you can do with ls that you can't do from perl. And
it's too easy to have a problem with ls if a filename has odd characters.
That'll cause more trouble in the long run; if you must avoid File::Find,
you should really use readdir and friends. And beware symlinks!
> Since it only happens on one disc, at least so far, it`s probably
> something strange with that cd.
Yes, and possibly also the way it interacts with your machine's software
for working with CD-Roms.
> Ls handles it perfectly so I stuck with that,
I wonder whether ls is really doing that right. But another thought comes
to me: Could setting $File::Find::dont_use_nlink possibly fix things?
(And, if it does, I wonder whether there's some way it should be patched
to recognize this case.)
Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 16 Jun 1999 12:53:56 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Searching for file types on a web site
Message-Id: <Pine.GSO.4.02A.9906161251370.26850-100000@user1.teleport.com>
On Wed, 16 Jun 1999 mmclaug@my-deja.com wrote:
> I want to write a Perl script that does the following:
>
> * Visits a web site and tracks down all the files with a given
> extension
Use LWP, although I'm not sure how you could be sure of finding all of the
files if you don't have (or find) all of their URLs. LWP is available from
CPAN.
> * Writes the file name and path name to a file,
The write and print functions are documented in the perlfunc manpage; is
one of those the one you want?
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 16 Jun 1999 19:40:22 GMT
From: twarren10@aol.com (Twarren10)
Subject: Re: writing results
Message-Id: <19990616154022.27826.00000225@ng-cn1.aol.com>
I am actually quite new to this (as you no doubt can tell) so you lost me a
bit. I am writing results to an html display file. Do I have to change to
another output? I'm getting the same screen write delay using
select((select(OUTPUT_HANDLE), $| = 1)[0]);
------------------------------
Date: 16 Jun 1999 19:41:00 GMT
From: twarren10@aol.com (Twarren10)
Subject: Re: writing results
Message-Id: <19990616154100.27826.00000226@ng-cn1.aol.com>
Again, I am actually quite new to this (as you no doubt can tell) so you lost
me a bit. I am writing results to an html display file. Do I have to change to
another output? I'm getting the same screen write delay using
select((select(OUTPUT_HANDLE), $| = 1)[0]);
------------------------------
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 6020
**************************************