[16488] in Perl-Users-Digest
Perl-Users Digest, Issue: 3900 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 3 11:10:31 2000
Date: Thu, 3 Aug 2000 08:10:19 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <965315419-v9-i3900@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 3 Aug 2000 Volume: 9 Number: 3900
Today's topics:
Is Learning Perl worth buying? john_s_brown@my-deja.com
Re: Is Learning Perl worth buying? <jbroz@transarc.com>
Re: Is Learning Perl worth buying? (Decklin Foster)
Re: Is Learning Perl worth buying? (Tom Christiansen)
Re: Is Learning Perl worth buying? (Decklin Foster)
Need Help In Accessing Web pages <shahila@cisco.com>
Need Some Perl Script Help Please... hugo.b@derivs.com
Re: Need Some Perl Script Help Please... <rmore1@my-deja.com>
Re: Need Some Perl Script Help Please... <red_orc@my-deja.com>
Re: Need to read a html page and save it via perl Unabl <jbroz@transarc.com>
Re: newb Q, Our perl guy left!! <nickco3@yahoo.co.uk>
Newbie help with loops, last, split <gnielson@charlotte.infi.net>
Re: pattern matching across two lines <rmore1@my-deja.com>
Re: Perl CGI on PWS !! (Tim Hammerquist)
PerlCC Question (Unix) <davidcum@americasm01.nt.com>
Re: Port access on a Mac (Anno Siegel)
Problems with reserved word in Net::SMTP copyright info klitze7@my-deja.com
Re: Problems with reserved word in Net::SMTP copyright <care227@attglobal.net>
Re: Problems with reserved word in Net::SMTP copyright <red_orc@my-deja.com>
Re: Problems with reserved word in Net::SMTP copyright <tony_curtis32@yahoo.com>
Re: Problems with reserved word in Net::SMTP copyright <care227@attglobal.net>
Re: Redirect in DOS box (Stefan Wimmer)
Re: splitting on spaces mr_curmudgeon@my-deja.com
Re: splitting on spaces <rmore1@my-deja.com>
Re: String to Integer (Greg Bacon)
Re: stripping - ? html tags <gellyfish@gellyfish.com>
Re: stripping - ? html tags <rmore1@my-deja.com>
Re: very cool routine (Tim Hammerquist)
Re: What happened to $fh->input_record_separator ? (Tom Christiansen)
Re: What happened to $fh->input_record_separator ? <care227@attglobal.net>
Win32 ODBC BETA 21.12.1999 Returns No Results <Roland@psychenet.co.uk>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 03 Aug 2000 12:02:32 GMT
From: john_s_brown@my-deja.com
Subject: Is Learning Perl worth buying?
Message-Id: <8mbn0m$jfp$1@nnrp1.deja.com>
I am beginning to learn Perl. I have read Robert's Perl Tutorial at
http://www.netcat.co.uk/rob/perl/win32perltut.html almost completely. I
don't have any earlier experience with C, C++ or the like, but I have
programmed a bit with Turbo Pascal couple of years ago.
Now, I would like to know if Learning Perl book is worth buying? There
are two reasons why I don't rush to the bookstore and buy it right away:
1. Learning Perl (2nd edition) is all about Perl 5, and I have
installed Perl 5.6 on my machine! Do those Perl 5 tricks presented in
Learning Perl book work with Perl version 6.5?
2. As I said, I have read Robert's Perl tutorial almost completely.
Would it be wiser with my previous knowledge to buy Programming Perl
(3rd edition) instead of Learning Perl?
Thanks in advance!
-John.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 03 Aug 2000 13:50:30 +0100
From: "Joe_Broz@transarc.com" <jbroz@transarc.com>
Subject: Re: Is Learning Perl worth buying?
Message-Id: <39896A96.816238DD@transarc.com>
john_s_brown@my-deja.com wrote:
>
[...]
> Now, I would like to know if Learning Perl book is worth buying? There
> are two reasons why I don't rush to the bookstore and buy it right away:
>
> 1. Learning Perl (2nd edition) is all about Perl 5, and I have
> installed Perl 5.6 on my machine! Do those Perl 5 tricks presented in
> Learning Perl book work with Perl version 6.5?
Yes. 5.6 is diferrent from, say, 5.005_03, but not so much so that the book
won't help you. If you're just starting out forget about "tricks" and
making code small and one-liners and just learn the language properly. All
the rest will come along later.
>
> 2. As I said, I have read Robert's Perl tutorial almost completely.
> Would it be wiser with my previous knowledge to buy Programming Perl
> (3rd edition) instead of Learning Perl?
In my opinion, no. Buy Learning perl now and then later buy Programming
perl. Having said that, I've never seen the web page you refer to.
Web pages are fun (some of them) but nothing beats actual paper you can
mark up, stare at, run away from and return to later. Of course most this
is possible with a web page but I personally hate to read a lot of text on
the computer.
I find it annoying, especially when the 'author' assumes that black
background looks cool and blue text on it is even better. Don't people look
at their own fscking pages!?! (Not that the page above has this problem. It
probably doesn't.)
joe
------------------------------
Date: Thu, 03 Aug 2000 12:55:07 GMT
From: decklin+usenet@red-bean.com (Decklin Foster)
Subject: Re: Is Learning Perl worth buying?
Message-Id: <LYdi5.10121$f_5.52873@news1.rdc1.ct.home.com>
john_s_brown@my-deja.com <john_s_brown@my-deja.com> writes:
> 1. Learning Perl (2nd edition) is all about Perl 5, and I have
> installed Perl 5.6 on my machine! Do those Perl 5 tricks presented in
> Learning Perl book work with Perl version 6.5?
The differences between 5.005 and 5.6 won't really affect you until
you get deeper into the language. No guarantees that the Llama doesn't
get into this territory, though; I've only skimmed it.
> 2. As I said, I have read Robert's Perl tutorial almost completely.
> Would it be wiser with my previous knowledge to buy Programming Perl
> (3rd edition) instead of Learning Perl?
This would be my reccommendation. Of course, it depends on how
comfortable you are learning from reference material, as the Camel
leans more in that direction.
I'm also influenced a bit by the fact that there are no spelling or
grammatical errors in your post, which makes you look a bit more
intelligent that the typical poster here. ;-)
--
There is no TRUTH. There is no REALITY. There is no CONSISTENCY. There
are no ABSOLUTE STATEMENTS. I'm very probably wrong. -- BSD fortune(6)
------------------------------
Date: 3 Aug 2000 07:28:24 -0700
From: tchrist@perl.com (Tom Christiansen)
Subject: Re: Is Learning Perl worth buying?
Message-Id: <39897378@cs.colorado.edu>
In article <8mbn0m$jfp$1@nnrp1.deja.com>, <john_s_brown@my-deja.com> wrote:
>I am beginning to learn Perl. I have read Robert's Perl Tutorial at
>http://www.netcat.co.uk/rob/perl/win32perltut.html almost completely. I
>don't have any earlier experience with C, C++ or the like, but I have
>programmed a bit with Turbo Pascal couple of years ago.
>
>Now, I would like to know if Learning Perl book is worth buying? There
>are two reasons why I don't rush to the bookstore and buy it right away:
>
>1. Learning Perl (2nd edition) is all about Perl 5, and I have
>installed Perl 5.6 on my machine! Do those Perl 5 tricks presented in
>Learning Perl book work with Perl version 6.5?
(You mean 5.6, not 6.5) But no, the Llama does not do all that well
at covering version 5 of Perl. It's basically best only for Unix
programmers/admins. It covers so little of Perl that I'm not sure
it's completely relevant today. Several other books are available
for different audiences.
_Elements of Programming With Perl_ by Andrew L. Johnson; Manning
(October 1999). This book aims to teach non-programmers how to program
from the ground up, and to do so using Perl.
_Perl: The Programmer's Companion_ by Nigel Chapman; Wiley (1997)
This platform-independent book is geared for professional computer
scientists and programmers without regard to platform. It covers
Perl quickly but completely.
_Learning Perl_ by Randal Schwartz and Tom Christiansen; O'Reilly
(2nd Edition 1997). This book teaches Unix sysadmins and Unix
programmers that 30% of basic Perl that they'll use 70% of the time.
Erik Olson retargeted a version of this book for Perl programmers on
Microsoft systems; it is called _Learning Perl for Win32 Systems_
>2. As I said, I have read Robert's Perl tutorial almost completely.
>Would it be wiser with my previous knowledge to buy Programming Perl
>(3rd edition) instead of Learning Perl?
Probably; I no longer supply it with my Beginning Perl classes, for
example. (I supply an unpublished 500-page workbook with note, and
the Camel.) It's just not sufficiently relevant anymore. It looks
way, way too much like my 1989 learning perl lecture notes I gave
at Usenix to make sense today.
The best thing you can do for yourself is to go to a bookstore, and
sit down take a very serious lookthrough over Camel(3) to see whether
it is good enough for you or not. Chapter 1 ("Overview") is the
orientational tutorial. That way you can judge for yourself.
While you're there at the store, you might also look at the Camel's
companion book, the Ram--aka the Perl Cookbook ("Solutions and
Examples for for Perl Programmers"). Even though we made the Camel
some 70% bigger in pages for this edition, a fair portion of which
is added examples, the Cookbook goes much further in this regard.
Another nicety for you is the newly released third edition of the
Perl Pocket Reference, by Johan Vromans. If you had $100 to blow
on published perl books, I'd get Camel-3 plus Ram plus PPR. If you
had $0 to blow, I'd familiarize myself with the complete standard
Perl manpages, then grab a huge compendium of source code for
examples (for example, the Ram's example code is all ftp'able, or
you could get PPT, etc.)
--tom
------------------------------
Date: Thu, 03 Aug 2000 14:55:37 GMT
From: decklin+usenet@red-bean.com (Decklin Foster)
Subject: Re: Is Learning Perl worth buying?
Message-Id: <JJfi5.10125$f_5.52908@news1.rdc1.ct.home.com>
Decklin Foster <decklin+usenet@red-bean.com> writes:
> intelligent that the typical poster here. ;-)
^^^^
See what I get for pointing that out? oh well, back to coding...
--
There is no TRUTH. There is no REALITY. There is no CONSISTENCY. There
are no ABSOLUTE STATEMENTS. I'm very probably wrong. -- BSD fortune(6)
------------------------------
Date: Thu, 03 Aug 2000 10:50:15 -0400
From: Shahila Murugiah <shahila@cisco.com>
Subject: Need Help In Accessing Web pages
Message-Id: <398986A7.3C4617F2@cisco.com>
Hello Everyone,
I have a perl script where I'm able to access any web sites except the
web sites, require login info (user name and password) in a pop-up
dialog box. In my script I have the following lines in the purpose of
passing the login info:
.....
$webdoc = $browser -> request (HTTP::Request -> new(GET => $url));
$webdoc -> authorization_basic('***USERNAME***', '***PASSWORD***');
....
I do not know why it didn't work. Is anyone know how to fix it or some
other way to pass my login information, please help me out.
I'm enclosing the script @ the end of this mail.
Thank you,
Shahila
==============================
#!/usr/local/bin/perl -w
# @
BEGIN { die "usage: $0 URL ..." unless @ARGV }
use strict;
use Getopt::Std;
use LWP::UserAgent;
use LWP 5.000;
use URI::URL;
use HTML::Parse qw(parse_html);
my ($url, $webdoc, $browser, $link, %saw, $linkpair, $hypertext);
$browser = LWP::UserAgent -> new();
foreach $url ( @ARGV ) {
$webdoc = $browser -> request (HTTP::Request -> new(GET => $url));
$webdoc -> authorization_basic('***USERNAME***', '***PASSWORD***');
next unless $webdoc -> is_success;
next unless $webdoc -> content_type eq 'text/html';
$hypertext = parse_html($webdoc -> content);
foreach $linkpair (@{$hypertext -> extract_links('A','IMG')}) {
$link = url($linkpair ->[0], $webdoc -> base) -> abs -> as_string;
$saw{ $link }++;
}
print "\n\n Here is the html formated page for your consideration:\n";
print ($webdoc ->content);
print "\n";
}
print join("\n", sort keys %saw), "\n";
------------------------------
Date: Thu, 03 Aug 2000 11:36:30 GMT
From: hugo.b@derivs.com
Subject: Need Some Perl Script Help Please...
Message-Id: <8mblfu$ibk$1@nnrp1.deja.com>
Hi
I need to know where I can get a script that does the same or a similar
thing so that I can edit it.
What I need to do with the script.
I have a form on my HTML Page.
The User makes it selections and fill in some fields and this all gets
posted to my webservers's cgi-bin address.
I need the Script to receive this information and then send this value
or information to a Particular Program or DLL or something that will
make a some calculations of this Info and then sends it back to the
Script.
Then the script needs to take this answer and send a new HTML Page back
and display this to the user which will contain the answers.
Is there any place where I can get something like this or some help
about this or if you know a short version of something like this that I
can edit, would be much apreciated.
I am only starting to learn Perl and CGi so the more I can edit without
doing it from scratch would be much apreeciated.
Hugo.b@derivs.com
Thank you very much.
Hugo
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 03 Aug 2000 13:41:37 GMT
From: Rich More <rmore1@my-deja.com>
Subject: Re: Need Some Perl Script Help Please...
Message-Id: <8mbsqf$o2p$1@nnrp1.deja.com>
In article <8mblfu$ibk$1@nnrp1.deja.com>,
hugo.b@derivs.com wrote:
> Is there any place where I can get something like this or some help
> about this or if you know a short version of something like this that
http://www.oreilly.com/catalog/cgi2/
CGI Programming with Perl, 2nd Edition
--
=============================
Richard More
http://www.richmore.com/
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 03 Aug 2000 13:55:29 GMT
From: Rodney Engdahl <red_orc@my-deja.com>
Subject: Re: Need Some Perl Script Help Please...
Message-Id: <8mbtkd$on0$1@nnrp1.deja.com>
In article <8mblfu$ibk$1@nnrp1.deja.com>,
hugo.b@derivs.com wrote:
> Hi
>
> I have a form on my HTML Page.
>
> The User makes it selections and fill in some fields and this all gets
> posted to my webservers's cgi-bin address.
>
> I need the Script to receive this information and ... make a some
> calculations ... and send a new HTML Page back
> and display this to the user which will contain the answers.
>
> Is there any place where I can get something like this
While this is not an endorsement of any of them, there are a lot of perl
script archives on the web (find them through almost any search engine:
+"perl script" +"script archive" on excite.com returns a bunch of them)
that have scripts that do most of this.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 03 Aug 2000 13:57:23 +0100
From: "Joe_Broz@transarc.com" <jbroz@transarc.com>
Subject: Re: Need to read a html page and save it via perl Unable to Use LWP
Message-Id: <39896C33.F3ECABEF@transarc.com>
Abigail wrote:
>
> ken (kensplace@comport.com) wrote on MMDXXVIII September MCMXCIII in
> <URL:news:8m9mlh$ga8$1@news8.svr.pol.co.uk>:
> ## any suggestions on how to read a url, and save the page to a file
> ## can be accomplished without the use of the lwp module (virtualave have not
> ## installed that)
>
> Use Netscape, and hit ALT+S.
>
crtl+s ??
'lynx -dump' should work as well and will save the page as text without all
the annoying html.
------------------------------
Date: Thu, 03 Aug 2000 12:01:38 +0100
From: Nick Condon <nickco3@yahoo.co.uk>
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <39895112.4D9111F9@yahoo.co.uk>
Russ Jones wrote:
> president@whitehouse.gov wrote:
> >
> > Oh for fucks sake! Are you trying to get help with your Perl situation, or are you
> > trying to mutually kill-file everyone?
> >
>
> Pretty brave words for someone that's afraid to post under his own
> name.
>
> (Russ hops on the plonk bandwagon)
How do you know Clinton doesn't hang out here, when he's finished at
alt.binaries.pictures.erotica.interns?
------------------------------
Date: Thu, 03 Aug 2000 10:40:22 -0400
From: Gary Nielson <gnielson@charlotte.infi.net>
Subject: Newbie help with loops, last, split
Message-Id: <39898456.B73660C4@charlotte.infi.net>
I am having trouble how to grab the contents of a text file up until the
first "<p>" and then exit the operation and am needing some advice on
how to approach this. I basically want to inhale a file until it hits
the first <p> and then exit. Whatever I am attempting isn't working. For
example, I tried splitting an array by <p> but split does not take but
one character, right? I tried using a loop with until, and I have tried
using last -- but not only am I having trouble getting this to work, but
there is more work with this approach because if "<p>" is in the middle
of a line, I would want to get everything up to and including the <p>
and nothing more. Any advice on how to best approach this appreciated.
Please email reply as well.
Gary
------------------------------
Date: Thu, 03 Aug 2000 14:27:26 GMT
From: Rich More <rmore1@my-deja.com>
Subject: Re: pattern matching across two lines
Message-Id: <8mbvg5$q65$1@nnrp1.deja.com>
In article <8mb442$61l$1@nnrp1.deja.com>,
Nitin <muhala@my-deja.com> wrote:
> I have text as follows:
>
> foo^M
> bar
>
> in several files. I need to replace this with:
>
> foobar
>
> How can I match patterns across two lines?
http://www.oreilly.com/catalog/regex/
Mastering Regular Expressions ( Chapter 7 )
open(FH,$ARGV[0]);
local($/);
$str=<FH>;
close(FH);
$str =~ s/foo\r\nbar/foobar/gsm;
print $str;
--
=============================
Richard More
http://www.richmore.com/
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 03 Aug 2000 13:31:23 GMT
From: tim@degree.ath.cx (Tim Hammerquist)
Subject: Re: Perl CGI on PWS !!
Message-Id: <slrn8oitjl.k4.tim@degree.ath.cx>
On Wed, 02 Aug 2000 20:20:03 GMT, puzzlerrr@my-deja.com
<puzzlerrr@my-deja.com> wrote:
> HI...
>
> i have installed the personal web server on w98 & also installed Perl for
> Win32 from activestate under /wwwroot... then i created a virtual dir that
> points to the actual dir of perl.exe (say perl56) & assianged appropriate
> permissions.. but when i tried to run the simple hello world cgi program, i
> always got 500 server error !! (it's fine to run from command prompt
> though...no syntax err..) the beginning of my cgi file looks like this...
>
> #!/perl56
> use CGI;
> print "Content-Type: text/html\n\n";
> .............
>
> so what have i done wrong ?? how come it just couldn't run ??!! can anyone
> help me ??
First, if there's no syntax error (ie, perl -c works), you don't have a
perl problem.
Second, it's probably in your installation of perl. Install ActivePerl
in the default manner, usually in \perl, yielding a shebang line of:
#!/perl/bin/perl -w
Which brings me to Three: PWS ignores the shebang line. PWS associates
file extensions with applications, but you have to dig into the
registry; Explorer program associations are also ignored. I'd suggest
searching the mailing list archives at activestate.com as I remember
answering this question about once a week earlier this year, but they
switched maillist servers and no longer have a searchable archive.
Recommendations:
1. email me privately: timmy@cpan.org
2. ask on the activestate lists:
http://listserv.activestate.com/mailman/listinfo/perl-win32-web
3. use apache ( http://www.apache.com/ or http://perl.apache.com/ )
if this is a viable option.
HTH
--
-Tim Hammerquist <timmy@cpan.org>
Programmers are achievement oriented; give them an impossible task,
and they'll do their best to give you what they think you would have
asked for if you had a clue as to what was possible.
-- Peter Coffee, PC Week
------------------------------
Date: Thu, 03 Aug 2000 09:28:10 -0400
From: "Cummings, David [CAR:SV20:EXCH]" <davidcum@americasm01.nt.com>
Subject: PerlCC Question (Unix)
Message-Id: <3989736A.F825B3C5@americasm01.nt.com>
Hi All,
I've been lookng through the documentation of PerlCC and have been
unable to find any bugs for what I am doing, so I figure it is something
I am doing wrong, and maybe somebody would know how to fix it.
I am trying to compile a simple program using PerlCC that is bundled
with Perl 5.6.0 I am using strict and Tk8 in my program.
I can compile the program by using
> perlcc x.pl
I get some errors about unable to load most of the Tk:: subs
ie:
No definition for sub Tk::break (unable to autoload)
It actually compiles but when I run the program I get:
Can't load module Tk::Menubutton, dynamic loading not available in this
perl.
(You may need to build a new perl executable which either supports
dynamic loading or has the Tk::Menubutton module statically linked
into it.)
at 000802_01.tetristk.no.test.screens.pl line 123
Compilation failed in require at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/Tk/Widget.pm line 259.
I am assuming it has something to do with loading modules and maybe a
trick to TK. If anybody knows of a fix for this let me know at
davidcum@nortelnetworks.com
BTW - I tried compiing it with PerlApp from PerlDev Beta 2, and I get
pretty much the same problem...
Thanks,
David
------------------------------
Date: 3 Aug 2000 13:33:49 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Port access on a Mac
Message-Id: <8mbsbt$kop$1@lublin.zrz.tu-berlin.de>
[posting on clp.misc, also mailed to diverdi@XTRsystems.com]
Macb3th Labs <jleane@netDIESPAMcom.ca> wrote in comp.lang.perl.misc:
>Hi all...
>
>I was wondering if anybody knew of any way to *directly* access the
>serial ports on a Mac. I've already used CommConnect, but it's a
>little too drool-proof for my intended use. I need the ability to send
>one BIT at a time, a la PC parallel port. Or keep one pin high for a
>period of time, etc.
Look for Serial.pm on CPAN (it's by Joseph A. DiVerdi, DIVERDI). It
gives you more control than CommConnect. Setting and resetting
individual pins is, of course, not something you can do with
a serial port, except by severe abuse of the handshake bits.
If I may presume to speak for the author, he is always happy about
feedback.
Anno
------------------------------
Date: Thu, 03 Aug 2000 13:24:00 GMT
From: klitze7@my-deja.com
Subject: Problems with reserved word in Net::SMTP copyright information
Message-Id: <8mbrp9$n59$1@nnrp1.deja.com>
I have a problem using the Net::SMTP Module by Graham Barr.
In the copyright information at the top there is the phrase saying 'All rights
reserved'
The server complains about the unquoted string 'reserved' in it, saying
--cite--
Unquoted string "reserved" may clash with future reserved word at
[..]/site/lib/Net/SMTP.pm line 4.
Bareword found where operator expected at [..]/site/lib/Net/SMTP.pm
line 4, near "0A"
(Missing operator before A?)
:
Bareword found where operator expected at [..]/site/lib/Net/SMTP.pm
line 7, near "0A"
(Missing operator before A?)
:
syntax error at [..]/site/lib/Net/SMTP.pm line 4, near "0A"
--end cite--
Is there any chance of altering the copyright information under the Public
License such as quoting the word 'reserved' to bypass reserved word clash?
Or maybe it is a problem of some version number?
We are hosted on an
NT 4.0 Server SP6a using
Perl 5.00503
WebSitePro 2.3.18 (WebServer) and
Net::SMTP Module Version 2.9.1
TIA
Guido Jansen
guido_jansen@gmx.de
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 03 Aug 2000 09:51:51 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Problems with reserved word in Net::SMTP copyright information
Message-Id: <398978F7.A9C71874@attglobal.net>
klitze7@my-deja.com wrote:
>
> --cite--
> Unquoted string "reserved" may clash with future reserved word at
> [..]/site/lib/Net/SMTP.pm line 4.
> Bareword found where operator expected at [..]/site/lib/Net/SMTP.pm
> line 4, near "0A"
> (Missing operator before A?)
> :
> Bareword found where operator expected at [..]/site/lib/Net/SMTP.pm
> line 7, near "0A"
> (Missing operator before A?)
> :
> syntax error at [..]/site/lib/Net/SMTP.pm line 4, near "0A"
> --end cite--
>
> Is there any chance of altering the copyright information under the Public
> License such as quoting the word 'reserved' to bypass reserved word clash?
>
From SMTP.pm:
# Net::SMTP.pm
#
# Copyright (c) 1995-1997 Graham Barr <gbarr@pobox.com>. All rights
reserved.
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
Notice that these lines are commented. They should be likewise in
your module. If they aren't, something strange has happened.
------------------------------
Date: Thu, 03 Aug 2000 13:48:43 GMT
From: Rodney Engdahl <red_orc@my-deja.com>
Subject: Re: Problems with reserved word in Net::SMTP copyright information
Message-Id: <8mbt7p$o94$1@nnrp1.deja.com>
In article <8mbrp9$n59$1@nnrp1.deja.com>,
klitze7@my-deja.com wrote:
> I have a problem using the Net::SMTP Module by Graham Barr.
> In the copyright information at the top there is the phrase saying
> 'All rights reserved'
> The server complains about the unquoted string 'reserved' in it,
> saying
>
> --cite--
> Unquoted string "reserved" may clash with future reserved word at
> [..]/site/lib/Net/SMTP.pm line 4.
> Bareword found where operator expected at [..]/site/lib/Net/SMTP.pm
> line 4, near "0A"
my copy of SMTP.pm has the All rights reserved on line three, as a part
of a comment line. By any chance has your file been inadvertantly
modified to place that string on the next line, uncommented?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 03 Aug 2000 09:06:32 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Problems with reserved word in Net::SMTP copyright information
Message-Id: <87wvhy782f.fsf@limey.hpcc.uh.edu>
>> On Thu, 03 Aug 2000 13:24:00 GMT,
>> klitze7@my-deja.com said:
> --cite-- Unquoted string "reserved" may clash with
> future reserved word at [..]/site/lib/Net/SMTP.pm line
> 4. Bareword found where operator expected at
> [..]/site/lib/Net/SMTP.pm line 4, near "0A" (Missing
> operator before A?) : Bareword found where operator
> expected at [..]/site/lib/Net/SMTP.pm line 7, near "0A"
> (Missing operator before A?) : syntax error at
> [..]/site/lib/Net/SMTP.pm line 4, near "0A" --end cite--
You probably have module files with the wrong end-of-line
sequence in them for your platform. This kind of thing
usually results from ftp'ing files between platforms with
the wrong type.
Where did you get the SMTP.pm file from?
Note that ASCII 0A is linefeed, and it is complaining
about the word at the end of the line.
hth
t
--
"With $10,000, we'd be millionaires!"
Homer Simpson
------------------------------
Date: Thu, 03 Aug 2000 10:10:02 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Problems with reserved word in Net::SMTP copyright information
Message-Id: <39897D3A.55FC11C1@attglobal.net>
Drew Simonis wrote:
>
> # Copyright (c) 1995-1997 Graham Barr <gbarr@pobox.com>. All rights
> reserved.
This wrap was the fault of my post, it is all one line in the module.
------------------------------
Date: 3 Aug 2000 10:22:40 GMT
From: swimmer@www.gx.nl (Stefan Wimmer)
Subject: Re: Redirect in DOS box
Message-Id: <slrn8oihvg.70d.swimmer@r2d2.gx.nl>
* Guenther Degenfelder <guenther.degenfelder@datev.de> wrote on
| Wed, 2 Aug 2000 16:45:39 +0200 :
| > I have to 'reconstruct' the fairly simple unix command
| > tail -f <file> | grep <pattern>
| > under Windows NT/DOS.
| > pipe construction show above supplies absolutely NO result on STDOUT !!!
|
| I have struggled a lot writing skripts that REALLY run on UNIX and WinXY...
|
| The problem is, that the '.pl'-files are 'connected' with the
| Perl-Interpreter by your file-explorer. If you type 'Scriptname.pl' Perl is
| startet with the Script and 'forks' away. The STDOUT of the Skript can't be
| reached...
|
| To avoid this 'effect' run your Skript with 'perl -S Scriptname
| >output.txt'.
Hoi Guenther,
absolutely great !!! Your hint with 'perl -S' did it!
Thanks a lot
Stefan
------------------------------
Date: Thu, 03 Aug 2000 12:39:29 GMT
From: mr_curmudgeon@my-deja.com
Subject: Re: splitting on spaces
Message-Id: <8mbp61$ksm$1@nnrp1.deja.com>
In article <slrn8oh2kg.6n1.abigail@alexandra.foad.org>,
abigail@foad.org wrote:
> It's the same thing when arriving at
> a party in progress, full of people unknown to you. You wouldn't
start
> tapdancing on a table with your pants down just because your
beerbuddies
> never complain about that.
Obviously you went to a private school.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 03 Aug 2000 14:00:30 GMT
From: Rich More <rmore1@my-deja.com>
Subject: Re: splitting on spaces
Message-Id: <8mbttq$or4$1@nnrp1.deja.com>
In article <8m4h6h$9ig$1@nnrp1.deja.com>,
emavres@my-deja.com wrote:
> Can anyone show me how to split a line that is seperated by spaces but
> not by the same amount of spaces?
>
> Example:
>
> "Hello how can I help you"
>
> I would like to get each word.
1) perl -e 'printf ":%s:\n",join(":",split(/ /,"This is a test"));'
:This:::is:a::::test:
2) perl -e 'printf ":%s:\n",join(":",split(" ","This is a test"));'
:This:is:a:test:
Split on " " is special behavior ( awk's really )
I'm assuming you want this.
=============================
Richard More
http://www.richmore.com/
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 03 Aug 2000 13:32:17 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: String to Integer
Message-Id: <soit3198dbm173@corp.supernews.com>
In article <39889236.F67B2838@netstorm.net>,
Jim Mauldin <mauldin@netstorm.net> wrote:
: Processing, please wait ...
: Scanning Greg Bacon posts ...
: Evaluating competency level ...
: Estimating ...
: Results for Greg Bacon:
: fustration level = 1
: probability of posting Perl Bowling no-op: .887
: Input name of next user: Larry Rosler\n
: Processing ... please wait ...
Where can I find a copy of that? :-)
Greg
--
Scope keeps symbol tables minty fresh.
-- DrForr
------------------------------
Date: 3 Aug 2000 00:21:16 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: stripping - ? html tags
Message-Id: <8maadc$bqr$1@orpheus.gellyfish.com>
On Wed, 02 Aug 2000 17:07:27 +0100 john kelly wrote:
> evenin all,
>
> im pretty new to perl and ive got to write this script that pulls text
> out of an HTML page.
>
> all the information is in a table - arranged like this....
> '<tr><td>some stuff to extract</td><td>some more</td><td>and
> more</td></tr>'
>
> it needs to come out looking like this...
>
> some stuff to extract
> some more
> and more
>
perldoc -q html
then
<http://www.gellyfish.com/htexamples/>
/J\
--
yapc::Europe in assocation with the Institute Of Contemporary Arts
<http://www.yapc.org/Europe/> <http://www.ica.org.uk>
------------------------------
Date: Thu, 03 Aug 2000 14:11:31 GMT
From: Rich More <rmore1@my-deja.com>
Subject: Re: stripping - ? html tags
Message-Id: <8mbuid$pb7$1@nnrp1.deja.com>
In article <8C0i5.17966$a61.852473@news-east.usenetserver.com>,
Andre van Straaten <andre@UltraShell.Net> wrote:
> For many purposes you can use the Lynx browser. It works also with
tables.
>
> The HTML parser modules should do the job, too. I never used them,
but on MS Windows this may fit
> better together than the solution with the Lynx browser (which is
also for MS OS's available).
> See a CPAN site for the HTML modules.
>
> -- avs
>
> john kelly <kellym36@drink.bt.co.uk> wrote:
> > evenin all,
>
> > im pretty new to perl and ive got to write this script that pulls
text
> > out of an HTML page.
>
> > all the information is in a table - arranged like this....
> > '<tr><td>some stuff to extract</td><td>some more</td><td>and
> > more</td></tr>'
>
> > it needs to come out looking like this...
>
> > some stuff to extract
> > some more
> > and more
>
> > currently i read the HTML into a long, single line string and ive
been
> > splitting it up
> > at the <td> tags, this is fine but i cant come up with an efficient
way
> > of
> > removing all the other tags ie<html></html>etc...
> > - something like -
> > $string =~ s/<( / or nothing)(not <td>)(anythingelse)>//g;
>
> > would do the job but im a bit slow so i can't figure out how to do
it.
> > -
http://search.cpan.org/doc/MSISK/HTML-TableExtract-
1.04/lib/HTML/TableExtract.pm
HTML::TableExtract is a subclass of HTML::Parser that serves to extract
the textual information from tables of interest contained within an
HTML document. The text from each extracted table is stored in tabe
state objects which hold the information as an array of arrays that
represent the rows and cells of that table.
Hope this helps.
--
=============================
Richard More
http://www.richmore.com/
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 03 Aug 2000 13:53:31 GMT
From: tim@degree.ath.cx (Tim Hammerquist)
Subject: Re: very cool routine
Message-Id: <slrn8oiut5.k4.tim@degree.ath.cx>
On Wed, 2 Aug 2000 17:24:47 -0600, Robin Bank <rbank@csf.edu> wrote:
>
> I'll add you to my list of geeks without a life who, knowing they're ugly as
> hell, spend the entire day (and night) hacking perl to impress other such
> geeks.
>
> I tend to avoid such people.
>
> In fact, I generally don't have to work too hard at it, since these hermit
> types hardly ever come out into the light of day where I may encounter them.
...oops! damn. landed in my killfile. s'ok; I weed through it every
month...
I saw the subsequent apology. It's not your mouthing off that got you
killfiled; everyone's entitled to bad days.
But what makes you so superior to the skilled coders and developers
who pay attention and RTFM? If that's a geek, go ahead and label me.
And you never know who the "geeks" are... We could be that old man who cut
you off last week. We could be that girl on the barstool that makes all the
guys drool in their beers. We could even be that punk skater that almost
knocked you into traffic. We could be _anyone_! *evil laugh* =)
On second thought, maybe I won't killfile you. You've just received a
second chance.
--
-Tim Hammerquist <timmy@cpan.org>
Love is the triumph of imagination over intelligence.
-- H. L. Mencken
------------------------------
Date: 3 Aug 2000 07:16:25 -0700
From: tchrist@perl.com (Tom Christiansen)
Subject: Re: What happened to $fh->input_record_separator ?
Message-Id: <398970a9$1@cs.colorado.edu>
In article <87u2d3km6w.fsf@achebe.perrins>,
Andrew J. Perrin <aperrin@demog.berkeley.edu> wrote:
>Okay... did I miss this in perldoc, or is it only in the dead-tree edition?
I don't use that embarrassingly nasty crudware. :-) But if you're
talking about the manpage, apparently no one bothered to explain
this. But trying to figure out anything through that labyrinth of
overly obfuscated gratuitously object(GENUFLECT)oriented crud is
challenging at best.
--tom
------------------------------
Date: Thu, 03 Aug 2000 09:45:36 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: What happened to $fh->input_record_separator ?
Message-Id: <39897780.780D8F7B@attglobal.net>
Tom Christiansen wrote:
>
>
> --tom
Wow.
------------------------------
Date: Wed, 2 Aug 2000 17:38:26 +0100
From: "Roland Corbet" <Roland@psychenet.co.uk>
Subject: Win32 ODBC BETA 21.12.1999 Returns No Results
Message-Id: <39884ea0.0@news.myratech.net>
Server: Win Nt 4.0/SP6a/IIS4
Perl: Active Perl Build 522
Perl Extension: .plx (ISAPI perl)
ODBC: Beta 21.12.1999 (Installed as per instructions with distribution)
Output from Win32::ODBC::Info():
Win32::ODBC extension for Win32 Perl
19991221
Dec 21 1999
Dave Roth
08:52:22
Copyright (c) 1996-1999 Dave Roth .
This version requires v5.005 (ActiveState) Win32 Perl.
ODBC.DLL
After installing the Beta module, scripts stopped outputting any values from
queries. Scripts that worked fine with the previous version (Default
distribution with 522) now fail to produce any output.
Insert and Update commands work fine, however a select command does not
return any results.
I have included a test script below and the output from when I ran it. If
anyone could have a look at this and find out what the problem is, I would
be very greatful.
I have found that when select statements run, they retrieve the correct
number of rows, however, there does not appear to be any data contained in
the rows.
As you will see from the HTML below, the data which should be displayed in a
table is not there, however, the correct number of rows for that query have
been returned.
To use the enclosed script, please substitute $DSN and $TABLE for values on
your system.
Many thanks in anticipation of your time and help,
Regards
Roland
----------------------------8<-------Script
Output-------------------------------------8<----------------------
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title></title>
<link href='../../../../csfm.css' rel='styleSheet' type='text/css'>
</head>
<body bgcolor="white" link='#ff9933' alink='#ff9900' vlink='#ff9900'
background='../../../../images/background.gif'>
Hello. Welcome to the ODBC Test<BR>Win32::ODBC extension for Win32
Perl<BR>19991221<BR>Dec 21 1999<BR>Dave Roth
<rothd@roth.net><BR>08:52:22<BR>Copyright (c) 1996-1999 Dave Roth
<rothd@roth.net>.<BR>This version requires v5.005 (ActiveState) Win32
Perl.<BR>ODBC.DLL<BR><TABLE BORDER>
<TR>
<TH>ID</TH><TH>Company</TH><TH>Title</TH><TH>Date</TH><TH>Article</TH></TR>
<TR></TR><TR></TR><TR></TR><TR></TR><TR></TR><TR></TR><TR></TR><TR></TR></TA
BLE>
----------------------------8<-------Script---------------------------------
----8<----------------------
#Modules
use Win32::ODBC;
#Database DSN
$DSN="TEST";
$TABLE = "NEWS";
#Enable look of pages to be controlled from one place.
sub HEADDER {
print "Content-type: text/html\n\n";
print "<html>\n";
print "<head>\n";
print "<meta http-equiv=\"content-type\"
content=\"text/html;charset=iso-8859-1\">\n";
print "<title>$TITLE</title>\n";
print "<link href='../../../../csfm.css' rel='styleSheet'
type='text/css'>\n";
print "</head>\n";
print "<body bgcolor=\"white\" link='#ff9933' alink='#ff9900'
vlink='#ff9900' background='../../../../images/background.gif'>\n";
}
#Open connection to specified DSN
sub OPENDB {
if (!($db=new Win32::ODBC($DSN))) {
print "Error connecting to $DSN\n";
print "Error: " . Win32::ODBC::Error() . "\n";
}
}
#Submit the prepared SQL statement to the Database.
sub SQL {
if ($SQL ne "") {
if ($db->Sql($SQL)) {
print "<p>SQL failed.\n<p>";
print "Error: " . $db->Error() . "\n<p>";
print "<p>The SQL Command that failed was: $SQL\n";
$db->Close();
}
}
}
#Display results in an HTML table.
sub DISTAB {
@ColumnNames = $db->FieldNames();
#print("columnames=@ColumnNames\n");
print "<TABLE BORDER>\n<TR>\n";
foreach $name (@ColumnNames){
print "<TH>$name</TH>";
}
print "</TR>\n";
while ($db->FetchRow()) {
@values = $db->Data;
print("<TR>");
foreach $var (@values) {
print("<TD>$var</TD>");
}
print("</TR>");
}
print("</TABLE>");
}
#Main
&HEADDER;
print "ODBC Test<BR>"; #Do a 'Hello world'
@DATA = Win32::ODBC::Info(); #Get Info about our ODBC
foreach $ITEM (@DATA) {
print "$ITEM<BR>";
}
&OPENDB; #Open connection to specified DSN.
$SQL = "select * from [$TABLE]"; #Prepare SQL stement.
&SQL; #Send SQL statement to Database.
&DISTAB; #Display results in Table.
$db->Close(); #Close connection to DSN.
undef($db); #Free up resource used by $db (should prevent leaking into
inetinfo.exe)
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 V9 Issue 3900
**************************************