[11473] in Perl-Users-Digest
Perl-Users Digest, Issue: 5073 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Mar 6 09:53:50 1999
Date: Sat, 6 Mar 99 06:00:19 -0800
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, 6 Mar 1999 Volume: 8 Number: 5073
Today's topics:
Calling Perl from Java <phil148@ibm.net>
Re: can I make this code better? <gellyfish@btinternet.com>
Re: cobol line seq. file - one very long line - <gellyfish@btinternet.com>
FAQ 2.1: What machines support Perl? Where do I get it <perlfaq-suggestions@perl.com>
Re: gcc, perl, and IRIX 6.5 mb@bolten.de
Re: HELP: Is there a way of flushing the print buffer? <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: HELP: Is there a way of flushing the print buffer? <gellyfish@btinternet.com>
how do i format a forwarded letter <poohba@io.com>
Re: How to generate random alpha-numeric characters <gellyfish@btinternet.com>
Re: How to run Perl program as NT service? <--- perl.ex <gellyfish@btinternet.com>
Re: Is there a way to find out if someone is using prox <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: LWP question <gellyfish@btinternet.com>
Re: LWP <gellyfish@btinternet.com>
Re: Mail : Multi recipient question <gellyfish@btinternet.com>
Nonscalar Array Access? <perlguy@technologist.com>
Perl & OS/2: problems with makefile.pl & makemaker (Erik Huelsmann)
Re: perl targeted url redirection. <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: perl targeted url redirection. <gellyfish@btinternet.com>
Re: PERL vs JavaScript <gellyfish@btinternet.com>
Re: stable is ...? (was Re: COnverting comma separate <gellyfish@btinternet.com>
Your opinion on an HTML stripper regex <arbustus@jps.net>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 6 Mar 1999 13:32:05 GMT
From: "Phillips" <phil148@ibm.net>
Subject: Calling Perl from Java
Message-Id: <01be67d5$f3fd20a0$ebaa6420@default>
Has anyone called Perl programs from a Java application on a Win95
platform? I have called Windows' programs before, but I run into problems
since Perl is run from the DOS prompt.
Here is the sample code I am trying:
try {
Runtime.getRuntime().exec("C:\\windows\\Notepad.exe");
}
catch(Exception ioe){}
try {
Runtime.getRuntime().exec("perl C:\\scripts\\sar.pl");
}
catch(Exception ioe){}
I have also tried:
Runtime.getRuntime().exec("c:\\command /c perl C:\\scripts\\sar.pl");
Runtime.getRuntime().exec("c:\\bin\\perl\\bin\\perl.exe
C:\\scripts\\sar.pl");
note: type "command /?" at the DOS prompt to see available options.
Thanks,
Cory
cory-p@usa.net
------------------------------
Date: 6 Mar 1999 11:37:30 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: can I make this code better?
Message-Id: <7br41q$cp$1@gellyfish.btinternet.com>
On Thu, 04 Mar 1999 18:52:55 GMT Alan Young wrote:
>
> On Wed, 3 Mar 1999 20:11:35 -0800, lr@hpl.hp.com (Larry Rosler) wrote:
>
>>>
>>> (split /\|/) will split $_ into an anonymous array @() (Is that the
>>> same as @_ ?)
>>
>>No.
>
> I'm assuming you mean "No, it's not the same" as opposed to "No,
> you're completely wrong here."
>
He means its not the same the thing - if you were trying to split to
@_ you would have got:
Use of implicit split to @_ is deprecated
(D) It makes a lot of work for the compiler when you
clobber a subroutine's argument list, so it's better
if you assign the results of a split() explicitly to
an array (or list).
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 6 Mar 1999 13:05:35 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: cobol line seq. file - one very long line -
Message-Id: <7br96v$r6$1@gellyfish.btinternet.com>
On Fri, 05 Mar 1999 20:11:58 GMT Dale Phillips wrote:
> I have a cobol line sequential file that I need
> to parse up into record length of 57 each....
>
> This has got to be brain dead easy but I
> can not seem to find anything that
> counts x chars from slurped file and add \r start counter over ....
>
Assuming you have slurped your entire file into $string :
while($string =~ /(.{57}/g )
{
print $1,"\n";
}
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 6 Mar 1999 05:11:25 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 2.1: What machines support Perl? Where do I get it?
Message-Id: <36e11b6d@csnews>
(This excerpt from perlfaq2 - Obtaining and Learning about Perl
($Revision: 1.30 $, $Date: 1998/12/29 19:43:32 $)
part of the standard set of documentation included with every
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq2.html
if your negligent system adminstrator has been remiss in his duties.)
What machines support Perl? Where do I get it?
The standard release of Perl (the one maintained by the perl
development team) is distributed only in source code form. You
can find this at http://www.perl.com/CPAN/src/latest.tar.gz ,
which in standard Internet format (a gzipped archive in POSIX tar
format).
Perl builds and runs on a bewildering number of platforms.
Virtually all known and current Unix derivatives are supported
(Perl's native platform), as are proprietary systems like VMS,
DOS, OS/2, Windows, QNX, BeOS, and the Amiga. There are also the
beginnings of support for MPE/iX.
Binary distributions for some proprietary platforms, including
Apple systems, can be found http://www.perl.com/CPAN/ports/
directory. Because these are not part of the standard
distribution, they may and in fact do differ from the base Perl
port in a variety of ways. You'll have to check their respective
release notes to see just what the differences are. These
differences can be either positive (e.g. extensions for the
features of the particular platform that are not supported in the
source release of perl) or negative (e.g. might be based upon a
less current source release of perl).
--
"'Tis not too late to seek a newer world."
--Alfred, Lord Tennyson
------------------------------
Date: Sat, 06 Mar 1999 12:48:17 GMT
From: mb@bolten.de
Subject: Re: gcc, perl, and IRIX 6.5
Message-Id: <7br86g$p0s$1@nnrp1.dejanews.com>
hi!
In article <36DF0F91.F384BCCE@ldr.com>,
Richard Robinson <richardr@ldr.com> wrote:
> I'm running into compiler problems on a new IRIX 6.5 installation.
>
> Background: First I wanted to compile mysql. But that kept giving me
> errors. So I thought I'd skip it for now, and go on. Then I installed
> Apache 1.3.4, with no problems (Apache 1.3.3 was installed, but I didn't
> have its source, and wanted to install mod_perl, etc). I went to install
> mod_perl, but this required that PERL be compiled with same compiler as
> Apache -- my Perl was compiled with cc, and Apache was compiled with
> gcc. So I got perl500502 and began to configure.
Hm, apache and mysql both compile fine on my machine (Indy R4.4K running IRIX
6.2 with IRIX Development Foundation, IRIX Development libraries and the gcc
2.8.1 supplied by Ariel Faigon, the perl problem is easy to solve - I assume
you are using the same gcc as I use...
> My configure of perl gave me following warnings in many diff places:
>
> Checking for GNU C Library:
> ld32: Warning 84: /usr/lib32/libdb.so is not used for
> resolving any symbol.
> ld32: Warning 84: /usr/lib32/libm.so is not used for resolving
> any symbol.
This is not fatal. It is OK, to see these warnings...
> Configure went through to the end. But when I tried to make, make gave
> me an error (many errors of same time but diff line number, till it make
> gave up):
>
> Use of unitialized value at config.pm line ...
> config.pm: tmp not valid at config.pm line 403
> *** Error Code 2 (bu21)
>
Search http://www.dejanews.com for "IRIX" and "config.pm", this should lead
you to a patch for the gcc, which solves this problem.
> Any suggestions are welcome as to how I might begin to solve this
> issue(s)
Hope that helps
mb
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 06 Mar 1999 12:49:42 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: HELP: Is there a way of flushing the print buffer?
Message-Id: <83emn2suqx.fsf@vcpc.univie.ac.at>
Re: HELP: Is there a way of flushing the print
buffer?, Sanjay <joshi@dropzone.tamu.edu> said:
Sanjay> screen, while the program is calculating
Sanjay> once every 'x' times the program
Sanjay> loops. Periods are printed only if there is
Sanjay> a newline character "\n". I want all the
Sanjay> periods to be printed in the same line. Hos
Sanjay> is this done?
perldoc perlvar ==> "$|"
perldoc IO::Handle ==> autoflush
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: 6 Mar 1999 12:09:18 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: HELP: Is there a way of flushing the print buffer?
Message-Id: <7br5te$ga$1@gellyfish.btinternet.com>
On Sat, 6 Mar 1999 02:10:44 -0600 Sanjay Joshi wrote:
> Hi,
> In my Perl 5 program, I have several print statements to print
> text to screen. My program parses through a lot of text data and so its
> possible that the user might feel that the program has crashed as there is
> no output to the screen during this time. I propose to output periods
> (".") to the screen, while the program is calculating once every 'x' times
> the program loops. Periods are printed only if there is a newline
> character "\n". I want all the periods to be printed in the same line. Hos
> is this done?
>
You need to set autoflush either by using the $| variable
(AKA $OUPUT_AUTOFLUSH) or you could use the methods provided by the
IO::File module.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 6 Mar 1999 08:59:23 -0500
From: Poohba <poohba@io.com>
Subject: how do i format a forwarded letter
Message-Id: <Pine.BSF.4.05.9903060817010.9317-100000@schultz-2.io.com>
you know how when a letter is forwarded it has '>' at the begining of each
line. I want to take it out. How can i do that? I currently tried:
#!/usr/local/perl -w
$file = 'fix-letter';
open (FILE, "+<$file") || die "Can't open $file: \n";
while(<FILE>) {
$letter =~ s/>//g;
print FILE "$letter\n";
}
close(FILE);
this does not work thoug. any suggestions?
* Web Page Designs *
/ poohba@io.com | www.io.com/~poohba\
---------------------------------------
\ For info about me send message with /
* subject "send file help" *
------------------------------
Date: 6 Mar 1999 12:03:07 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: How to generate random alpha-numeric characters
Message-Id: <7br5hr$es$1@gellyfish.btinternet.com>
On Fri, 05 Mar 1999 17:33:31 -0800 Dale Sutcliffe wrote:
> How would I generate a string of 8 randomly chosen alpha-numeric
> characters?
>
Just for fun of course and almost certainly not very platform portable
you could try this *very* random approach if you are on a system that
has /dev/urandom:
#!/usr/bin/perl
open(RANDOM,"/dev/urandom") || die "No random device - $!\n";
while(read(RANDOM,$_,1))
{
if (/\w/)
{
$randstring .= $_;
}
last if (length($randstring) == 8 );
}
close RANDOM;
print $randstring;
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 6 Mar 1999 11:28:36 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: How to run Perl program as NT service? <--- perl.exe persistance
Message-Id: <7br3h4$bb$1@gellyfish.btinternet.com>
<comp.lang.perl is a former newsgroup>
In comp.lang.perl.misc thomas <rawkrawl@rednecks.com> wrote:
> Hiya,
>
> Alongside this thread,a thought just struck me;
> wouldnt it be a performance boost having the perl interpreter
> loaded as a service.
> Having it already loaded, straying the memory,should make the script
> shoot faster,right. I mean,you dont have to load perl.exe and all its'
> autoload stuff
> every time you run your tiny 5000 bytes script.
>
> ...kinda like the Apache >>> mod_perl companionship...
>
> Would this be an approach in words of performance ???
>
I'm not sure that it would have any gains in performance (although
intuitively it should) however I think the enterprise would not be one
that would be encouraged - it would necessitate as far as I can see some
rather large changes to the Perl core for that platform and would require
some new inovation for the actual running of scripts - sure you could have
a stub like perlis.dll but works because there is another service handing
the scripts to it to run.
That said I'm sure we'd be interested in seeing the patches when you've
done them :)
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 06 Mar 1999 12:48:06 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Is there a way to find out if someone is using proxy server? thank you.
Message-Id: <83g17isutl.fsf@vcpc.univie.ac.at>
Re: Is there a way to find out if someone is using
proxy server? thank you., Chaku <chaokuo@iname.com>
said:
Chaku> Hi! I am writing a chatroom cgi script and
Chaku> would like to block out some proxy users who
Chaku> try to screw up my chatroom. How do i do
Chaku> that?
and the relevance to perl is? what?
--
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: 6 Mar 1999 12:19:12 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: LWP question
Message-Id: <7br6g0$h9$1@gellyfish.btinternet.com>
On Wed, 03 Mar 1999 20:01:10 -0500 lei he wrote:
> I tried to run the following code:
>
> use LWP::Simple;
> $content = get('http://www.engrlib.uc.edu/');
>
> but I got some compilation error:
>
> Socket object version 1.7 does not match bootstrap parameter 1.5 at
> /usr/local/lib/perl5/5.00502/sun4-solaris/DynaLoader.pm line 187.
> BEGIN failed--compilation aborted at
> /usr/local/lib/perl5/5.00502/sun4-solaris/IO/Socket.pm line 118.
>
> Could anyone help me? I have been stucked on this problem for a while.
> Thanks a lot.
>
I'm afraid that you will almost certainly have to download and reinstall
your IO::Socket module - although this does seem strange as this module
I thought was part of the distribution - well it is there but is just not
right. I have seen and fixed this before but cannot remember what caused
it but only remember needing to reinstall various modules.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 6 Mar 1999 12:31:57 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: LWP
Message-Id: <7br77t$in$1@gellyfish.btinternet.com>
On Fri, 05 Mar 1999 18:51:00 GMT jamessoutter@my-dejanews.com wrote:
>
>
> I am looking for code to show how to use LWP to make a
> simple_request for a web page and then have the content of
> the web page passed to a subroutine.
>
> The perdoc on LWP::UserAgent says that simple_request takes
> a second argument which may be a reference to subroutine but
> I can't get this to work.
>
This works for me fine and is almost straight out of the LWP::UserAgent
manpage:
#!/usr/bin/perl
require LWP::UserAgent;
my $ua = new LWP::UserAgent;
my $request = new HTTP::Request('GET', 'http://localhost/');
my $response = $ua->request($request, \&callback, 4096);
sub callback
{
my ($data, $response, $protocol) = @_;
print $data,"\n";
}
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 6 Mar 1999 11:45:26 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Mail : Multi recipient question
Message-Id: <7br4gm$d9$1@gellyfish.btinternet.com>
On Thu, 04 Mar 1999 11:31:50 +0100 Marc Nicole wrote:
> Hi,
>
> I have to send emails to multiple recipients.
>
> my question is the folowing :
>
> does someone know the limits of methods 1 and 2 ?
>
> 1) using 'Bcc:' (or 'Cc:')
>
> open(MAIL,"|/usr/lib/sendmail -t");
> ...
> foreach $recipient (@recipient) { print MAIL "Bcc: $recipient\n"; }
> ...
> close (MAIL);
>
> 2) using only 'To:'
>
> foreach $recipient (@recipient)
> {
> open(MAIL,"|/usr/lib/sendmail -t");
> ...
> print MAIL "To: $recipient\n"; }
> ...
> close (MAIL);
> }
>
Despite the fact that you are using Perl to do this this is really a
question regarding the MTA rather than Perl. I would recommend looking
at the documentation for sendmail:
-t Read message for recipients. To:, Cc:, and Bcc: lines will
be scanned for recipient addresses. The Bcc: line will be
deleted before transmission. Any addresses in the argument
list will be suppressed, that is, they will not receive
copies even if listed in the message header.
The important thing here is what it says about the Bcc: line. At best it
is annoying to receive a messasge with a massive recipient list which
might be larger than the body of the message and at worst it has been know
to break some flakier MUAs.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 06 Mar 1999 06:11:56 -0600
From: Brent Michalski <perlguy@technologist.com>
Subject: Nonscalar Array Access?
Message-Id: <36E11B8C.25D5C728@technologist.com>
I was just playing around with arrays (fun huh?) and I decided to try to
access the array elements WITHOUT using scalar context, like so:
print @array_name[2];
This *seemed* to work the exact same as:
print $array_name[2];
I was just wondering if this _always_ works or not? Also, WHY does this
work.
Everything I've read and been told about Perl has said that I need to
access the elements in scalar context. (My world is falling apart ;-)
Anyone out there have info/comments on this?
Thanks,
Brent
--
Java? I've heard of it, it is what I drink while hacking Perl! -me
America, the place where nearly 1/2 of the lawmakers think the
President is guilty of crimes, and he considers it a victory.
Hmmm. Something is seriously wrong here...
+----------------------------------------+
| Brent Michalski |
| -- Perl Evangelist -- |
| E-Mail: perlguy@technologist.com |
| Resume: http://www.inlink.com/~perlguy |
+----------------------------------------+
------------------------------
Date: 6 Mar 1999 11:31:49 GMT
From: erikh@nospam.com (Erik Huelsmann)
Subject: Perl & OS/2: problems with makefile.pl & makemaker
Message-Id: <wzgSQd1pdrdd-pn2-y5DWzr7I9L99@localhost>
Before, I had perl 5.004_?? for OS/2 (I think). When trying to run
Makefile.pl (for any package), it crashed on me. So, after a while, I
decided to see if there is a newer version of it somewhere. I found
perl 5.005_53 for OS/2 through CPAN.
Now when I run makefile.pl (for any package) it still crashes.
Do others have these problems too, or am I alone in this? What version
of perl should I use to prevent these problems from happening?
bye, Erik
--
ICQ# 23883733 | Want to link your Psion to OS/2? Check out
http://www.oprit.rug.nl/hulsmann/PSI.html
Using Sibyl for OS/2 RAD development (http://www.ndrh.de/~speed/)
[Don't mail posts, I will see them here just fine]
------------------------------
Date: 06 Mar 1999 12:45:47 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: perl targeted url redirection.
Message-Id: <83hfrysuxg.fsf@vcpc.univie.ac.at>
Re: perl targeted url redirection., Thomas
<tlehrer@spectrumdynamic.com> said:
Thomas> I'm trying to write a redirector that will
Thomas> update a frame, other than the frame that
Thomas> originally called the script. The
This is an HTML/HTTP question then. It's not bound
to the implementation language in any way.
Try a group to do with HTML/HTTP/your-server.
Thomas> redirection works but the targeted frame is
Thomas> not being updated. The frame that calls the
perl will output whatever you tell it to .
Thomas> # Get the input read(STDIN, $buffer,
Thomas> $ENV{'CONTENT_LENGTH'});
AAIIIEEE!! Don't do this, use CGI.pm instead!
(and incidentally if you read the documentation for
this *ever so useful and indispensible* module
you'll find the answer to your question!).
Thomas> 'http://intranet/samptee/website/states';
Thomas> for ($FORM{State}) { $page = /AZ/ &&
Thomas> 'arizona.htm' || /WA/ && 'washington.htm' ||
... oh great, you could have snipped this a bit...
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: 6 Mar 1999 11:54:33 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: perl targeted url redirection.
Message-Id: <7br51p$dk$1@gellyfish.btinternet.com>
On Fri, 5 Mar 1999 17:57:34 -0700 Thomas Lehrer wrote:
> I'm trying to write a redirector that will update a frame, other than the
> frame that originally called the script. The redirection works but the
> targeted frame is not being updated. The frame that calls the script is the
> only one that is updated. Can anyone help.. Below is my script. This is
> written for Active State's Active perl for win32 build 509. Any help would
> be greatly appreciated.
>
>
> # Get the input
> read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
>
Ah. I would suggest that you should use the module CGI.pm rather than
reinventing the wheel like this - possibly incorrectly. You would also
find if using CGI.pm that there is a section in the documentation entitled:
WORKING WITH NETSCAPE FRAMES
It's possible for CGI.pm scripts to write into several
browser panels and windows using Netscape's frame
mechanism. There are three techniques for defining new
frames programmatically:
I figure that beyond that advice its not really a Perl question - the
Netscape developers site has information on working with frames.
Also I think we would have got the point from just a small snippet from
your lookup table.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 6 Mar 1999 11:15:29 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: PERL vs JavaScript
Message-Id: <7br2oh$b6$1@gellyfish.btinternet.com>
On Thu, 04 Mar 1999 11:02:09 -0500 Clifton C. Gregory wrote:
> Can you tell me how to determine in the CGI script that JavaScript is not
> enabled? I have several scripts that can build frame or non-frame versions of
> a page and I want to use the non-frame versions if JavaScript is not enabled.
> %ENV doesn't seem to tell me anything about JavaScript, at least for Netscape 3
If %ENV (ie the headers passed on by server) dont contain the relevant
information then your're stuffed basically.
As far as I know there is know way to do this within a CGI on its own -
you will almost certainly have to resort to some client side trickery
and that sort of stuff is note in the realm of this group I'm afraid :
comp.lang.javascript
comp.infosystems.www.authoring.html
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 6 Mar 1999 11:04:38 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: stable is ...? (was Re: COnverting comma separate values)
Message-Id: <7br246$av$1@gellyfish.btinternet.com>
On Sat, 6 Mar 1999 04:31:18 -0500 Ronald J Kimball wrote:
> Alan Barclay <gorilla@elaine.drink.com> wrote:
>
>> 5.004_04 doesn't have that message, and that's the one you get if you
>> download the stable.tar.gz from CPAN, so I'd consider that a current
>> release, not old at all.
>
> And yet there's a file in the src/5.0 directory entitled
> 'stable_is_5.005_02'. Apparently someone forgot to update the
> stable.tar.gz link. (stable.zip is correct, though.)
>
And that only some CPAN mirror - I am sure that the one at:
<http://sunsite.doc.ic.ac.uk/packages/CPAN/src>
(Wouldnt it be nice to turn that 'sunsite' to some single syllable word
like 'grok' or 'puck' :)
The stable.tar.gz and latest.tar.gz are both 5.005.02 - so either the
CPAN mirror that Alan is using is out of date or something has gone wrong
with their mirroring program - but I seem to recall that the stable.tar.gz
wasnt even introduced until 5.005 so out of date cant be it ...
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 06 Mar 1999 04:08:13 -0800
From: "James F. Pine" <arbustus@jps.net>
Subject: Your opinion on an HTML stripper regex
Message-Id: <36E11AAD.E75AB528@jps.net>
Hi, I am working on a regular expression that reads in a string that
contains HTML formatting, and strips all the HTML tags except opening
and closing bold, italic, underline, and paragraph tags. Eventually I
want to add the font tag to the list, but for now, I have this:
----- Start Script-----
#!c:\perl\bin
$ex1 = "Here is some <b>bold</b> text";
$ex2 = "Here is a <a href=\"http://www.yahoo.com/\">hyperlink</a>";
$ex3 = "Here is some <i>italic</i> text";
$ex4 = "<i><b><u><p></i></b></u></p></pre>";
$ex5 = "This is a <b>bold<img src=\"/test/img.jpg\" border=\"0\">
image</b>, yeah right";
$ex1 =~ s/<\/?([a-z]?[acdeghjklmnoqrstvwxyz ])[^>]*>//ig;
$ex2 =~ s/<\/?([a-z]?[acdeghjklmnoqrstvwxyz ])[^>]*>//ig;
$ex3 =~ s/<\/?([a-z]?[acdeghjklmnoqrstvwxyz ])[^>]*>//ig;
$ex4 =~ s/<\/?([a-z]?[acdeghjklmnoqrstvwxyz ])[^>]*>//ig;
$ex5 =~ s/<\/?([a-z]?[acdeghjklmnoqrstvwxyz ])[^>]*>//ig;
print "\$ex1:Here is some <b>bold</b> text = $ex1\n";
print "\$ex2:Here is a <a href=\"http://www.yahoo.com/\">hyperlink</a> =
$ex2\n";
print "\$ex3:Here is some <i>italic</i> text = $ex3\n";
print "\$ex4:<i><b><u><p></i></b></u></p></pre> = $ex4\n";
print "\$ex5:This is a <b>bold<img src=\"/test/img.jpg\" border=\"0\">
image</b>, yeah right = $ex5\n";
----- End Script-----
Here's my output:
C:\>perl regextest.pl
$ex1:Here is some <b>bold</b> text = Here is some <b>bold</b> text
$ex2:Here is a <a href="http://www.yahoo.com/">hyperlink</a> = Here is a
hyperlink
$ex3:Here is some <i>italic</i> text = Here is some <i>italic</i> text
$ex4:<i><b><u><p></i></b></u></p></pre> = <i><b><u><p></i></b></u></p>
$ex5:This is a <b>bold<img src="/test/img.jpg" border="0"> image</b>,
yeah right = This is a <b>bold image</b>, yeah right
Does anyone have any ideas for optimization and/or including the font
tag? Thanx
JAMES
------------------------------
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 5073
**************************************