[6923] in Perl-Users-Digest
Perl-Users Digest, Issue: 548 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat May 31 12:07:56 1997
Date: Sat, 31 May 97 09: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 Sat, 31 May 1997 Volume: 8 Number: 548
Today's topics:
Re: any editor for perl?--any editor written in Perl? (G. Sumner Hayes)
Re: any editor for perl?--any editor written in Perl? <customdesign@nstate.net>
Re: any editor for perl?--any editor written in Perl? (Colin Kuskie)
Re: any editor for perl? <customdesign@nstate.net>
Re: any editor for perl? <customdesign@nstate.net>
Compiling Perl 5.003 <aries@idola.net.id>
Re: decimal to binary converter (Abigail)
Re: Forking in Perl on NT ?? <customdesign@nstate.net>
Re: Forking in Perl on NT ?? <customdesign@nstate.net>
form input feilds problems <customdesign@nstate.net>
Re: form input feilds problems <customdesign@nstate.net>
Help wanted PERL5.001 -> PERL5.003 (Johan Palmaeus)
How do I pass HTTP_REFERER parameter in LWP:UserAgent ? <walter@swiftech.com.sg>
Re: How to extract text enclosed by... (Eileen Wharmby)
Re: I'm having problems with my "here document" syntax <customdesign@nstate.net>
Re: JavaScript BBS System (Darryl C. Burgdorf)
Re: Need vacation program in Perl! (Andrew Starr)
Netscape Server/NT use statement error <eagleye@eskimo.com>
Re: Open and print HTML file insside CGI script <customdesign@nstate.net>
Password verification/File Access Priveleges (Tai Luxon)
printf padding ... (Christopher Greenup)
Re: printf padding ... (Tad McClellan)
Problems in Sys::Syslog or Sys::Hostname in Solaris (Pedro Melo)
Regex lookahead help (Jeff Stampes)
Re: Socket reading (Andrew M. Langmead)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 31 May 1997 08:37:38 GMT
From: sumner@pathway.nospam.net (G. Sumner Hayes)
Subject: Re: any editor for perl?--any editor written in Perl?
Message-Id: <slrn5ovp29.2bi.sumner@collegium.innova.com>
Charles F. Randall <crandall@free.click-n-call.com> wrote:
> [Note: CC of this article mailed to poster, and crossposted to comp.editors]
>
> O'Shaughnessy Evans <shaug@callamer.com> wrote:
> >> I haven't seen it, but I hear that there's a version of vi which uses
> >> embedded Perl, so you can use Perl code to edit your files. I've gotta try
> >> that. :-)
> >
> >Wow, that's a teaser! Sooo, has anybody else heard of this -- if so,
> >howzabout a URL?
>
> I think that he's referring to nvi. There's a link at "The Perl Oasis"
> that refers to it,
>
> http://www.oasis.leo.org/perl/misc/00-index.html
>
> The nvi home appears to be at,
>
> http://mongoose.bostic.com/vi/
The newest alpha versions of Vim include Perl and Python support as well.
TTFN,
Sumner
--
sumner@pathway.nospam.net <- Spam protected. Remove nospam.
Apologies to legitimate repliers.
------------------------------
Date: Sat, 31 May 1997 04:38:16 -0700
From: TRG Custom Graphics <customdesign@nstate.net>
Subject: Re: any editor for perl?--any editor written in Perl?
Message-Id: <33900DA8.46E9@nstate.net>
O'Shaughnessy Evans wrote:
>
> > I haven't seen it, but I hear that there's a version of vi which uses
> > embedded Perl, so you can use Perl code to edit your files. I've gotta try
> > that. :-)
>
> Wow, that's a teaser! Sooo, has anybody else heard of this -- if so,
> howzabout a URL?
>
> - O'Shaughnessy Evans
> - UNIX/Internet Systems Administrator, GST Call America; SLO, Ca
> - "I'm about to write you a reality check..." -- The Tick
What?.. ha ha ha.. I'm going to read inbetween the lines before I reply
next time.. *lol*...
------------------------------
Date: 30 May 1997 16:56:24 -0700
From: colink@latticesemi.com (Colin Kuskie)
Subject: Re: any editor for perl?--any editor written in Perl?
Message-Id: <5mnpf8$604@defiant.latticesemi.com>
In article <5mn4jv$pkd$3@zinger.callamer.com>,
O'Shaughnessy Evans <shaug@callamer.com> wrote:
>> I haven't seen it, but I hear that there's a version of vi which uses
>> embedded Perl, so you can use Perl code to edit your files. I've gotta try
>> that. :-)
>
>Wow, that's a teaser! Sooo, has anybody else heard of this -- if so,
>howzabout a URL?
How about:
http://www.perl.com/CPAN/misc/nvi.tar.gz (or somewhere there abouts)
nvi has been at CPAN for several months that I know about, and
I've been using it for almost a year. I got my copy from:
ftp.cs.berkeley.edu in /ucb/4bsd/
It's great. Want to auto-number some lines?
:.,$ perldo s#\d+#++$a#e;
I'm working on a module for use with nvi that autoloads subroutines
when needed. So far I've implemented:
reverse lines
reverse words in a line
almost rectangular cut and paste
plus all the example code that comes with nvi for perl scripts:
word count
find all marks
Should be released sooner or later. Hope this helps,
Colin
------------------------------
Date: Sat, 31 May 1997 04:36:40 -0700
From: TRG Custom Graphics <customdesign@nstate.net>
Subject: Re: any editor for perl?
Message-Id: <33900D48.139@nstate.net>
Dave M. Lent [I] wrote:
>
> Hope this helps! wrote:
> >
> > In article <338EA3E3.4F60@nstate.net>,
> > TRG Custom Graphics <customdesign@nstate.net> wrote:
> > >set at.. (more hacking probably).. oh well.. I think pico and vi are
> > >both poor online edtors, and I end up having to FTP most of the time.. t
> > >sometimes does short wraps without warning.. ERROR.. *cringe*.. f
> > >anyone knows of any better onoine editors that aren't pico or vi, please
> > >inform me...
> >
> > Since you do use vi, your best bet is to get better used to it,
> > approaching it with unprejudiced eye and without negative attitude.
> > With a few macros, it's simply the best editor for Perl, in fact
> > most of the time all I have to do in vi is hit a few well-timed
> > tabs and it writes the code I wanted.
>
> Also, try emacs or Xemacs.
uh.. yup.. that's why I sad if anyone knows of a better online editor. I
haven't found one better yet.. But I will still look. I doubt I'll find
one soon.. but hey.. something to do when I actually have 5 minutes in
the day.. ;-)
------------------------------
Date: Sat, 31 May 1997 04:46:51 -0700
From: TRG Custom Graphics <customdesign@nstate.net>
Subject: Re: any editor for perl?
Message-Id: <33900FAA.4B94@nstate.net>
Tom Phoenix wrote:
>
> On 30 May 1997, Hope this helps! wrote:
>
> > Since you do use vi, your best bet is to get better used to it,
> > approaching it with unprejudiced eye and without negative attitude.
> > With a few macros, it's simply the best editor for Perl, in fact
> > most of the time all I have to do in vi is hit a few well-timed
> > tabs and it writes the code I wanted.
>
> So, you have a "do what I mean" tab key? Must be a "smart terminal".
>
> -- Tom Phoenix http://www.teleport.com/~rootbeer/
> rootbeer@teleport.com PGP Skribu al mi per Esperanto!
> Randal Schwartz Case: http://www.lightlink.com/fors/
Good one.. 8-) .,. I give up.. I meant something else.. I don't use
online editors unless I can help it anyway..
Ciao..
------------------------------
Date: Thu, 29 May 1997 17:03:22 -0700
From: Aries <aries@idola.net.id>
Subject: Compiling Perl 5.003
Message-Id: <338E194A.3812@idola.net.id>
Hi...
I tried to install perl 5.003 on my PC Intel Pentium running BSDI 3.0
But, i always got these error messages like below :
DB_File.c:5144:invalid character '@' in first operand
DB_File.c:5145:invalid character '@' in first operand
DB_File.c:5147:invalid character '@' in first operand
DB_File.c:5150:invalid character '@' in first operand
DB_File.c:5151:invalid character '@' in first operand
*** Error code 1
Stop.
*** Error code 1
Could you please help me solve this problem?
Thanks in advance.
------------------------------
Date: Sat, 31 May 1997 07:19:06 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: decimal to binary converter
Message-Id: <EB1Azu.Hwt@nonexistent.com>
On 30 May 1997 17:52:11 -0400, Mike East (gt6242b@prism.gatech.edu) wrote in
comp.lang.perl.misc
<URL: news:5mni6b$8tu@acmex.gatech.edu>:
++ Does anyone know how to convert decimal numbers to binary numbers in
++ Perl???
There's probably a way to do it with (un)pack, or else it might
be in the FAQ, but here's a different approach:
perl -wnle 'BEGIN {%h = qw /0 0000 1 0001 2 0010 3 0011 4 0100 5 0101
6 0110 7 0111 8 1000 9 1001 a 1010 b 1011 c 1100 d 1101 e 1110 f 1111/;}
print map {$h {$_};} split //, sprintf "%x", $_;' <<END
1
5
25
END
0001
0101
00011001
Abigail
--
perl5.004 -wMMath::BigInt -e'$=new Math::BigInt+qq;$$783$[$%9889$47$|88768$596577669$%$5$3364$[$$$|838747$[8889739$%$|$673$%$98$76777$=56;;$=$]*(q.25..($=@))=>do{print+chr$%$;$/=$}while$!=$'
------------------------------
Date: Sat, 31 May 1997 04:49:34 -0700
From: TRG Custom Graphics <customdesign@nstate.net>
Subject: Re: Forking in Perl on NT ??
Message-Id: <3390104D.5E28@nstate.net>
Bhuvanesh Jani wrote:
>
> Hi,
>
> I have a perl script which uses fork. I am trying execute it on NT.
> Seems like NT doesn't support fork. Does any one out there know the way
> around it ?!
>
> Please reply directly to bhuvan@qimage.com.
>
> Thanks
> --
> Bhuvan Jani
Hmmmm.. what are ya doin'?.. could do a sys V... um, depending on what
you want.. I can't say much about this.. NT and perl is .. just..
scary.. I gotta do it anyway myself..
A~loha...
------------------------------
Date: Sat, 31 May 1997 05:00:30 -0700
From: TRG Custom Graphics <customdesign@nstate.net>
Subject: Re: Forking in Perl on NT ??
Message-Id: <339012DE.11E5@nstate.net>
Bhuvanesh Jani wrote:
>
> Hi,
>
> I have a perl script which uses fork. I am trying execute it on NT.
> Seems like NT doesn't support fork. Does any one out there know the way
> around it ?!
>
> Please reply directly to bhuvan@qimage.com.
>
> Thanks
> --
> Bhuvan Jani
Sorry.. me again.. *barely awake*.. I meant,. for instance.. messaging,
etc.. look into a system V type thing.. Gotta scram...
l8rz...
------------------------------
Date: Sat, 31 May 1997 03:26:03 -0700
From: TRG Custom Graphics <customdesign@nstate.net>
Subject: form input feilds problems
Message-Id: <338FFCBB.4970@nstate.net>
Hi.. I know this is simi-cgi.. not perl.. but.. sort of.. ok, here's the
deal.. I am somewhat lost here. it's a problem that no one can seem to
figure out. in form input type scripts. Either message boards, email
forms, guest books, and in chat forums. People can take the input areas
in HTML and change the name values of input $in{'whatever'} and even
though it's not in the script.. every $in later down will be affected..
for instance..
$name = $in{'name'};
$home_page = $in{'home_page'};
$pass_word = $in{'pass_word'};
then down through the script, you have say..
$city = $in{'city'};
$email = $in{'email'};
etc..etc..etc.. Well, it seems (expecially in chat forums, etc.) where
it shows the server domain and or IP address of the person
posting/sending the information.. it can somehow hide/mask these input
vars.. Then say in a chat.. they will have:
"UserName (@whatever.com) :Time here:"
"chat message here..."
Ok.. when someone takes the HTML input areas and alters the document on
their own system or otherwise for have multiple inputs.. (even if they
are the same values over and over.. they seem to manage to hide their
server address.. No one has seemed to figure out how to stop this. and
it seems like something simple. but like me.. in my chats for expample..
I have name, home page and password fields on the enter page.. then in
the script later, I have refresh rates, how namy old messages, time,
last red messages.. it goes on and on.. I have fixed the problem so no
one can screw around and hide their server.. but I would liek to be able
to plug up the other hole anyway.. many many perl scripts have this
problem.. I want to perhaps see if anyone out there knows a way to limit
the input fields, or make it so it will only read the ones you allow
them to.. or else print a sybroutine saying "attempted hack" or
something.. there are a few reasons why this is difficult, because of
all the areas of into the script has to read, and the user doesn't and
can't change for obvious reasons.. yet at the same time.. limit them..
Hmmm.. just a thought.. I wonder if anyone knows what to do.. Too bad
this isn't C.. I'd have it by now.. :O
well.. any idea would be welcome.. :)
Thanks..
Tim..
customdesign@nstate.net
------------------------------
Date: Sat, 31 May 1997 04:57:15 -0700
From: TRG Custom Graphics <customdesign@nstate.net>
Subject: Re: form input feilds problems
Message-Id: <3390121B.2FDB@nstate.net>
Ack... it's early in the morning here.. lots of mispelling.. I will be
more specific and make sense of this for people to read tomorrow.. My
keyboard is about dead anyway.. well.. sorry..
TRG Custom Graphics wrote:
>
> Hi.. I know this is simi-cgi.. not perl.. but.. sort of.. ok, here's the
> deal.. I am somewhat lost here. it's a problem that no one can seem to
> figure out. in form input type scripts. Either message boards, email
> forms, guest books, and in chat forums. People can take the input areas
> in HTML and change the name values of input $in{'whatever'} and even
> though it's not in the script.. every $in later down will be affected..
> for instance..
> $name = $in{'name'};
> $home_page = $in{'home_page'};
> $pass_word = $in{'pass_word'};
>
> then down through the script, you have say..
> $city = $in{'city'};
> $email = $in{'email'};
>
> etc..etc..etc.. Well, it seems (expecially in chat forums, etc.) where
> it shows the server domain and or IP address of the person
> posting/sending the information.. it can somehow hide/mask these input
> vars.. Then say in a chat.. they will have:
> "UserName (@whatever.com) :Time here:"
> "chat message here..."
>
> Ok.. when someone takes the HTML input areas and alters the document on
> their own system or otherwise for have multiple inputs.. (even if they
> are the same values over and over.. they seem to manage to hide their
> server address.. No one has seemed to figure out how to stop this. and
> it seems like something simple. but like me.. in my chats for expample..
> I have name, home page and password fields on the enter page.. then in
> the script later, I have refresh rates, how namy old messages, time,
> last red messages.. it goes on and on.. I have fixed the problem so no
> one can screw around and hide their server.. but I would liek to be able
> to plug up the other hole anyway.. many many perl scripts have this
> problem.. I want to perhaps see if anyone out there knows a way to limit
> the input fields, or make it so it will only read the ones you allow
> them to.. or else print a sybroutine saying "attempted hack" or
> something.. there are a few reasons why this is difficult, because of
> all the areas of into the script has to read, and the user doesn't and
> can't change for obvious reasons.. yet at the same time.. limit them..
> Hmmm.. just a thought.. I wonder if anyone knows what to do.. Too bad
> this isn't C.. I'd have it by now.. :O
>
> well.. any idea would be welcome.. :)
>
> Thanks..
> Tim..
> customdesign@nstate.net
------------------------------
Date: 31 May 1997 10:34:28 GMT
From: pjohan@hal.sparta.lu.se (Johan Palmaeus)
Subject: Help wanted PERL5.001 -> PERL5.003
Message-Id: <5mourk$krr$1@news.lth.se>
Hi there!
I have a problem getting perl5.003 running my old perl5.001 scripts. The
problem is that the (cgi-)script are runned on a webserver as user and group
nobody and neded to have a s-bit on their groups permissions. The problem is
that in all my script i have to include a module, but when scripts are runned
the require statement generates an errormessage:
Can't locate cart_rutiner.cgi in @INC at /usr/www/www-nk2/cgi-bin/cart_write.cgi line 19.
I try to include a script in the same library and I've tried to change
PERL5LIB andr PERLLIB enviroment variables for nobody to include current
library .
One sollution that works is to include 'use lib .', but there's A LOT of small
scripts and I will have a @#%& job changing them all (I can set ENV-variables
in the webserver). Is there a sollution to my problem that only contains
changes i ENV-variables???
The webserver operating system is RedHat Linux 4.1 with kernel 2.0.27.
And perlversion is "version 5.003 with EMBED"
built under linux at Dec 4 1996 20:40:11
+ suidperl security patch
Webserver i Apache 1.1.3 (don't think that has something to do with it :-)
Anyone have a clue? Please mail the answear...
(I'm not reading this group regulary).
--
--------------------------------------------------------------------
Johan 'P-Johan' Palmaeus ----- URL: http://hal.sparta.lu.se/~pjohan/
Mail:pjohan@netch.se Tel:+46(0)46-182960(work) +46(0)46-392299(home)
Fax:+46(0)46-182965 ---- Addr:Tunavaegen 39C507 S-223 63 Lund SWEDEN
------------------------------
Date: 31 May 1997 13:46:16 GMT
From: "Walter Klomp" <walter@swiftech.com.sg>
Subject: How do I pass HTTP_REFERER parameter in LWP:UserAgent ?
Message-Id: <01bc6dc9$42a69a00$7bec2aca@walter.swiftech.com.sg>
Hi,
I am trying to auto-submit (POST) some information to a form on a server
which actually checks on the HTTP_REFERER parameter (which browsers usually
send). Is there any way I can submit this information in my request as well
?
Any answers are very welcome. Also please e-mail it directly to me as
sometimes my news-program doesn't work that well...
Thanks for your reply.
Regards
Walter
------------------------------
Date: Sat, 31 May 1997 14:59:56 GMT
From: ewharmby@sprynet.com (Eileen Wharmby)
Subject: Re: How to extract text enclosed by...
Message-Id: <338efdd0.67917556@news.sprynet.com>
In the same vein, how would I retrieve the first 60 characters? I want
to work through the string inserting a linefeed after every 60
characters.
"Fredrik Lindberg" <flg@vhojd.skovde.se> wrote:
>CHAN TANG Eric-Aubert <chantane@JSP.UMontreal.CA> wrote in article
><5mi09i$q9t@epervier.CC.UMontreal.CA>...
>>
>> How can I extract text enclosed by some strings.
>>
>
>You could use a regexp to extract the text.
>
>/BEGIN_PATTERN(.*?)END_PATTERN/;
>
>BEGIN_PATTERN and END_PATTERN are of course the text we want to
>surround the text. The text we want to catch are surrounded by parens
>and the regexp uses a nongreedy match. For more information about
>regexps check out the man page perlre
>
>Here is an example using this technique
>
>#!/usr/bin/perl -w
>#
>$text = 'This is a (sample ( text) string)_) for example.';
>
>if ($text =~ /\((.*?)_\)/) {
> print "Its <$1>\n";
>} else {
> print "Not Found\n";
>}
>
>__END__
>
>Hope this helps
>
>/Fredrik
------------------------------
Date: Sat, 31 May 1997 03:37:00 -0700
From: TRG Custom Graphics <customdesign@nstate.net>
Subject: Re: I'm having problems with my "here document" syntax
Message-Id: <338FFF4B.2DE@nstate.net>
Andrew M. Langmead wrote:
>
> Jean-Paul Cozzatti <jp@dkstat.com> writes:
>
> >I'm using the following code: copied from Gundavaram...CGI Programming
>
> >print <<End_Of_HTML
> >Content-type: text/html
> >..
> >..
> >..
>
> >End_Of_HTML
>
> >but I'm getting an error message that says:
> >Can't find string terminator "End_Of_HTML" anywhere before EOF at
> >filename...
>
> 1. Make sure that there is no space between "End_Of_HTML" and the
> newline.
>
> 2. Make sure that if you copied the file between different operating
> systems, you copied it in ASCII mode. (If a Unix perl interpreter sees
> "End_Of_HTML\r\n", it will see whitespace after the string
> End_Of_HTML)
> --
> Andrew Langmead
Hmmm.. ell, I've seen that problem before.. with other reasons.. if you
see this post, then please be more deatiled with the sub.. ok?. I better
go.. I just had a glass of water spill on my keybaord.. *figures*..
Tim...
customdesign@nstate.net
------------------------------
Date: Sat, 31 May 1997 10:18:23 -0500
From: burgdorf@awsd.com (Darryl C. Burgdorf)
Subject: Re: JavaScript BBS System
Message-Id: <burgdorf-3105971018230001@ppp18.nfinity.com>
> Visit http://www.ccs.net/bbs and check out the Future OF Internet
> Messaging ...
Sorry, but if your system represents the future, I'll stick with the present.
> A true, interactive BBS / Messaging system that combines
> the File Functionality of CGI, and the User Interface / Interaction and
> Dynamic nature of Javascript. It is easy to set-up, easy to use, and
> defines a new standard.
I first tried to visit your site with MSIE, and was faced with nothing but
an empty page. In order to use the system at all, I had to visit with
Netscape. (That really didn't surprise me, of course. The minute I read
your post and saw that you were bragging about using a proprietary
Netscape technology, I pretty much knew what to expect.)
I frankly found the interface rather awkward and the displays less than
helpful. (For example, your threaded message list includes *only* message
titles, and in some cases, not even those.) And the fact that Netscape
kept opening new windows was downright annoying.
I looked over your features list, and didn't see anything that isn't
already supported by many other BBS systems, including my own (Perl)
WebBBS. I did note the *absence* of many features which are supported by
other BBS systems. Just as one example, there doesn't seem to be any way
for a user to configure the manner and format in which the message index
is displayed.
I'm sure there are many users who will find your system to be exactly what
they're looking for. However, those who are looking for a truly flexible
system that *anyone* can access will have to look elsewhere.
-- Darryl
Darryl C. Burgdorf (burgdorf@awsd.com)
AWSD.com (Affordable Web Space Design): <http://awsd.com/>
WebScripts Archive (Free Perl CGI Scripts): <http://awsd.com/scripts/>
------------------------------
Date: Sat, 31 May 1997 03:09:49 -0500
From: atstarr@seebelow.com (Andrew Starr)
Subject: Re: Need vacation program in Perl!
Message-Id: <atstarr-3105970309500001@max01-21.qni.com>
> > On Fri, 30 May 1997, Mongkol Horburapa wrote:
> >
> > > Anyone can provide me with vacation program in Perl?
See http://www.amherst.edu/~atstarr/computers/vacation.html -- it has
copies of a couple of different versions in Perl, neither of which were
written by me.
Good luck!
-Andrew
--
Andrew Starr atstarr (punctuation) amherst (punctuation) edu
http://www.amherst.edu/~atstarr/eudora has my unoff. Eudora Site
http://www.amherst.edu/~atstarr/eudora/faq.html by Hank Zimmerman
I have no connection to Qualcomm other than being a happy customer!
If this post/email is answering a help request, please try to post
followup questions, esp. new questions, to the newsgroup. Thanks.
------------------------------
Date: Sat, 31 May 1997 12:59:54 GMT
From: "Lee VanHee" <eagleye@eskimo.com>
Subject: Netscape Server/NT use statement error
Message-Id: <01bc6dc2$ed96d760$010200c0@eagleye.eskimo.com>
I have a Perl progam that runs from the command line but barfs 'Server
Error' when run from a Netscape Server on an NT system. I cut the program
down to a few lines of script so it just prints a line. When I include "use
CGI;" or "use carp;" it produces Server Error. When I comment-out the
statement, it runs. I don't have any actual statements using CGI.pm or
carp.pm in my tiny program.
Any help would be appriciated. (I suspect a conflict with the word "use")
Lee VanHee
Edmonds, WA
http://www.deepharbor.com/cmf/
------------------------------
Date: Sat, 31 May 1997 02:55:38 -0700
From: TRG Custom Graphics <customdesign@nstate.net>
Subject: Re: Open and print HTML file insside CGI script
Message-Id: <338FF59A.459D@nstate.net>
Miran Sepic wrote:
>
> I have a following problem:
>
> From inside Perl script I try to open a HTML file, and print it back.
> This part of script looks like that:
>
> $login_page = "/user/download.html";
> open (FILE, "$login_page");
> @filein = <FILE>;
> print "Content-type: text/html\n\n";
> print @filein;
>
> The response is:
>
> Internet explorer cannot open the Internet site .....
> The operation completed successfully.
>
> When I put HTML directly inside script, everything is OK.
Well, I suppose I can better elaborate on this, not that my keyboard is
fixed and I can _actually_ type! One quick way, is to look at the file
or directory that you're supposed to be writing to.. if it hasn't
changed, then it's not working anyway.. and then, of course, you will
get your nice little error message.. which in Netscape would say
"Document Contains NO Data".. either nothing is there, or you don't have
the right path, or possibly the permissions need to be changed. I am
just assuming here.. I have *no* idea what you're trying to do other
then what you've said. I could use a little more info about it.. it's
pretty vague to say much more.. *other then what others have posted in
reply to you alrready anyway...*..
L8rz..
------------------------------
Date: Sat, 31 May 1997 01:22:23 -0700
From: tluxon@phoenix.calpoly.edu (Tai Luxon)
Subject: Password verification/File Access Priveleges
Message-Id: <tluxon-ya02408000R3105970122230001@news.calpoly.edu>
I am trying to set up a script that will allow a web surfer to enter a name
and a password into a form and if it is a valid identity the form will kick
out information to them from a file. How can I store info on the server
(both the info I want to kick out and the password file) so that my script
can access it, but web surfers cannot? Thanks. - Tai
--
Tai Luxon
tluxon@phoenix.calpoly.edu
------------------------------
Date: 31 May 97 04:38:06
From: christopher.greenup@nashville.com (Christopher Greenup)
Subject: printf padding ...
Message-Id: <000035250000332C@nashville.com>
The Camel Book mentions that printf "typically" pads strings too short for
the format with the necessary number of spaces. Sooo ... how does one pad
with something besides spaces (or zeros)?
PoundBangSlashYou,
Christopher Greenup
chrisg@gibson.gibson.com
Gibson Guitar Corporation
www.gibson.com
------------------------------
Date: Sat, 31 May 1997 07:39:07 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: printf padding ...
Message-Id: <b56pm5.is.ln@localhost>
Christopher Greenup (christopher.greenup@nashville.com) wrote:
: The Camel Book mentions that printf "typically" pads strings too short for
: the format with the necessary number of spaces. Sooo ... how does one pad
: with something besides spaces (or zeros)?
I don't know how to pad w/something else directly, but you can just
pad w/zeros, and then replace 'em ;-)
--------------------------
#! /usr/bin/perl -w
$num = sprintf("%010.5f", 3.14159); # pad w/ leading zeros
$num =~ s/^(0+)/'.' x length($1)/e; # change leading zeros to period (dot)
print "num = $num\n";
--------------------------
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: Sat, 31 May 1997 12:54:06 GMT
From: melo@co.telenet.pt (Pedro Melo)
Subject: Problems in Sys::Syslog or Sys::Hostname in Solaris
Message-Id: <33991005.63230791@news.telenet.pt>
Hi!
I'm using perl5.003 and it appears that Sys::Hostname does not work with
it. It uses a syscall.ph (which I generated by hand with h2ph) but the
syscall they want (gethostname) does not appear in sys/syscall.h
Tis makes "method 2" fail. The other ones dont pass the -T switch which is
present in all my scripts...
Is there a known workaround for this one?
Is this solved in perl5.004?
Thanks!
Melo
--
************** Pedro Melo (melo@co.telenet.pt) BOFH ******************
* TELENET, Servicos de Telecomunicacoes, SA - Tel +351 1 3139190 *
* finger melo@co.telenet.pt or search key servers for PGP key *
* It's management's job to support the geniuses, *
* not to tell them what to do *
**********************************************************************
------------------------------
Date: 30 May 1997 17:16:00 GMT
From: stampes@xilinx.com (Jeff Stampes)
Subject: Regex lookahead help
Message-Id: <5mn20g$mcq$1@neocad.com>
Okay...I thought I had the hang of most of the Regex stuff, but I'm
stumped on this one.
I have a hash set up that defines a certain regular expression for
each entry. This is a filter mechanism that is supposed to work
along the lines of "If you're looking in the foo directory on the
bar CD, find me the files that match /$regex/". When I go into the
actual comparison loop, I am plugging the regex into a positive
match.
so here's the problem. I have some strings that are in the form
'data/foo/bar/not.this' I want to NOT match these strings.
However, the regex needs to be plugged into a positive assertion
match. There could be anywhere from 3-6 levels before the
'not.this'.
I was hoping to use a negative lookahead, but can't seem to find
something that works. For example:
m{(.+/)+(?!not.this)}
this may work, but it also results in a non-match for
'data/foo/bar/this'.
I hope I've gotten the problem across here, it's hard to describe.
If you have any clues, please share.
Thanks,
Jeff
--
Jeff Stampes -- Xilinx, Inc. -- Boulder, CO -- jeff.stampes@xilinx.com
------------------------------
Date: Fri, 30 May 1997 14:03:50 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Socket reading
Message-Id: <EAzz2E.EGD@world.std.com>
naked@paivola.sci.fi (Nuutti Kotivuori) writes:
>Ok... I have this problem. I have a socket that I want to read line by
>line... just one line at a time, but I can't just use <FILEHANDLE> because
>I need to get back to my program every second on the second.
If you use sysread() instead of the <> operator, you could use the
four argument version of select() to check for data available to be
read on the filehandle with a one second timeout.
See the select entry in the perlfunc man page for details.
Otherwise, you could use alarm() with an alarm signal handler.
--
Andrew Langmead
------------------------------
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 548
*************************************