[11082] in Perl-Users-Digest
Perl-Users Digest, Issue: 4682 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 18 17:05:01 1999
Date: Mon, 18 Jan 99 14:00:21 -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 Mon, 18 Jan 1999 Volume: 8 Number: 4682
Today's topics:
Re: A plea for less goofy signature files! (Brian Greenfield)
ActivePerl, ASP, sprintf and percent signs (Steve Grantz)
Re: Find DOS backslashes <ion@aroma.com>
Re: Fork me! need children (Charles DeRykus)
Re: glob error <ludlow@us.ibm.com>
Re: glob error <spam.me@idea.co.uk>
Help: Advanced Search and Replace Question <harty@gte.com>
Re: HELP: Netscape 4.5 doesn't like text/html header fr <jeromeo@atrieva.com>
Re: HELP: Netscape 4.5 doesn't like text/html header fr <spam.me@idea.co.uk>
Re: JPL install difficulties glo83@my-dejanews.com
New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
Re: passing regexp modifiers in a scalar (Ilya Zakharevich)
Perl 5.005_54 fails make test at io/fs.t #18 under BSD/ <i1@i-1.net>
Re: Perl Criticism (I R A Aggie)
Re: Perl for Win32 Newbie chortik@my-dejanews.com
Re: Perl Web browser problem (Tad McClellan)
Re: Perl Web browser problem jmauney@my-dejanews.com
Re: Perl Web browser problem <ijp@thornlea.force9.co.uk>
Re: Printing word betrween to patterns - Sorry New (Larry Rosler)
Re: Printing word betrween to patterns - Sorry New <ion@aroma.com>
Re: splitting file using eof question <ludlow@us.ibm.com>
Re: splitting file using eof question (Tad McClellan)
Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 18 Jan 1999 20:02:24 GMT
From: not-for-replies@dtseven.demon.co.uk (Brian Greenfield)
Subject: Re: A plea for less goofy signature files!
Message-Id: <916689742.4041.0.nnrp-08.9e98f345@news.demon.co.uk>
On Sat, 16 Jan 1999 19:38:47 GMT, snowhare@devilbunnies.org (Snowhare)
wrote:
>my $name=join('',reverse(split(//,'Benjamin "Snowhare" Franz')));
>$_='024e046b794c446f25423a6375477d6c14450a39447a07637e';
>s/(..)/push(@ARGV,hex($1))/eg;while($_=chop $name){
>$_=ord^shift;$_+=$a;$_%=108;print chr(($a=$_)+10)}
You Must Try Harder. I can follow that one:)
--
You're reading this in a newsgroup because that's where I posted it.
That's where I'd like to read your reply too. DON'T MAIL AND POST!
But, if you really want to reply by email, my reply-to *IS* valid ;)
------------------------------
Date: Mon, 18 Jan 1999 21:52:16 GMT
From: sgrantz@visi.com (Steve Grantz)
Subject: ActivePerl, ASP, sprintf and percent signs
Message-Id: <k2Oo2.5789$TO5.189589@ptah.visi.com>
I seem to be experiencing problems with sprintf within .asp objects
using PerlScript.
For instance,
<%
$foo = 867.5309
$bar = sprintf("%.3f", $foo);
%>
<%= $foo %><br>
<%= $bar %><br>
Does not work at all. Whereas, thinking that the % might need escaping,
I tried
<%
$foo = 867.5309
$bar = sprintf("%%.3f", $foo);
%>
<%= $foo %><br>
<%= $bar %><br>
This functions, but the output is what you might expect
867.5309
%.3f
And this variant
<%
$foo = 867.5309
$bar = sprintf(qw/%.3f/, $foo);
%>
<%= $foo %><br>
<%= $bar %><br>
Works but gives
867.5309
1
By using <script> tags instead,
<script language="PerlScript">
$foo = 867.5309
$bar = sprintf("%.3f), $foo;
</script>
<%= $foo %><br>
<%= $bar %><br>
Causes no error, but the variables seem to lose thei rvalue (scoping
issue with the change in parsing style?)
Does anyone know what's going on? Does Active Perl have problems parsing
the % sign within the <% %> brackets?
--
More of Steve Grantz's Blather at 2 * McQ != McQ
http://www.visi.com/~sgrantz 0.5 * McQ == McQ
------------------------------
Date: Mon, 18 Jan 1999 11:04:18 -0800
From: "Ion Chalmers Freeman" <ion@aroma.com>
Subject: Re: Find DOS backslashes
Message-Id: <36a381cc.0@news.prostar.com>
Tom,
What pattern are you trying to split on? Remember that you have to
double the backslash:
**
$a = "c:\\dingle\\jingle\\bingle";
@s =split(/\\/,$a);
for $s(@s){
print $s, "\n";
}
**
ion
**
Thomas Bond wrote in message <36A3781F.657FA7F0@ei.kodak.com>...
Any idea how I can us the function split() with the correct pattern(i.e.
the DOS backslash) to split on.
------------------------------
Date: Mon, 18 Jan 1999 21:03:56 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: Fork me! need children
Message-Id: <F5rx6K.CML@news.boeing.com>
In article <369F3C90.F41D33AD@link-maker.com>,
jim <webmaster@link-maker.com> wrote:
> hehe, I'd like a good reference to learn more about forking in perl...
>I'm sure some one knows an excellent site or faq..or..book?
>Too many sequential proceses goin on in one place...
>
Take a look at "Learning Perl" by R.Schwartz and T.Christiansen for
a good introduction to the subject.
hth,
--
Charles DeRykus
------------------------------
Date: Mon, 18 Jan 1999 14:17:17 -0600
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: glob error
Message-Id: <36A396CD.BA9F066E@us.ibm.com>
Matthew Bafford wrote:
> Gosh, no. Win32 supports forward slashes in filenames.
Sort of. perl for Win32 supports forward slashes. WinNT supports
forward slashes. Win95, however, interprets a forward slash as a
switch.
print `dir \\perl`;
print `dir /perl`;
Both are valid perl statements, but only the first one works as desired
under Win95. In the second case, you'll generate "Invalid switch -
ERL".
system("dir \\perl");
system("dir /perl");
Same deal as with backticks. Win95 doesn't enjoy seeing a forward
slash.
chdir("\\perl");
chdir("/perl");
In this case, perl handles both lines as desired, even under Win95.
--
James Ludlow (ludlow@us.ibm.com)
(Any opinions expressed are my own, not necessarily those of IBM)
------------------------------
Date: Mon, 18 Jan 1999 20:57:16 +0000
From: Kiril <spam.me@idea.co.uk>
Subject: Re: glob error
Message-Id: <36A3A02C.5A94072D@idea.co.uk>
James Ludlow wrote:
>
> Matthew Bafford wrote:
>
> > Gosh, no. Win32 supports forward slashes in filenames.
>
> Sort of. perl for Win32 supports forward slashes. WinNT supports
> forward slashes. Win95, however, interprets a forward slash as a
> switch.
>
<chop examples>
Hm, seems like there is confusion wrt "OS filename support", and
"SHELL filename support." (``) and system() (in a shell-calling
context) have to refer to command.com / cmd.exe / whatever to
parse the line, and yes, for them '/' is a switch setting.
When used as a FILENAME , '/' is a valid separator, and IIRC has been
such forever. (up to & incl. dos 1.0)
I'll leave the discussion of when system() does and does not invoke
the shell to others :-)
K
------------------------------
Date: Mon, 18 Jan 1999 13:53:18 -0800
From: Brook Harty <harty@gte.com>
Subject: Help: Advanced Search and Replace Question
Message-Id: <780abt$ecm$1@news-1.news.gte.net>
I want to remove all html tags from a document.
tags are anything between <> tags. example <foobar>
s/whatgoeshere?//;
<*> would be nice, but is not the right syntax.
Thank for any help.
-Brook Harty
harty@gte.net
------------------------------
Date: Mon, 18 Jan 1999 12:27:19 -0800
From: Jerome O'Neil <jeromeo@atrieva.com>
To: Kiril <spam.me@idea.co.uk>
Subject: Re: HELP: Netscape 4.5 doesn't like text/html header from Perl script
Message-Id: <36A39927.F4779502@atrieva.com>
Kiril wrote:
>
> cndawes@my-dejanews.com wrote:
>
> telnet YOURHOST 80
> in telnet type
> GET /cgi-bin/YOURSCRIPT HTTP1.0
This will (or should) generate an invalid request error.
GET /cgi-bin/YOURSCRIPT HTTP/1.0
is appropriate.
--
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947
The Atrieva Service: Safe and Easy Online Backup http://www.atrieva.com
------------------------------
Date: Mon, 18 Jan 1999 21:00:14 +0000
From: Kiril <spam.me@idea.co.uk>
Subject: Re: HELP: Netscape 4.5 doesn't like text/html header from Perl script
Message-Id: <36A3A0DE.57B8A867@idea.co.uk>
Jerome O'Neil wrote:
>
> Kiril wrote:
> >
> > cndawes@my-dejanews.com wrote:
> >
> > telnet YOURHOST 80
> > in telnet type
> > GET /cgi-bin/YOURSCRIPT HTTP1.0
>
> This will (or should) generate an invalid request error.
>
> GET /cgi-bin/YOURSCRIPT HTTP/1.0
>
> is appropriate.
<chuckle> I am an engineer, not a scientist.
It probably should, but it does not (on MY server ;-)
K
------------------------------
Date: Mon, 18 Jan 1999 19:51:46 GMT
From: glo83@my-dejanews.com
Subject: Re: JPL install difficulties
Message-Id: <7803ce$81c$1@nnrp1.dejanews.com>
for the benefit of those who may, at some point, experience the same problem
and who are not members of the JPL mailing list (where they'd have already
heard):
the thread library problem submitted below was eliminated upon recompiling
Perl 5.005_54 without using Perl threads; i.e., -Dusethreads was not supplied
to the configuration script.
ryan
ps.s. i did install the 2.2.0pre7 kernel, incidentally, and i'm very
impressed... 8)
In article <77qe7u$kt9$1@nnrp1.dejanews.com>,
glo83@yahoo.com wrote:
> hello, i would appreciate any input, if possible: i downloaded and compiled
> Perl 5.005_54, in order to try (among other things) the Java/Perl Lingo kit.
> i am running Debian GNU/Linux 2.0 (glibc2), stable kernel 2.0.34, gcc
> 2.7.2.3, ld 2.9.1. i configured Perl with -Dusethreads and with libperl.so
> dynamically-loaded (per the JPL instructions), but upon running
> ./install-jpl, i get the following at compile time:
>
> [...] gcc -c -I/usr/local/java/include -I/usr/local/java/include/linux
> -I/usr/local/java/include/genunix -D_REENTRANT -Dbool=char -DHAS_BOOL
> -I/usr/local/include -O2 -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fpic
> -I/usr/local/lib/perl5/5.00554/i586-linux-thread/CORE JNI.c Running
> Mkbootstrap for JNI () chmod 644 JNI.bs
> LD_RUN_PATH="/usr/local/lib/perl5/5.00554/i586-linux-thread/CORE:/usr/local/j
> pl/ lib/i586-linux-thread" gcc -o blib/arch/auto/JNI/JNI.so -shared
> -L/usr/local/lib JNI.o -R/usr/local/lib/perl5/5.00554/i586-linux-thread/CORE
> -L/usr/local/lib/perl5/5.00554/i586-linux-thread/CORE
> -R/usr/local/jpl/lib/i586-linux-thread -L/usr/local/jpl/lib/i586-linux-thread
> -lperl -lPerlInterpreter [ **** ] gcc: unrecognized option
> `-R/usr/local/lib/perl5/5.00554/i586-linux-thread/CORE' gcc: unrecognized
> option `-R/usr/local/jpl/lib/i586-linux-thread' [ **** ] chmod 755
> blib/arch/auto/JNI/JNI.so cp JNI.bs blib/arch/auto/JNI/JNI.bs
>
> [...]
>
> and then this at run-time when install-jpl tries to run the the Sample class:
>
> Testing Sample...
> + cd Sample
> + JPLDEBUG=1
> + export JPLDEBUG
> + java Sample
> /usr/local/jpl/lib/i586-linux-thread/libPerlInterpreter.so: undefined symbol:
> pthread_getspecific (libSample.so)
> Can't find class Sample
> Couldn't run Sample
>
> it appears both problems are thread-related, but i am not clear what the real
> problem is (i'm not an expert in these matters). does anyone have any
> thoughts? i will probably try recompiling without -Dusethreads, but i thought
> i'd check with y'all first before i do, since i've been through the whole
> 5.005_54 install 5 or 6 times already .. 8) thanks a lot!
>
> glo
>
> p.s. i'm also planning on installing kernel 2.2.0pre7 today, so maybe that'll
> help? (or maybe break things even more...)
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 18 Jan 1999 19:53:12 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <7803f8$6bl$2@info.uah.edu>
Following is a summary of articles from new posters spanning a 7 day
period, beginning at 11 Jan 1999 19:17:57 GMT and ending at
18 Jan 1999 07:52:40 GMT.
Notes
=====
- A line in the body of a post is considered to be original if it
does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
- All text after the last cut line (/^-- $/) in the body is
considered to be the author's signature.
- The scanner prefers the Reply-To: header over the From: header
in determining the "real" email address and name.
- Original Content Rating (OCR) is the ratio of the original content
volume to the total body volume.
- Find the News-Scan distribution on the CPAN!
<URL:http://www.perl.com/CPAN/modules/by-module/News/>
- Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
- Copyright (c) 1998 Greg Bacon. All Rights Reserved.
Verbatim copying and redistribution is permitted without royalty;
alteration is not permitted. Redistribution and/or use for any
commercial purpose is prohibited.
Totals
======
Posters: 274 (50.3% of all posters)
Articles: 370 (25.5% of all articles)
Volume generated: 572.7 kb (23.2% of total volume)
- headers: 265.5 kb (5,308 lines)
- bodies: 301.2 kb (9,800 lines)
- original: 226.2 kb (7,539 lines)
- signatures: 5.7 kb (137 lines)
Original Content Rating: 0.751
Averages
========
Posts per poster: 1.4
median: 1.0 post
mode: 1 post - 219 posters
s: 1.0 post
Message size: 1585.1 bytes
- header: 734.9 bytes (14.3 lines)
- body: 833.6 bytes (26.5 lines)
- original: 626.1 bytes (20.4 lines)
- signature: 15.6 bytes (0.4 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
7 6.5 ( 4.5/ 2.0/ 1.3) Pascal Rigaux <pixel_@geocities.com>
6 7.5 ( 3.9/ 3.6/ 3.1) bluepuma@mailexcite.com
6 8.9 ( 4.1/ 4.8/ 2.7) jhall@idiglobal.com
5 6.6 ( 3.7/ 2.5/ 1.2) Per Kistler <kistler@gmx.net>
5 7.2 ( 4.2/ 3.0/ 1.5) "Damian" <damian@infoxchange.net.au>
5 9.7 ( 4.2/ 5.4/ 3.0) dhosek@webley.com
4 5.0 ( 2.4/ 2.6/ 1.8) stevel@coastside.net (Steve Leibel)
4 20.0 ( 3.2/ 16.7/ 5.4) David Robinson <dave@icepop.demon.co.uk>
4 4.9 ( 2.8/ 2.1/ 1.5) "Ian" <ijp@thornlea.force9.co.uk>
4 4.6 ( 2.9/ 1.7/ 1.3) Etienne Pollard <not@giving.it.out>
These posters accounted for 3.4% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
20.0 ( 3.2/ 16.7/ 5.4) 4 David Robinson <dave@icepop.demon.co.uk>
16.3 ( 0.8/ 15.5/ 15.2) 1 Simon <da@hotpop.com>
14.0 ( 2.3/ 11.7/ 0.2) 2 eendersnospam@ford.com
9.7 ( 4.2/ 5.4/ 3.0) 5 dhosek@webley.com
8.9 ( 4.1/ 4.8/ 2.7) 6 jhall@idiglobal.com
7.6 ( 2.2/ 5.3/ 4.5) 3 "Micah Roark" <mroark@amerisale.com>
7.5 ( 3.9/ 3.6/ 3.1) 6 bluepuma@mailexcite.com
7.2 ( 4.2/ 3.0/ 1.5) 5 "Damian" <damian@infoxchange.net.au>
7.0 ( 2.5/ 4.5/ 4.2) 3 tiptopmind@my-dejanews.com
6.9 ( 2.2/ 3.9/ 2.4) 3 blainn@worldnet.att.net
These posters accounted for 4.3% of the total volume.
Top 10 Posters by OCR (minimum of three posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
1.000 ( 1.0 / 1.0) 3 Stefan Nonneman <stefan.nonneman@cec.be>
1.000 ( 0.4 / 0.4) 3 "Michael J. Wrobel" <mjw@hrb.com>
1.000 ( 1.8 / 1.8) 3 gigatronman@email.com (Giga Tron)
0.934 ( 4.2 / 4.5) 3 tiptopmind@my-dejanews.com
0.869 ( 3.1 / 3.6) 6 bluepuma@mailexcite.com
0.850 ( 4.5 / 5.3) 3 "Micah Roark" <mroark@amerisale.com>
0.760 ( 1.3 / 1.7) 4 Etienne Pollard <not@giving.it.out>
0.747 ( 2.4 / 3.2) 3 "KC Hunt" <khunt@earthlink.net.no-spam>
0.715 ( 1.5 / 2.1) 4 "Ian" <ijp@thornlea.force9.co.uk>
0.707 ( 1.5 / 2.1) 3 posting.account@lookout.com (William Herrera)
Bottom 10 Posters by OCR (minimum of three posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.641 ( 1.3 / 2.0) 7 Pascal Rigaux <pixel_@geocities.com>
0.634 ( 2.8 / 4.4) 3 Rafiq Mateen <rafiqmateen@netscape.net>
0.611 ( 2.4 / 3.9) 3 blainn@worldnet.att.net
0.599 ( 0.7 / 1.1) 3 Bill Jackson <wcj@iti-oh.com>
0.553 ( 2.7 / 4.8) 6 jhall@idiglobal.com
0.543 ( 3.0 / 5.4) 5 dhosek@webley.com
0.502 ( 1.5 / 3.0) 5 "Damian" <damian@infoxchange.net.au>
0.471 ( 1.2 / 2.5) 5 Per Kistler <kistler@gmx.net>
0.325 ( 1.4 / 4.2) 3 "Danny" <dstern@aschwebhosting.comnospam>
0.321 ( 5.4 / 16.7) 4 David Robinson <dave@icepop.demon.co.uk>
21 posters (7%) had at least three posts.
Top 10 Crossposters
===================
Articles Address
-------- -------
20 Ultima2K@NOSPAMaol.com
20 "JLenn" <no@spam.here>
20 WWS <wschmidt@tyler.net>
20 ghand@mitretek.org
20 eendersnospam@ford.com
11 "Spam" <spam@nospam.spam.thankyamam>
10 "R4949" <dkr@globalnet.co.uk>
10 bry@NOSPAM.mnsinc.com
10 kd4zkw@amsat.org
10 "JAY JAY" <jackiej@acay.com.au>
------------------------------
Date: 18 Jan 1999 21:17:33 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: passing regexp modifiers in a scalar
Message-Id: <7808dd$ftd$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Larry Rosler
<lr@hpl.hp.com>],
who wrote in article <MPG.110d25935bfb276398999b@nntp.hpl.hp.com>:
> By the way, you also don't need the 'eval', either in this case or in
> the line in your original code:
>
> > $retval = eval { $input =~ /$params->{regexp}/ };
>
> Just interpolate into the regex and all will be well.
What makes you think so? Errors in compiling a REx are fatal.
Ilya
------------------------------
Date: Mon, 18 Jan 1999 15:49:00 -0600
From: "Brad Jackson" <i1@i-1.net>
Subject: Perl 5.005_54 fails make test at io/fs.t #18 under BSD/OS 4.0
Message-Id: <780a8r$slg$1@news1-alterdial.uu.net>
This is really odd, and it's keeping me awake during the day... :-)
I grabbed both the current stable and the devel archives for Perl5 i.e.
5.005_02 and 5.005_54 ... both builds compile correctly (no errors or
warnings) using the bsdi hints file instructions. Both builds then fail the
"make test" step at step 18.
The test being run is t/io/fs.t and the code being run is:
[tests 1 - 13 omitted....]
if (rename('a','b')) {print "ok 14\n";} else {print "not ok 14\n";}
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat('a');
if ($ino == 0) {print "ok 15\n";} else {print "not ok 15\n";}
$delta = $Is_Dosish ? 2 : 1; # Granularity of time on the filesystem
$foo = (utime 500000000,500000000 + $delta,'b');
if ($foo == 1) {print "ok 16\n";} else {print "not ok 16 $foo\n";}
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat('b');
if ($ino) {print "ok 17\n";} else {print "not ok 17\n";}
if ($wd =~ m#/afs/# || $^O eq 'amigaos' || $^O eq 'dos')
{print "ok 18 # skipped: granularity of the filetime\n";}
elsif ($atime == 500000000 && $mtime == 500000000 + $delta)
{print "ok 18\n";}
else
{print "not ok 18 $atime $mtime\n";}
[... more tests]
I conclude that the utime() call is failing to set the atime (last access
time) correctly. Peeking at the values returned by the stat() call shows
that the entire stat data structure has been (correctly) altered after the
rename call, but although the utime() call succeeds in altering the mtime of
the test file, it fails to update the atime value and bombs the test at that
point.
I've looked at the source, and (of course) cant see any 'obvious' problems.
I've checked dejanews, Nexial's BSDI list archive, various Perl FAQs and
other resources, but havent found an answer. Has anyone else experienced
this error, with BSDI 4.0 or any other platform?
MTIA..
Brad Jackson
Network Administrator
I-1 Internet Group, Inc.
------------------------------
Date: Mon, 18 Jan 1999 16:13:12 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Perl Criticism
Message-Id: <fl_aggie-1801991613120001@aggie.coaps.fsu.edu>
In article <i9hu77.7o4.ln@magna.metronet.com>, tadmc@metronet.com (Tad
McClellan) wrote:
+ Daffy Duck is a celebrity...
Yeah, but he can't get a check cashed...
James
------------------------------
Date: Mon, 18 Jan 1999 19:33:26 GMT
From: chortik@my-dejanews.com
Subject: Re: Perl for Win32 Newbie
Message-Id: <7802a7$702$1@nnrp1.dejanews.com>
make sure that the path to perl in in your autoexec.bat, and that the path to
your script is there also. otherwise try this
c:\path_to_perl\perl c:\path_to_script\script.pl
replace path_to_perl and path_to_script with corresponding values
In article <77s0rm$u8l$1@camel21.mindspring.com>,
"Ted" <tszeto@mindspring.com> wrote:
> Hi,
>
> I'm getting the message: "The name specified is not recognized as an
> internal or external command, operable program or batch file." when I try to
> run a perl script under Windows NT.
>
> What am I doing wrong??
>
> Thanks in advance.
>
> Regards,
> Ted
> tszeto@mindspring.com
>
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 18 Jan 1999 13:48:13 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Perl Web browser problem
Message-Id: <t53087.t6b.ln@magna.metronet.com>
Ronald Martens (rmartens@nmsmedia.nl) wrote:
: Does anyone has a clue?
: I can run my perl script in telnet mode.
Then you do not have a Perl problem.
: However when I want to run it in a browser
You cannot run perl in a browser (client).
It must run on a server.
: I get a misconfiguration error. I
misconfiguration of what?
Your http server perhaps?
Perl ain't got no server, so questions about servers do not
belong in a Perl newsgroup.
Try asking server configuration questions in a newsgroup that
is about servers:
comp.infosystems.www.servers.mac
comp.infosystems.www.servers.misc
comp.infosystems.www.servers.ms-windows
comp.infosystems.www.servers.unix
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 18 Jan 1999 21:24:54 GMT
From: jmauney@my-dejanews.com
Subject: Re: Perl Web browser problem
Message-Id: <7808qr$ct9$1@nnrp1.dejanews.com>
In article <8bKo2.88$Ly3.624@news13.ispnews.com>,
Ed Eddington <ed@*NO*SPAM*pcr8.pcr.com> wrote:
> Try this...
>
> #/usr/bin/perl -w
> print "Content-type: text/html\n\n";
> print "<html><body>Hello World!</body></html>
> exit ;
>
First try from command line:
# ./usenet31.pl
./usenet31.pl: print: command not found
./usenet31.pl: print: command not found
Added bang in line 1.
Second try from command line:
Can't find string terminator '"' anywhere before EOF at usenet31.pl line 3.
Added \n"; to end of line 3.
Third try from command line:
[root@downy Usenet]# ./usenet31.pl
Content-type: text/html
<html><body>Hello World!</body></html>
Finally, browser try:
Hello World!
Revised and tested script:
#!/usr/bin/perl -w
print "Content-type: text/html\n\n";
print "<html><body>Hello World!</body></html>\n";
exit;
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 18 Jan 1999 21:42:05 -0000
From: "Ian" <ijp@thornlea.force9.co.uk>
Subject: Re: Perl Web browser problem
Message-Id: <0WNo2.7796$dh1.1633@wards>
>: However when I want to run it in a browser
>
>
> You cannot run perl in a browser (client).
give the guy a break, it's obvious (well to most people anyway) what he
means, why do you have to try to be so clever, secondly if the post isn't
totally relevant whats the point in sending pedantic responses, just wastes
your time in writing them, and everyone else's time in downloading them.
Tad McClellan wrote in message ...
>Ronald Martens (rmartens@nmsmedia.nl) wrote:
>: Does anyone has a clue?
>: I can run my perl script in telnet mode.
>
>
> Then you do not have a Perl problem.
>
>
>: However when I want to run it in a browser
>
>
> You cannot run perl in a browser (client).
>
> It must run on a server.
>
>
>: I get a misconfiguration error. I
>
>
> misconfiguration of what?
>
> Your http server perhaps?
>
> Perl ain't got no server, so questions about servers do not
> belong in a Perl newsgroup.
>
> Try asking server configuration questions in a newsgroup that
> is about servers:
>
> comp.infosystems.www.servers.mac
> comp.infosystems.www.servers.misc
> comp.infosystems.www.servers.ms-windows
> comp.infosystems.www.servers.unix
>
>
>
>--
> Tad McClellan SGML Consulting
> tadmc@metronet.com Perl programming
> Fort Worth, Texas
------------------------------
Date: Mon, 18 Jan 1999 11:52:40 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Printing word betrween to patterns - Sorry New
Message-Id: <MPG.110d30e5dd11b71e98999e@nntp.hpl.hp.com>
In article <MPG.110d2a36ff1e6ce798999c@nntp.hpl.hp.com> on Mon, 18 Jan
1999 11:24:16 -0800, Larry Rosler <lr@hpl.hp.com> says...
...
> while (<BOOK>) {
> if (/$pr(.*)$en/) {
> print "$1\n";
> }
> }
>
> or as a one-liner:
>
> /$pr(.*)$en/ and print "$1\n" while <BOOK>;
If there might be more than one pair of delimiters on a line, that regex
will be too greedy (it will find everything between the first $pr and
the last $en). A better regex might be:
/$pr(.*?)$en/
which will print the first match. To print all of them, you need to
loop on the '/g' modifier.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 18 Jan 1999 10:57:45 -0800
From: "Ion Chalmers Freeman" <ion@aroma.com>
Subject: Re: Printing word betrween to patterns - Sorry New
Message-Id: <36a38044.0@news.prostar.com>
Scott,
This should illustrate:
**
$a = 'a';
$b = 'b';
$c = 'abacab';
$c =~ m/$a(.*)$b/;
print $1, "\n";
**
Note that with the use of '.*,' the match did not stop at the first 'b'
it came to, so it may not be what you want. I think the use of $1, though,
lies at the heart of the answer you seek.
ion
http://www.perl.com/CPAN-local/doc/manual/html/pod/perlre.html
**
Scott Hadley wrote in message <36a36f2d.324169427@news.supernews.com>...
Sorry for the simple - question - still trying to learn.
What I want to do is print the word found between $pr .... $en. I for
the life of me can't figure out the proper syntext.
------------------------------
Date: Mon, 18 Jan 1999 13:40:53 -0600
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: splitting file using eof question
Message-Id: <36A38E45.6D580B2C@us.ibm.com>
Hampton Keathley wrote:
> I figured out how to take everything from the first <P><A NAME\=\"P to
> the end of file with this:
>
> $line = <INFILE>;
> while (<>){
> print NOTEFILE if /<P><A NAME\=\"P/ .. eof;
> }
>
> BUT, I really want to take all the notes and send them to @NOTES and the
> rest of the file before my match and send them to @BODY.
>
> Anyone know how to do that?
Yes, the FAQ does.
http://www.perl.com/CPAN-local/doc/FAQs/FAQ/PerlFAQ.html#I_m_having_trouble_matching_over
--
James Ludlow (ludlow@us.ibm.com)
(Any opinions expressed are my own, not necessarily those of IBM)
------------------------------
Date: Mon, 18 Jan 1999 13:53:30 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: splitting file using eof question
Message-Id: <qf3087.t6b.ln@magna.metronet.com>
Hampton Keathley (hamptonk@bible.org) wrote:
: I need to split an html file into two arrays. One with the body and one
: with the notes.
: The footnotes always begin with /<P><A NAME\=\"P/ followed by one or
: more lines of text, tables, etc.
: BUT, I really want to take all the notes and send them to @NOTES and the
: rest of the file before my match and send them to @BODY.
: Anyone know how to do that?
# UNTESTED
while (<>) {
last if /<P><A NAME="P/; # one line past the "body" part
push @body, $_; # UPPER CASE variable names are yucky
}
push @notes, $_; # get the first "notes" line
while (<>) {
push @notes, $_; # the rest of the "notes" lines
}
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 18 Jan 1999 19:53:04 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <7803f0$6bl$1@info.uah.edu>
Following is a summary of articles spanning a 7 day period,
beginning at 11 Jan 1999 19:17:57 GMT and ending at
18 Jan 1999 07:52:40 GMT.
Notes
=====
- A line in the body of a post is considered to be original if it
does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
- All text after the last cut line (/^-- $/) in the body is
considered to be the author's signature.
- The scanner prefers the Reply-To: header over the From: header
in determining the "real" email address and name.
- Original Content Rating (OCR) is the ratio of the original content
volume to the total body volume.
- Find the News-Scan distribution on the CPAN!
<URL:http://www.perl.com/CPAN/modules/by-module/News/>
- Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
- Copyright (c) 1998 Greg Bacon. All Rights Reserved.
Verbatim copying and redistribution is permitted without royalty;
alteration is not permitted. Redistribution and/or use for any
commercial purpose is prohibited.
Excluded Posters
================
perlfaq-suggestions\@mox\.perl\.com
Totals
======
Posters: 545
Articles: 1452 (442 with cutlined signatures)
Threads: 433
Volume generated: 2468.1 kb
- headers: 1078.7 kb (21,114 lines)
- bodies: 1315.4 kb (42,212 lines)
- original: 855.1 kb (29,897 lines)
- signatures: 72.6 kb (1,670 lines)
Original Content Rating: 0.650
Averages
========
Posts per poster: 2.7
median: 1 post
mode: 1 post - 368 posters
s: 5.8 posts
Posts per thread: 3.4
median: 2 posts
mode: 1 post - 159 threads
s: 9.2 posts
Message size: 1740.6 bytes
- header: 760.8 bytes (14.5 lines)
- body: 927.6 bytes (29.1 lines)
- original: 603.0 bytes (20.6 lines)
- signature: 51.2 bytes (1.2 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
72 107.6 ( 40.6/ 66.9/ 45.5) tadmc@metronet.com (Tad McClellan)
56 154.2 ( 54.3/ 99.9/ 43.3) topmind@technologist.com
49 63.3 ( 35.2/ 27.5/ 25.7) abigail@fnx.com
29 49.0 ( 26.1/ 15.4/ 8.7) rjk@linguist.dartmouth.edu (Ronald J Kimball)
27 39.1 ( 22.9/ 16.2/ 10.6) bart.lateur@skynet.be (Bart Lateur)
26 52.4 ( 20.3/ 31.3/ 9.1) Eugene Sotirescu <eugene@snailgem.org>
24 47.8 ( 21.9/ 21.2/ 9.0) dformosa@zeta.org.au (David Formosa (aka ? the Platypus))
22 36.2 ( 19.9/ 15.5/ 9.7) Rick Delaney <rick.delaney@home.com>
22 28.6 ( 12.8/ 15.8/ 8.9) Ala Qumsieh <aqumsieh@matrox.com>
21 36.0 ( 14.6/ 18.8/ 9.7) Uri Guttman <uri@ibnets.com>
These posters accounted for 24.0% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
154.2 ( 54.3/ 99.9/ 43.3) 56 topmind@technologist.com
107.6 ( 40.6/ 66.9/ 45.5) 72 tadmc@metronet.com (Tad McClellan)
63.3 ( 35.2/ 27.5/ 25.7) 49 abigail@fnx.com
52.4 ( 20.3/ 31.3/ 9.1) 26 Eugene Sotirescu <eugene@snailgem.org>
49.0 ( 26.1/ 15.4/ 8.7) 29 rjk@linguist.dartmouth.edu (Ronald J Kimball)
47.8 ( 21.9/ 21.2/ 9.0) 24 dformosa@zeta.org.au (David Formosa (aka ? the Platypus))
39.1 ( 22.9/ 16.2/ 10.6) 27 bart.lateur@skynet.be (Bart Lateur)
36.2 ( 19.9/ 15.5/ 9.7) 22 Rick Delaney <rick.delaney@home.com>
36.0 ( 14.6/ 18.8/ 9.7) 21 Uri Guttman <uri@ibnets.com>
34.0 ( 13.5/ 18.8/ 8.3) 14 sholden@cs.usyd.edu.au
These posters accounted for 25.1% of the total volume.
Top 10 Posters by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.981 ( 11.5 / 11.7) 21 fl_aggie@thepentagon.com (I R A Aggie)
0.932 ( 25.7 / 27.5) 49 abigail@fnx.com
0.907 ( 16.1 / 17.7) 7 Greg Bacon <gbacon@cs.uah.edu>
0.869 ( 3.1 / 3.6) 6 bluepuma@mailexcite.com
0.792 ( 13.0 / 16.4) 11 Staffan Liljas <staffan@ngb.se>
0.779 ( 3.9 / 5.0) 5 moseley@best.com (Bill Moseley)
0.757 ( 11.0 / 14.5) 11 gward@cnri.reston.va.us
0.754 ( 4.2 / 5.6) 5 Scratchie <upsetter@ziplink.net>
0.747 ( 5.9 / 7.8) 10 dturley@pobox.com
0.735 ( 5.0 / 6.9) 5 "Allan M. Due" <due@murray.fordham.edu>
Bottom 10 Posters by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.450 ( 2.8 / 6.2) 8 Uri Guttman <uri@home.sysarch.com>
0.441 ( 8.3 / 18.8) 14 sholden@cs.usyd.edu.au
0.433 ( 43.3 / 99.9) 56 topmind@technologist.com
0.423 ( 9.0 / 21.2) 24 dformosa@zeta.org.au (David Formosa (aka ? the Platypus))
0.408 ( 6.2 / 15.3) 15 ilya@math.ohio-state.edu (Ilya Zakharevich)
0.403 ( 1.7 / 4.1) 6 newsposter@cthulhu.demon.nl
0.392 ( 4.7 / 12.0) 13 phenix@interpath.com (John Moreno)
0.314 ( 2.0 / 6.3) 9 webmaster@link-maker.com
0.313 ( 5.1 / 16.3) 8 chatmaster@c-zone.net
0.290 ( 9.1 / 31.3) 26 Eugene Sotirescu <eugene@snailgem.org>
60 posters (11%) had at least five posts.
Top 10 Threads by Number of Posts
=================================
Posts Subject
----- -------
181 Perl Criticism
26 Verify an email address
23 A plea for less goofy signature files!
19 Regex challenge
18 A really easy string question
17 Year 2038 problem
15 Treating Strings as FILEHANDLES
15 Which Perl reference book?
13 cat filename | wc -l perl equivalent
13 CONCLUSIVE PROOF: The Beatles are bigger than Jesus!
These threads accounted for 23.4% of all articles.
Top 10 Threads by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Subject
-------------------------- ----- -------
429.1 (173.0/241.1/126.4) 181 Perl Criticism
49.6 ( 22.4/ 23.8/ 14.5) 26 Verify an email address
39.5 ( 16.4/ 21.5/ 12.7) 23 A plea for less goofy signature files!
39.4 ( 13.5/ 25.0/ 17.1) 19 Regex challenge
28.5 ( 11.6/ 15.5/ 8.1) 13 How can I compare two arrays?
26.9 ( 4.0/ 22.9/ 6.4) 5 Help please..bad file handle error
26.2 ( 12.9/ 11.8/ 6.3) 18 A really easy string question
25.3 ( 12.2/ 12.2/ 8.5) 17 Year 2038 problem
24.7 ( 9.4/ 14.7/ 9.0) 13 @ARGV and $_ Question
24.3 ( 8.3/ 14.3/ 6.7) 12 perl cgi (win95) doesn't work with CGI.pm
These threads accounted for 28.9% of the total volume.
Top 10 Threads by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.859 ( 2.5/ 2.9) 5 global search and replace in files
0.837 ( 2.2/ 2.7) 5 read/write same file
0.826 ( 3.2/ 3.8) 5 Getting program to restart (HUP) more than once
0.815 ( 3.7/ 4.6) 6 filter href-links from web-page ?
0.800 ( 2.5/ 3.1) 5 Problem with legacy Perl script
0.786 ( 4.8/ 6.1) 7 Using require command
0.780 ( 8.5/ 11.0) 5 grep question
0.772 ( 10.2/ 13.2) 9 grep with boundaries and regex
0.759 ( 4.4/ 5.8) 6 Were to learn PERL Online.
0.755 ( 3.4/ 4.5) 6 HELP: Netscape 4.5 doesn't like text/html header from Perl script
Bottom 10 Threads by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.517 ( 1.7 / 3.2) 5 File Upload
0.516 ( 4.8 / 9.3) 12 Help needed with locking
0.512 ( 3.2 / 6.3) 11 Yet another REGEX question
0.494 ( 2.7 / 5.5) 5 tied hashed hash looses item #1
0.467 ( 6.7 / 14.3) 12 perl cgi (win95) doesn't work with CGI.pm
0.464 ( 2.2 / 4.8) 6 "Email this page to a friend" script
0.455 ( 2.3 / 5.2) 6 Can I use perl with https?
0.360 ( 2.0 / 5.6) 5 A newbie who needs some help
0.279 ( 6.4 / 22.9) 5 Help please..bad file handle error
0.124 ( 1.9 / 15.0) 6 CONCLUSIVE PROOF: Jesus *is* King of the Jews ! ! !
67 threads (15%) had at least five posts.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
29 comp.lang.perl.modules
23 rec.games.video.nintendo
23 rec.radio.swap
23 rec.arts.sf.tv
23 rec.arts.sf.written.robert-jordan
23 rec.motorcycles.harley
23 sci.astro.amateur
23 rec.music.beatles
21 alt.prophecies.cayce
21 alt.prophecies.nostradamus
Top 10 Crossposters
===================
Articles Address
-------- -------
29 joemama@roundtrip.net
20 Ultima2K@NOSPAMaol.com
20 eendersnospam@ford.com
20 ghand@mitretek.org
20 WWS <wschmidt@tyler.net>
20 "JLenn" <no@spam.here>
11 "Spam" <spam@nospam.spam.thankyamam>
10 kd4zkw@amsat.org
10 Forget.it@work.net
10 "R4949" <dkr@globalnet.co.uk>
------------------------------
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 4682
**************************************