[9957] in Perl-Users-Digest
Perl-Users Digest, Issue: 3550 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 26 13:03:29 1998
Date: Wed, 26 Aug 98 10: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 Wed, 26 Aug 1998 Volume: 8 Number: 3550
Today's topics:
Re: "bind" Problems with Internet Server Program robertrose@my-dejanews.com
Re: [Perl] How to find the Perl FAQ <SEX@USA.NET>
_reverse_ lookahead? (Todd "Waxahachiefortudinouslyexportitionismistically" Hartman)
ANN: Perl Class, Phila area, Oct 26-30 <joseph@5sigma.com>
Re: Argh! NT Perl (Bbirthisel)
Re: Argh! NT Perl <kperrier@blkbox.com>
comp.lang.perl.windows.misc <nguyend7@msu.edu>
Re: comp.lang.perl.windows.misc (Bob Trieger)
Forking a daemon (Matt Knecht)
getopts with hash problem <warrenk@mdhost.cse.tek.com>
getting the content of a url... <scalp@orka.fr>
Re: Help with reading a file (Larry Rosler)
Re: Help with reading a file (Mike Stok)
Re: How to match anything but some characters (reg-exp) (Larry Rosler)
Re: How to match anything but some characters (reg-exp) <murrayb@vansel.alcatel.com>
Re: How to match anything but some characters (reg-exp) (Larry Rosler)
Re: How to match anything but some characters (reg-exp) <hauk@forumnett.no>
How to update an input file? <support@ichat.com>
Re: Index.pl (Jim Ray)
Inserting an image into a HTML file using CGI sbernard@mail.esiea.fr
Re: Inserting an image into a HTML file using CGI <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: man pages for win32 perl <dparrott@ford.com>
Re: man pages for win32 perl <camerond@mail.uca.edu>
Packed Decimal script joe_tseng@hotmail.com
perl 5.005 RPM for redhat 4.2 anyone? (Dr Eberhard W Lisse)
Re: Perl compiler <jcrowe@io.com>
Re: Perl compiler <tchrist@mox.perl.com>
Re: Perl compiler <see.my.address.below@domain.com>
Re: Perl compiler (Craig Berry)
Perl Cookbook, does anyone have it? <johnc@interactive.ibm.com>
Re: Perl Cookbook, does anyone have it? (Nathan V. Patwardhan)
Re: Perl FAR version 1.1.1 MAKE SURE YOU READ THIS BEFO (I R A Aggie)
Re: Pretty HTML-izing of Perl source? (Albert W. Dorrington)
Re: Problem with "bind" statement in web server app robertrose@my-dejanews.com
read numbers from file into array (Himanshu Gohel)
Re: String terminators <minich@globalnet.co.uk>
Using cookie-lib.pl to set cookies sbernard@mail.esiea.fr
Re: webcounter in Perl? <nguyend7@msu.edu>
Re: Why dont people read the FAQs <nguyend7@msu.edu>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 26 Aug 1998 16:05:50 GMT
From: robertrose@my-dejanews.com
Subject: Re: "bind" Problems with Internet Server Program
Message-Id: <6s1bov$gcd$1@nnrp1.dejanews.com>
In article <comdog-ya02408000R2508981202210001@news.panix.com>,
comdog@computerdog.com (brian d foy) wrote:
> In article <6rujua$4pi$1@nnrp1.dejanews.com>, robertrose@my-dejanews.com
posted:
>
> >(The subroutine "tprint" is used to print out program status in html so that
> >it shows up on the web page.)
>
> does tprint include whatever is in $! ? that information is usually
> revealing :)
>
> --
> brian d foy <comdog@computerdog.com>
> CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
> Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
> Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>
>
Thanks for the suggestion. I've modified tprint to include "$!" and now
I receive the message "Illegal seek".
Do you know what this means?
Thanks,
Robert
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 26 Aug 1998 11:38:17 -0400
From: RANDY <SEX@USA.NET>
Subject: Re: [Perl] How to find the Perl FAQ
Message-Id: <35E42BE9.38D1@USA.NET>
Randy& Yvette Bogart
11238 Sacco Drive
Boca Raton, FL 33428
561-477-9142
We are swingers--into anything:-)
------------------------------
Date: 26 Aug 1998 15:12:34 GMT
From: thartman@xxxx.xx (Todd "Waxahachiefortudinouslyexportitionismistically" Hartman)
Subject: _reverse_ lookahead?
Message-Id: <6s18l2$11vk$1@ausnews.austin.ibm.com>
Does Perl have a RE feature that does reverse-lookahead (or look-behind)?
I didn't see any reference to it in ed. 2 of the Camel in the RE extensions
section (pp. 58-69). Is there a way to accomplish this?
For example, I want to match a string of digits not preceded by
the character 'a':
12345 -- matches "12345"
b12345 -- matches "12345"
a12345 -- doesn't match
joe123456 -- matches "123456"
Is there some way to massage the current RE extensions to do this?
todd.
--
Todd Hartman thartman@austin.ibm.cNOSPAMom (512)838-8789
The opinions which may or may not be explicitly implied in this document
are completely my own and are not necessarily those of my employer.
(remove NOSPAM from e-mail address to mail)
------------------------------
Date: Wed, 26 Aug 1998 08:26:19 -0700
From: "Joseph N. Hall" <joseph@5sigma.com>
Subject: ANN: Perl Class, Phila area, Oct 26-30
Message-Id: <35E42907.E5743183@5sigma.com>
5 Sigma Productions will be presenting a 3-day "Learning Perl" class
followed by a 2-day "Packages, References, Objects, and Modules" (PROM)
class in Moorestown, NJ from Monday, October 26 through
Friday, October 30. Joseph Hall, author of Effective Perl Programming,
will be teaching the class.
The class will be taught at the GORCA training facility in
Moorestown, NJ. Although the class will be taught on Unix
servers, the material is generally applicable to any Perl platform.
With advance notice, students who want to use Win32 Perl can be
accomodated.
Prequisites for the Learning Perl class are: recent programming
experience and some user experience with Unix. Familiarity with
a Unix text editor like vi or emacs will be helpful, although
there will be workarounds for the less unix literate. Familiarity
with the C programming language is helpful but not required.
For the PROM course, the above applies, except that students should
have a solid understanding of Perl basics (variables, control
structures, regular expressions, etc.).
The "Learning Perl" course is patterned after the O'Reilly book of
the same name and the materials are licensed from Randal Schwartz.
(Thanks, Randal!)
For more information (including pricing), see:
http://www.perltraining.com/schedules.html
-joseph
------------------------------
Date: 26 Aug 1998 15:05:18 GMT
From: bbirthisel@aol.com (Bbirthisel)
Subject: Re: Argh! NT Perl
Message-Id: <1998082615051800.LAA17141@ladder01.news.aol.com>
Hi Jeff:
>and the files run from the command line but not from the web, .pl files
>when typed in the browser actually open the prompt box "save file or
>open"
>
>Would appreciate any help.
This is a (quite common, actually) web server setup problem.
The installer for perl knows how to tell NT about perl - but
not how to tell "all possible web servers". So it doesn't change
ANYTHING in the web server. You need to look at the docs
for your web server. You didn't say which one you have -
and further advice is VERY server-specific. For Apache and
IIS, you can check the mail archives at www.ActiveState.com -
this question has been asked (and answered) regularly.
Good luck,
-bill
Making computers work in Manufacturing for over 25 years (inquiries welcome)
------------------------------
Date: 26 Aug 1998 10:08:39 -0500
From: Kent Perrier <kperrier@blkbox.com>
Subject: Re: Argh! NT Perl
Message-Id: <ysig1ejixvs.fsf@blkbox.com>
Jeff Riffle <webadmin@bigo.net> writes:
> I've installed Win32 Perl and PerlScript and Perl for IIS and don't know
> where to go from here, the batch files ran without error and the
> associations are there, the read/execute has been set on the cgi-bin dir
> and the files run from the command line but not from the web, .pl files
> when typed in the browser actually open the prompt box "save file or
> open"
>
Sounds like a server configuration error. You should probably check the
newsgroup that talks about your server (probably under comp.infosystems.www)
as this is not a perl problem.
> Would appreciate any help.
>
No problem. I like telling people where to go :)
Kent
------------------------------
Date: 26 Aug 1998 15:10:02 GMT
From: Dan Nguyen <nguyend7@msu.edu>
Subject: comp.lang.perl.windows.misc
Message-Id: <6s18ga$e65$5@msunews.cl.msu.edu>
IMHO, I realy think there is a need for comp.lang.perl.windows.misc,
with all the Windows people (who don't know how to read the FAQs and
wonder why chmod() doesn't work.)
I'd like to hear what some other people think about this.
-dan
--
Dan Nguyen | There is only one happiness in
nguyend7@msu.edu | life, to love and be loved.
http://www.cse.msu.edu/~nguyend7 | -George Sand
------------------------------
Date: Wed, 26 Aug 1998 15:37:53 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: comp.lang.perl.windows.misc
Message-Id: <6s1aak$6cj$1@strato.ultra.net>
[ posted and mailed ]
Dan Nguyen <nguyend7@msu.edu> wrote:
-> IMHO, I realy think there is a need for comp.lang.perl.windows.misc,
-> with all the Windows people (who don't know how to read the FAQs and
-> wonder why chmod() doesn't work.)
->
-> I'd like to hear what some other people think about this.
How will this help solve the problem with all the *nix and Mac people that
don't know how to read FAQs?
Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-800-400-1972
Ext: 1949 and let the jerk that answers know
that his toll free number was sent as spam. "
------------------------------
Date: Wed, 26 Aug 1998 15:46:07 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Forking a daemon
Message-Id: <35WE1.1027$pY1.4838905@news2.voicenet.com>
I'm trying to get a daemon process up and running without the need for
any mystical shell invocations.
Perlfaq8 has a brief section on this:
1) Open /dev/tty and use the TIOCNOTTY ioctl on it. See the tty(4)
manpage for details.
Opening /dev/tyy isn't a problem. What is a problem is how to get the
value of TIOCNOTTY. I qrote a quick C program to print out the value of
TIOCNOTTY, whcih I image would work if I hard-coded it into my Perl
program, but that seems like a Really Bad Thing to do.
Perlfaq8 also has this to say:
=head2 Where do I get the include files to do ioctl() or syscall()?
It then goes on to explain the uses of h2ph and h2xs. I suppose I could
do this, but this seems like a lot of work to get some basic
functionality.
My question: Is there a better way?
--
Matt Knecht - <hex@voicenet.com>
------------------------------
Date: Wed, 26 Aug 1998 09:54:18 -0700
From: Warren G Kafer <warrenk@mdhost.cse.tek.com>
Subject: getopts with hash problem
Message-Id: <35E43DBA.5DC491F7@mdhost.cse.tek.spamno.com>
I'm trying to parse the command line with a hash and with
a couple of trailing (required) parameters i.e.
cmdtest.post.pl -C -g -t techno stream
I'm running 5.003 I have tried at least a dozen permutations
of the following code with NO success.
Has anyone actually used a hash reference with getopts??????
Thanks for all your help!
Remove spamno. from my email address for replying.
Warren
#### begin code
#!/stdapps/valid/tektools/bin/perl -w
use strict; # Keep me honest!
use Getopt::Std qw(getopts); # Module to parse command line.
use vars qw( %Switches );
# Predeclare globals.
########################## Start of processing. ###########################
if (!@ARGV) # Catch help requests.
{
HelpText();
exit (1);
}
if (!ParseARGV()) # Parse the command line.
{
print "Exit error!\n";
exit(1);
}
else
{
print "Exit OK\n";
exit(0);
}
########################## End of processing. ###########################
## Name: ParseARGV
##
## Description: Parse the command line for legal switches. Set global
## variables as needed.
## Returns: 0 for error in command line.
## 1 for success.
##
sub ParseARGV
{
my $idx;
my $key;
my $value;
if ($#ARGV < 1) # Catch too few args.
{
print "script: Too few command line arguments!\n";
return 0;
}
print $#ARGV ." "; # Check ARGV count.
# Parse command line.
$idx = getopts('CgiIPRtXz:', \%Switches);
# Boolean options with
# z: dummy option for -w bug.
print $#ARGV ."\n";
print $idx ." status \t";
$idx = scalar keys %Switches;
print $idx ." keys\n";
while (($key,$value) = each(%Switches)) {
print "$key = $value\n"; # List options entered.
}
if ($#ARGV > -1)
{
print ("\$ARGV[0]=$ARGV[0]\n\$ARGV[1]=$ARGV[1]\n");
}
return 1;
}
############ End of ParseARGV Subroutine ############
## Name: HelpText
##
## Description: Lists the available option to the user with defaults.
## Returns: na
##
sub HelpText
{
print "Usage: script [-options] <technology> <stream_file>\n\n";
print "Script to extract a Spice netlist from <stream_file>\n\n";
print "Options:\n";
print "\t-C Skip parasitic netlist creation.\n";
print "\t-g Skip GDSII conversion (must already exist).\n";
print "\t-i Skip ideal netlist creation (must already exist).\n";
print "\t-P Add ports for stdcells.\n";
print "\t-R Does not extract resistors.\n";
print "\t-t Keep lower level exploded text (internal nodes).\n";
print "\t-X Delete working directories and files.\n";
print "Valid Technologies:\n";
print "\n";
}
############ End of HelpText Subroutine ############
#### end code
------------------------------
Date: Wed, 26 Aug 1998 17:35:24 +0200
From: "sCALP" <scalp@orka.fr>
Subject: getting the content of a url...
Message-Id: <6s19t5$mi$1@platane.wanadoo.fr>
Hi!
i want to do something like:
open(MY_ID,"<http://myhost/myrep/myfile");
open(MY_OTHER_ID,">myfile_local");
while(<MY_ID>)
{print MY_OTHER_ID $_;}
close(MY_OTHER_ID);
close(MY_ID);
how is it possible ???(i haven't learn how to use sockets yet... so if you
can tell me the syntax!)
second thing:
if my perl begin with:
BEGIN {$ENV{'HOST'} = "my own value";}
and if ,after, i open my file, does the remote file have as
$ENV{'REMOTE_HOST'}, the value i entered??
if not, how can i do that?
It's to manage to fake informations sent to a url, so i can just get the
content of the url, without having my ip or host or servername logged...
i thank everyone who will help me.
scalp@orka.fr
scalp.
------------------------------
Date: Wed, 26 Aug 1998 08:01:33 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Help with reading a file
Message-Id: <MPG.104dc32c3be5ba999897f2@nntp.hpl.hp.com>
In article <6s16d3$8p0$1@wbnws01.ne.highway1.com> on Wed, 26 Aug 1998
10:33:01 -0400, Todd B <NOTHANKStbeaulieu@mediaone.net> says...
> if there's no such thing as a line, why does your example code demonstrate
> reading lines in a variable called "nextline"?<g>
This is why Perl diagnostics typically report position in an open file in
terms of 'chunks'. Rather mystifying, until you grok that 'chunk' ne
'line'.
--
(Yet Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 26 Aug 1998 15:13:58 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Help with reading a file
Message-Id: <6s18nm$ftq@news-central.tiac.net>
In article <MPG.104dc32c3be5ba999897f2@nntp.hpl.hp.com>,
Larry Rosler <lr@hpl.hp.com> wrote:
>In article <6s16d3$8p0$1@wbnws01.ne.highway1.com> on Wed, 26 Aug 1998
>10:33:01 -0400, Todd B <NOTHANKStbeaulieu@mediaone.net> says...
>> if there's no such thing as a line, why does your example code demonstrate
>> reading lines in a variable called "nextline"?<g>
>
>This is why Perl diagnostics typically report position in an open file in
>terms of 'chunks'. Rather mystifying, until you grok that 'chunk' ne
>'line'.
The many people who are happy to conside their scripts to be processing
lines of text from files (something which perl's defaults seem to make
easy :-) can take solace in
DB<5> print 'chunk' == 'line'
1
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: Wed, 26 Aug 1998 07:55:10 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How to match anything but some characters (reg-exp)
Message-Id: <MPG.104dc1ac989d49b59897f1@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <35E416A5.9361608A@forumnett.no> on Wed, 26 Aug 1998 16:07:33
+0200, Hauk Langlo <hauk@forumnett.no> says...
...
> If ($somescalar =~ /"anything exept a-z, 0-9, or -"/g){
> do stuff
> }
>
> I know that this problem probably is of a basic structure for the
> experts out there. I really have tried figuring this out by reading the
> MAN pages and the exellent Lama and Camel books, but as a newbie it has
> been to no avail. I'm thankfull for any response.
You missed something rather basic in perlre: The use of ^ as the first
character in a character class to mean "all *except* the characters
enumerated in the character class":
You can specify a character class, by enclosing a list of characters
in [], which will match any one of the characters in the list. If the
first character after the "[" is "^", the class matches any character
not in the list. ...
In your example, this would be:
if ($somescalar =~ /[^a-z\d-]/ {
Lower-case 'if', of course. :-)
--
(Yet Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 26 Aug 1998 07:42:20 -0700
From: Brad Murray <murrayb@vansel.alcatel.com>
Subject: Re: How to match anything but some characters (reg-exp)
Message-Id: <uww7v954j.fsf@vansel.alcatel.com>
Hauk Langlo <hauk@forumnett.no> writes:
> If ($somescalar =~ /"anything exept a-z, 0-9, or -"/g){
> do stuff
> }
if ($somescalar !~ /[a-z0-9\-]/) {
# stuff
}
--
BMurray Q: "My prostate is swollen and I think it's a networking
SW Analyst problem. Can you help?"
Alcatel A: "Build a free Linux box, relinking the kernel
as follows ..." (Gary Abbott)
------------------------------
Date: Wed, 26 Aug 1998 08:24:08 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How to match anything but some characters (reg-exp)
Message-Id: <MPG.104dc86fc59cde349897f3@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <uww7v954j.fsf@vansel.alcatel.com> on 26 Aug 1998 07:42:20 -
0700, Brad Murray <murrayb@vansel.alcatel.com> says...
> > If ($somescalar =~ /"anything exept a-z, 0-9, or -"/g){
> > do stuff
> > }
>
> if ($somescalar !~ /[a-z0-9\-]/) {
No. Consider, for example, $somescalar = ""; This does not have a
character except a-z, 0-9 or -, yet your regex succeeds.
--
(Yet Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 26 Aug 1998 17:37:14 +0200
From: Hauk Langlo <hauk@forumnett.no>
Subject: Re: How to match anything but some characters (reg-exp)
Message-Id: <35E42BAA.B0BA7B98@forumnett.no>
Dan Nguyen wrote:
> [^a-z0-9\-] //that's all I'm giving you.
The ^ was all I needed. Thanks. Larry Rossler is 100% correct in his reply by
the way, I have missed a significant function in Perl.
> So read them again. They're great reading material.
I will.
Hauk
------------------------------
Date: Wed, 26 Aug 1998 11:06:31 -0500
From: John Warner <support@ichat.com>
Subject: How to update an input file?
Message-Id: <35E43287.E17A54DC@ichat.com>
I am trying to update a series of HTML files. I need to
update all the files in a directory from referencing an IP
address to a DNS host name. I am running Perl on NT. I
tried using:
perl -p -i -e s/xxx\.xxx\.xxx\.233/dns.hostname.com/g;
*.html
but Perl tells me that it doesn't understand character 233.
I have not been able to understand why yet. Time for a
different approach. I tried the following but it causes the
first two lines of the file to be repeated endlessly at the
end of the file.
#process each file
foreach $path (@paths){
opendir CURRDIR, $path or die "Directory specified does not
exist!\n $!";
@allfiles= readdir CURRDIR;
&ProcessFiles1;
#unlink @allfiles; # delete the now obsolete files...should
work on Unix
}
@allfiles = readdir
foreach $file (@allfiles){
$fullname = "$path/$file";
open INFILE, "+<$fullname";
print "Working on file $fullname\n";
while (<INFILE>){
$currpos = tell INFILE;
#xxx.xxx.xxx.233 has an actual value in the script
#I left it out to protect the customer's identity.
s/xxx\.xxx\.xxx\.233/dns.hostname.com/g;
seek INFILE, $currpos, 0;
printf INFILE $_;
}
sleep 3;
seek INFILE,0,1; #set file marker back to BOF
close INFILE;
}
What am I doing wrong?
------------------------------
Date: Wed, 26 Aug 1998 15:39:26 GMT
From: jim.ray@west.boeing.com (Jim Ray)
Subject: Re: Index.pl
Message-Id: <MPG.104dcc0a763cb9198968b@news.boeing.com>
In article <obn28yhwd6.fsf@alder.dev.tivoli.com>, jdw@dev.tivoli.com
says...
>
> james.a.ray2@boeing.com (Jim Ray) writes:
> > I need a perl script that will create a linkable list
> >
> > Example
> >
> > Top
> > SubDir
> > Files
> > Files
> > SubDir
> > Files
> > Files
> > SubDir
> > Files
> > Files
> > SubDir
> > Files
> > Files
> >
> > Each one of these need to have a link attached to them. Does anyone have
> > any suggestions?
>
> Not exactly what you want, but might get you started in the right
> direction:
>
> use CGI qw/:standard/;
> require "find.pl";
>
> # Traverse desired filesystems
>
> &find('.');
>
> exit;
>
> sub wanted {
> my $link = make_link($name);
> my $text = make_text($name);
> print a({-href => $link}, $text), "\n";
> }
>
>
> --
> Jim Woodgate
> Tivoli Systems
> E-Mail: jdw@dev.tivoli.com
>
Jim Thank you for the information. I'll give it a try.
Jim Ray
------------------------------
Date: Wed, 26 Aug 1998 15:05:00 GMT
From: sbernard@mail.esiea.fr
Subject: Inserting an image into a HTML file using CGI
Message-Id: <6s186t$b9j$1@nnrp1.dejanews.com>
I'm using the cgi-lib.pl to send some HTML file to the browser. I've
got a jpeg picture in a scalar (a string that you can considered the bytes of
my file), and I'd like to know how to display my picture with something like
:
printf("Content-type: image/gif\n\n") ;
printf("Content-length: image/gif\n\n") ;
binmode STDOUT;
print $image;
But actually, this doesn't work at all ! But if I make something like :
open(FIC,"> myimagefile.jpg");
print FIC $image;
close(FIC);
It works properly, and I can load the image with my browser. Please tell how
NOT to be obliged to save the file to send it to the browser.
PS : Please add a direct e-mail response to your answer.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 26 Aug 1998 17:17:30 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Inserting an image into a HTML file using CGI
Message-Id: <7xd89ng4c5.fsf@salome.vcpc.univie.ac.at>
Re: Inserting an image into a HTML file using CGI, sbernard
<sbernard@mail.esiea.fr> said:
sbernard> printf("Content-type: image/gif\n\n") ;
Why are you trying to send a JPEG as a GIF? Oh, whoops!
[also you can use print instead of printf]
sbernard> printf("Content-length: image/gif\n\n")
Content-Length isn't a MIME type.
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: Wed, 26 Aug 1998 10:40:26 -0400
From: "Dennis M. Parrott" <dparrott@ford.com>
To: ListAdmin <owner-www-countries@mch.sni.de>
Subject: Re: man pages for win32 perl
Message-Id: <35E41E5A.6992@ford.com>
ListAdmin wrote:
>
> [mailed and posted]
>
> Daniel or Shelly wrote:
> >
> > Where are the man pages for win32 perl? Why doesn't it work
> > when I want to look up a perl command with the man pages
> > on my windows 98 computer and I type "man (perl command"
> > after the "C:\perl\" prompt?
>
> Windows 98 does not know who "man" is. Try perldoc instead.
> Examples:
> perldoc -f binmode
> perldoc perlvar
> perldoc strict
> perldoc File::Find
> --
> Cheers,
> --haj--
The real answer to the first question is "it depends". It depends
on which Win32 version of Perl you are using. If you are using the
version that is built and distributed by ActiveWare or ActiveState
the man pages are wherever they put them. :^) If you are using
GSAR's (G. Sarathy? I can never remember how to spell his name!)
port of "standard" Perl to the Win32 environment, all of the docs
live in a subdirectory under the Perl installation directory.
In fact, you can install the docs as a set of nicely linked HTML
pages. On my installation here at work, I find them at c:\perl\html.
Using a copy of Apache running on my box, I serve them up. (the
server is optional -- you can just load them in as files to view
them)
As a point of future reference, it *really* helps when you
ask a question about Perl (or any other computer-related thing)
on Usenet if you provide us with the version of Perl you are
attempting to use. You can get that info by going into a DOS
box and typing 'perl -v'. It will tell us a great deal so that
we can actually provide better help.
While there is nothing wrong with 'perldoc', I tend to prefer
the HTMLized man pages. They are easier to read.
--
-----------------------------------------------------------------------
Dennis M. Parrott | Unix: dparrott@ford.com
PCSE Webmaster | PROFS: DPARROTT
Ford Motor Company | VAX: EEE1::PARROTT
Dearborn, Michigan USA | public Internet: dparrott@ford.com
-----------------------------------------------------------------------
Voice: 313-322-4933 Fax: 313-248-1234 Pager: 313-851-2958
------------------------------
Date: Wed, 26 Aug 1998 11:44:31 -0500
From: Cameron Dorey <camerond@mail.uca.edu>
Subject: Re: man pages for win32 perl
Message-Id: <35E43B6F.B18115B@mail.uca.edu>
Dan Nguyen wrote:
>
> [snip]
> I'm not sure if Windows people have perldoc. But 'perldoc
> -f print' is the correct way of looking it up.
GS port (5.004) has perldoc, AS port (5.003) does not. I don't know
about the new AS port (5.005).
Perldoc can be a *lot* easier than running through the HTML pages when
you just want to look up something quick.
Cameron
------------------------------
Date: Wed, 26 Aug 1998 15:18:32 GMT
From: joe_tseng@hotmail.com
Subject: Packed Decimal script
Message-Id: <6s1908$cjd$1@nnrp1.dejanews.com>
We are migrating our mainframe processes inhouse to a unix setup and we need
some way to convert packed decimal to ascii. Are there any scripts available
that can do this? If not, can anyone provide pseudocode as to how this is
done? Thanx.
Joe Tseng
joe_tseng@hotmail.com
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 26 Aug 1998 15:45:08 +0100
From: el@linux.lisse.na (Dr Eberhard W Lisse)
Subject: perl 5.005 RPM for redhat 4.2 anyone?
Message-Id: <k171s6.m81.ln@linux.lisse.na>
Hi,
above subject says it all, does anyone have a pointer to where I can
grab this?
el
--
Dr. Eberhard W. Lisse\ / Swakopmund State Hospital
<el@lisse.NA> * | Resident Medical Officer
Private Bag 5004 \ / +264 81 1246733 (c) 64 461005(h) 461004(f)
Swakopmund, Namibia ;____/ Domain Coordinator for NA-DOM (el108)
------------------------------
Date: Wed, 26 Aug 1998 10:45:57 -0500
From: Jose Cuervo <jcrowe@io.com>
Subject: Re: Perl compiler
Message-Id: <35E42DB4.41C6@io.com>
Hi Folks,
Sorry for entering this discussion late and taking another direction
within the thread but would one bit of reasoning behind a Perl compiler
relate to performance? I read that Perl performs extremely well in many
tasks but some other situations/environments may be less appropriate for
Perl. At work, some people have observed Perl to be very slow for some
tasks. This may be a function of the port of Perl to our particular
UNIX variant or to the MIPS ISA but I would think a compiled version
might alleviate such problems. What do you all think????
--
Joe Crowe
mailto:jcrowe@io.com
------------------------------
Date: 26 Aug 1998 16:12:59 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl compiler
Message-Id: <6s1c6b$f07$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, jdporter@min.net writes:
:I assume that this does not extend to code which is actually
:useful/valuable to the company, which they actually paid you
:to write. (Correct me if I'm wrong.)
No, that would be incorrect. Years ago, I was once burned by doing
work in C for a company and not being able to give its source to the
paying customers who'd bought the product and needed the source for
some cross-platform compatibility work (i.e. running the binary on
different architectures.) They were refused. It was rude and pissed
off the customers. I will never put myself in that position again,
nor shall I support others doing so. I am still bitter about it,
which is probably reflected in my recent postings on these matters.
I swore then I would only write in Perl lest someone legally entitled
to the program not be able to get at the source. This compiler thing,
which I instigated, is being used for evil, a word I use not lightly.
--tom
--
In the common people there is no wisdom, no penetration, no power of judgment.
--Marcus Cicero
------------------------------
Date: 26 Aug 1998 12:37:19 -0400
From: Bruce Barnett <see.my.address.below@domain.com>
Subject: Re: Perl compiler
Message-Id: <yek7lzvsnr4.fsf@grymoire.birch>
Tom Christiansen <tchrist@mox.perl.com> writes:
> Your program is almost certainly worth nothing anyway -- is it now?
Please Tom. There is no reason to insult someone.
Life is not so simple as you would like to believe.
Suppose some company invested $250,000 in a project written in
PERL. Suppose patents were pending on the concepts. Suppose those
that funded it wanted to get compensated for it?
> Just give it away, Lily, and become famous if it's a wonderful program.
Suppose it is not Lily's to give away, but instead belongs to the
people who funded it.
--
Bruce <barnett at crd. ge. com> (speaking as myself, and not a GE employee)
------------------------------
Date: 26 Aug 1998 16:38:21 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Perl compiler
Message-Id: <6s1dlu$9pm$1@marina.cinenet.net>
Tom Christiansen (tchrist@mox.perl.com) wrote:
[snip]
: I swore then I would only write in Perl lest someone legally entitled
: to the program not be able to get at the source. This compiler thing,
: which I instigated, is being used for evil, a word I use not lightly.
So again, just to clarify your position, would it be fair to characterize
your views as any of the following? Choose all that apply:
a) All software, under all circumstances, should be distributed free-
in-the-GNU-sense.
b) All software, under all circumstances, should be distributed as or
with unobfuscated source.
c) If either (a) or (b) apply, violating the applicable principle is
inherently evil in the strong, moral sense of the term.
I have the feeling that if we can pin this down, we may find ourselves in
more agreement than is readily apparent.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: Wed, 26 Aug 1998 11:40:31 -0400
From: "John Call" <johnc@interactive.ibm.com>
Subject: Perl Cookbook, does anyone have it?
Message-Id: <6s1aau$1g4i$1@ausnews.austin.ibm.com>
Has anyone gotten a copy of this yet? I'm dying to get it and it doesn't
seem to have reached Georgia yet.
If you do have it, do you like it? From what I've seen on the ORA site it
looks good.
--
John Call
IBM Interactive Media
------------------------------
Date: Wed, 26 Aug 1998 16:00:20 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Perl Cookbook, does anyone have it?
Message-Id: <oiWE1.23$wf3.358714@shore>
John Call (johnc@interactive.ibm.com) wrote:
: If you do have it, do you like it? From what I've seen on the ORA site it
: looks good.
Have it. Love it. Lots of great examples to work with and study.
--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>
------------------------------
Date: Wed, 26 Aug 1998 10:49:00 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Perl FAR version 1.1.1 MAKE SURE YOU READ THIS BEFORE POSTING
Message-Id: <fl_aggie-2608981049010001@aggie.coaps.fsu.edu>
In article <No.unsoiliciteds-2608981523370001@cs11m29.ppp.infoweb.or.jp>,
No.unsoiliciteds@dead.end (Norman UNsoliciteds) wrote:
+ anything there either. What is this obsession with payment? Isn't Perl an
+ open source language percisely for this reason? So you can learn? Oh damn
+ I used that word which is severly depreciated again, sorry.
Well, then go and learn. The source is there. Stop bugging us. Its
like teaching a pig to sing: wastes your time, and annoys the hell out
of the pig...
+ No it just means you hate newbies. Probably due to the fact you had to
+ take flamings when you were one and now subconsciously you are trying to
+ eliminate that part of your life by projecting onto the outside world.
Thank you, Dr. Freud. Is that why you post this balderdash called
FAR? Where you flamed as a child? Are you projecting?
One should be careful of flinging psychobabble...it may come back and
hit you...
James
------------------------------
Date: 26 Aug 1998 11:23:41 -0500
From: awdorrin@mail.delcoelect.com (Albert W. Dorrington)
Subject: Re: Pretty HTML-izing of Perl source?
Message-Id: <6s1cqd$3aq@ws051eng.ictest.delcoelect.com>
In article <35D7990F.F978730F@pegasus.rutgers.edu>, Donovan Rebbechi <elflord@pegasus.rutgers.edu> writes:
:> Corbett J. Klempay wrote:
:> >
:> > Hi there..I'm wondering if anyone is aware of (and can point me to) any
:> > tools (probably in Perl themselves, I'd assume) that, given Perl source,
:> > output pretty HTML files (syntax highlighted, basically). I have seen a
:>
:> vim is a text editor that includes syntax highlighting for basically
:> everything, which of course includes perl. (note that you need vim >= 5
:> to do this)
:>
:> It cones with a tool that allows you to get html output of a vim session
:> (it renders the colours properly , etc ).
:>
:> Check out my vim page
:> http://pegasus.rutgers.edu/~elflord/vim/
:> for some sample shots (bash scripts and build scripts)
:> you can get vim from http://www.vim.org
:>
The newest version of Gnu Enscript (genscript V1.6.1)
has a method to do this as well, look at:
http://www.ngs.fi/mtr/genscript/
- Al
--
Al Dorrington
FIRMS & Web Admin, Oracle DBA Phone: 765-451-9655
IC-DELCO CIM, Delphi Delco Electronics Systems Fax: 765-451-8230
------------------------------
Date: Wed, 26 Aug 1998 15:47:35 GMT
From: robertrose@my-dejanews.com
Subject: Re: Problem with "bind" statement in web server app
Message-Id: <6s1amn$f0i$1@nnrp1.dejanews.com>
In article <6rvgq5$ikb$1@monet.op.net>,
mjd@op.net (Mark-Jason Dominus) wrote:
>
> In article <6rukm3$5tg$1@nnrp1.dejanews.com>,
> <robertrose@my-dejanews.com> wrote:
> >However, it always fails at the "bind" statement
> >when executed as a web-page cgi script.
> >
> >Any ideas why?
>
> replace the `die' with:
>
> || ($err = $!, &tprint, die "bind: $err");
>
> and Perl will tell you why. $! is the special variable that contains
> the reason why.
>
> Then if you still don't understand, come back here and ask what it means.
>
>
Thanks for the ideas. I tried using $! and I received a "Illegal seek"
message. Do you know what this means?
Thanks,
Robert
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 26 Aug 1998 16:21:56 GMT
From: gohel@csee.usf.eduXXX (Himanshu Gohel)
Subject: read numbers from file into array
Message-Id: <6s1cn4$a92$1@news.usf.edu>
Hi,
My first program in perl, so bear with me. I've figured out the shell
of my program (opening, writing and closing files). The problem is
I haven't figured out how to read the formatted input from the input file
to manipulate and then send to the output file. The input looks like:
n
x0 x1 x2 ... xn
y0 y1 y2 ... yn
n is an integer, and x,y are floats. x's may be on one line, or
split over various lines if too many. Same for y's. I would like
to read the x and y values into one array (or two separate if
that's easier).
Help? (If you reply by email, please remove the anti-spam 'XXX' Thanks)
--
Himanshu Gohel, mailto:gohel@csee.usf.eduXXX | Yeah, Pops was right,
<A HREF="http://www.csee.usf.edu/~gohel/"></A> | it's a wonderful
Geometric Modeling and Graphics Research Group | world.
U of South Florida, Tampa, FL. USA. | -- Tony Bennett
------------------------------
Date: Wed, 26 Aug 1998 15:22:48 +0100
From: "Martin" <minich@globalnet.co.uk>
Subject: Re: String terminators
Message-Id: <6s1cml$kmu$1@heliodor.xara.net>
>line 1149 is this print <<"EOF";
>
> ....some text.....
>
> EOF
>
> exit(1);
>
try
print <<EOF;
foo
bar
foo
bar
EOF
;
exit(1);
Note the semicolon on the line below the EOF.
Martin
------------------------------
Date: Wed, 26 Aug 1998 16:36:18 GMT
From: sbernard@mail.esiea.fr
Subject: Using cookie-lib.pl to set cookies
Message-Id: <6s1di2$ifl$1@nnrp1.dejanews.com>
I try to use cookie-lib.pl to set up cookies, but I'm really a newbie. So if
anyone have already used it with success, I'd be happy to learn from him. I've
tried to setup a simple cookie this way :
#!/bin/perl
#
require "cgi-lib.pl";
require "cookie-lib.pl";
$expiration="";
$path="/";
$domain="";
$secure="0";
$cookie{'itsok'} = 1;
&set_cookie($expiration,$domain,$path,$secure);
print &PrintHeader;
print &HtmlTop;
print "Le cookie a ete fixe avec succes";
print &HtmlBot;
exit;
But this doesn't seem to work (well, I'm using Netscape, and in my
configuration, I asked to make an alert before accepting a cookie, and nothing
happens when I run the script). A example would be fine ...
Sibastien BERNARD
PS : Please add a direct e-mail answer to mailto:sbernard@mail.esiea.fr
Thanks !
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 26 Aug 1998 14:56:39 GMT
From: Dan Nguyen <nguyend7@msu.edu>
Subject: Re: webcounter in Perl?
Message-Id: <6s17n7$e65$3@msunews.cl.msu.edu>
Marc Busch <mbusch@iskp.uni-bonn.de> wrote:
: I need some hints on how to program a webcounter in Perl (or can this task
: be done in JavaScript?).
Web counters can't be done in JavaScript
: Are there any resources/information or do I have to reinvent the wheel?
Why do you want a web counter. Does it really matter how many people
have visited your site?
--
Dan Nguyen | There is only one happiness in
nguyend7@msu.edu | life, to love and be loved.
http://www.cse.msu.edu/~nguyend7 | -George Sand
------------------------------
Date: 26 Aug 1998 15:00:51 GMT
From: Dan Nguyen <nguyend7@msu.edu>
Subject: Re: Why dont people read the FAQs
Message-Id: <6s17v3$e65$4@msunews.cl.msu.edu>
? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au> wrote:
: In <6rvnqg$agq$1@msunews.cl.msu.edu> Dan Nguyen <nguyend7@msu.edu> writes:
: [...]
:>You probably regard Tom Christiansen as a true perl guru (I know I
:>do.) His posts can be off the wall sometimes.
: You know your leaving yourself open to a most dreadfull pun here.
I know... I was hoping someone would do something.
--
Dan Nguyen | There is only one happiness in
nguyend7@msu.edu | life, to love and be loved.
http://www.cse.msu.edu/~nguyend7 | -George Sand
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 3550
**************************************