[7533] in Perl-Users-Digest
Perl-Users Digest, Issue: 1160 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Oct 11 13:17:12 1997
Date: Sat, 11 Oct 97 10:00:24 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 11 Oct 1997 Volume: 8 Number: 1160
Today's topics:
2000 time problem <bremen@att.net.hk>
ANNOUNCE: DBD-Sybase 0.04 ALPHA <mpeppler@mbay.net>
ANNOUNCE: Net::DNS 0.12 (Michael Fuhr)
Announce: Novell NDS module <Steinar.Kleven@ahs.hist.no>
ANNOUNCE: sybperl 2.08 <mpeppler@mbay.net>
ANNOUNCE: Tom-2.00 FinalBeta <jduncan@epitome.hawk.igs.net>
Best way to comma seperate a number? (Tony Bowden)
Re: Best way to comma seperate a number? (Tad McClellan)
Re: Best way to extract array elements, modify, store r (Tony Bowden)
Re: can Perl do this? <shimpei@socrates.caltech.edu>
Re: can Perl do this? (Tad McClellan)
Re: Help! (Tad McClellan)
Re: html2text <merlyn@stonehenge.com>
Re: map in void context (was Re: $x = $y || $z - danger (Chip Salzenberg)
Merging Values <a-grayson@nwu.edu>
Re: MIME Header "Location:" <russ@mail.org.uk>
Re: Net::Ftp on solaris 2.6 (Simon Lee)
Re: Net:FTP Binary file transfer question. <toml@synnet.com>
Redirect as hidden value in form (Freddie Fernbrant)
Re: SOLUTION: Are there problems using back quotes on W <david_ransier@intercept.com>
Re: web-based mail reader in perl? (John Armsby)
Re: Where is perl/Tk for Win32 <russ@mail.org.uk>
xisofs v1.3 Perl/Tk interface to mkisofs/cdwrite/cdreco (The Pariah)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 11 Oct 1997 18:01:51 +0800
From: Bremen Lee <bremen@att.net.hk>
Subject: 2000 time problem
Message-Id: <343F4E8F.73D7@att.net.hk>
Hi,
I try to use ctime and localtime to generate the time in Win32 Perl.
I found that it will output wrong date when I set my win95 to 2050.
Do you know is there any other way to generate correct date??
If you have suggestion, please email me at bremenlee@attmail.com.
Cheers,
Bremen
------------------------------
Date: 11 Oct 1997 16:35:17 GMT
From: Michael Peppler <mpeppler@mbay.net>
Subject: ANNOUNCE: DBD-Sybase 0.04 ALPHA
Message-Id: <61o9s5$l4k$1@news1.teleport.com>
I have uploaded DBD::Sybase 0.04 to PAUSE, and it should reach
your local CPAN mirror today or tomorrow.
DBD::Sybase is a DBI driver for accessing Sybase databases from perl,
and can also be used to access MS-SQL databases from Unix hosts
provided that the Sybase OpenClient libraries are available.
A freeware port of OpenClient Clien Library is available for Linux.
This is an ALPHA release with fairly complete functionality, but not
a whole lot of testing, so please use with care, and contact me
with any problems.
Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler@datamig.com -||- http://www.mbay.net/~mpeppler
------------------------------
Date: 11 Oct 1997 16:31:44 GMT
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: ANNOUNCE: Net::DNS 0.12
Message-Id: <61o9lg$l1t$1@news1.teleport.com>
Net::DNS is a module for making DNS queries from a Perl script. Here
are the significant new features in version 0.12:
* TCP queries.
* Timeouts for TCP queries (including zone transfers).
* Workaround for a problem with some Perl 5.003_* versions (e.g.,
5.003_07, included with some Linux distributions).
* Other minor improvements and bug fixes (see the Changes file for
details).
* New & updated contributed scripts.
Net::DNS 0.12 is making its way around CPAN; you can also get it
from the author's homepage:
http://www.dimensional.com/~mfuhr/perldns/
Thanks to all who reported problems, asked questions, made suggestions,
and donated scripts!
--
Michael Fuhr
http://www.dimensional.com/~mfuhr/
------------------------------
Date: 11 Oct 1997 16:32:46 GMT
From: Steinar Kleven <Steinar.Kleven@ahs.hist.no>
Subject: Announce: Novell NDS module
Message-Id: <61o9ne$l2l$1@news1.teleport.com>
Hi all.
I'm developing a module for manipulation of the data stored in Novell
NDS (r)(tm)
Is anyone else working with the same???
The module is in pre pre pre BETA stage and I take NO responsibility for
what it does to the environment where it's used.
Tested features in beta: Delete/Modify ANY *string* attribute of ANY
object in the NDS tree. You must have sufficent rights.
The API to this module isn't good at all (direct C-call, no .pm methods)
and you should expect a rewrite to perl classes in the near future.
"Why do you inform perl users about this binary cludge?, I've got
Novells UIMPORT, and LIKES it".
I inform the perl comunity this early because I want tips on what YOU
want included.
And does anyone need such a module at all. ?????
The current beta is binary only (can't show you all the bugs in src),
and is compiled for use with MS NT and the Standard perl port to NT
(ver 5.004.02)
If you want to try it, come and get it for FREE.
And remember, I want your opinion about this ongoing work!!
You can reach me at Steinar.Kleven@ahs.hist.no.
NDSm url: http://www.ahs.hist.no/~stk/NDSm/
------------------------------
Date: 11 Oct 1997 16:34:55 GMT
From: Michael Peppler <mpeppler@mbay.net>
Subject: ANNOUNCE: sybperl 2.08
Message-Id: <61o9rf$l3q$1@news1.teleport.com>
I have just uploaded sybperl 2.08 to CPAN, and it will wind its way
to your local CPAN mirror in a day or two.
2.08 is mainly a bug fix release, with a couple of new features in
Sybase::DBlib to offer better support for large TEXT/IMAGE data
items.
>From the CHANGES file:
2.08 New Features:
Added dbpreptext(), dbreadtext(), dbmoretext(), dbsqlok()
and force_dbclose() to Sybase::DBlib.
Added dbspid() to Sybase::DBlib
Bug Fixes
Made some code adjustments to silence some perl 5.004
warnings.
Finally fixed the "'rpcInfo' is not a valid Sybase::DBlib
attribute" bug...
Fixed DBSETLPACKET() macro definition (for pre-system 10
libraries).
Fixed ct_config() so that integer values can be set and
retrived. This implied adding a 'type' argument which defaults
to CS_CHAR_TYPE, but must be set to CS_INT_TYPE if integer
values are passed or retrieved.
Fixed dbclose() in Sybperl.pm to *really* close connections.
Renamed config to config.pl to avoid problems under Win/NT.
ct_fetch() added an extra \0 at the end of TEXT/IMAGE data.
Fixed a reorder bug in BCP.pm.
Fixed Sybase::CTlib::ct_sql() to set $dbh->{RC} to CS_FAIL
when an error occurs in the processing.
Sybase::DBlib::dbrpcxxx() calls where not returning any success
or failure information.
Sybase::CTlib::ct_col_types() returns CS_INT_TYPE for all
integer
types.
I have also updated the documentation and the FAQ, both of which
are available now on my homepage, along with the 2.08 release
(http://www.mbay.net/~mpeppler).
I've released this now because I intend to make some deeper changes
for 2.09 to improve performance (I was slightly miffed that
DBD::Sybase is quite a bit faster that Sybase::CTlib SELECTs on wide
tables, so I'm going to work on that...)
Here is the info from PAUSE:
The uploaded file
sybperl-2.08.tar.gz
has been added to PAUSE as
file: $CPAN/authors/id/MEWP/sybperl-2.08.tar.gz
size: 135046 bytes
md5: 65838a2e8d04f451e1d2dbaacba316fc
No action is required on your part
Request entered by: MEWP (Michael Peppler)
Request entered on: Tue, 07 Oct 1997 17:48:01 GMT
Request completed: Tue, 07 Oct 1997 17:49:01 GMT
Virtually Yours,
Id: paused,v 1.32 1997/09/20 15:43:26 k Exp k
Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler@datamig.com -||- http://www.mbay.net/~mpeppler
------------------------------
Date: 11 Oct 1997 16:36:25 GMT
From: James Duncan <jduncan@epitome.hawk.igs.net>
Subject: ANNOUNCE: Tom-2.00 FinalBeta
Message-Id: <61o9u9$l7h$1@news1.teleport.com>
TOM - The Transportable Object Model
------------------------------------
- final beta is now available.
TOM allows you to transport perl objects between different systems without
requiring that the class exists on any particular system.
TOM is also being designed as a base for Agent type systems in perl, and
more specifically the new Agent module, of which information is available
from http://www.engsoc.carleton.ca/~spurkis/Agent.shtml.
The project web page for TOM and download information is available at the
following url:
http://www.hawk.igs.net/~jduncan/Tom/
In addition, there is a mailing list suitible for discussing Tom or any
other agent related system in perl - the Perl5-Agents mailing list. To
subscribe send mail to: perl5-agents-request@daft.com with the text:
subscribe <your@email.address>
List traffic is very light, and is handled via the address
perl5-agents@daft.com
The README file enclosed in the TOM distribution follows.
Regards,
James.
--
James Duncan || jduncan@hawk.igs.net
IGS Hawkesbury Systems Administrator
Phone 613-632-4075 Fax 613-632-8137
web http://www.hawk.igs.net/~jduncan
---
Transportable Object Model (TOM) Kit for Perl
Version 2.00
( FinalBeta )
Copyright (c) 1997, James Duncan
This program is free software; you can redistribute it and/or modify
it under the terms of either:
a) the GNU General Public License as published by the Free
Software Foundation; either version 1, or (at your option) any
later version, or
b) the "Artistic License" which comes with this kit.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either
the GNU General Public License or the Artistic License for more details.
You should have received a copy of the Artistic License with this kit,
in the file named "Artistic". If not, you can get one from the Perl
distribution. You should also have received a copy of the GNU General
Public License, in the file named "Copying". If not, you can get one
from the Perl distribution or else write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
TOM Kit, Version 2.0 (Beta 4 final)
-----------------------------
This, the newest version of the TOM (Transportable Object Model) features an
enhancement significant enough over the original, as to warrant a new major
version.
TOM allows you contain objects within a TOM object. This TOM object can
then be flattened into a general container which can be passed from machine
to machine. The objects stored inside the container will run on any perl
machine, provided the Tom module is installed there.
Improvements over beta 3 are subtle improvements with mostly background
devices that do not affect the user of the module.
There is however, (I wouldn't want to disapoint you), a major new feature in
the insert method. If you have not declared any functions inside the TOM
container, the container will search your @INC path, and try to
automagically create a TOM container from whichever module the object
belongs to. Of course this doesn't work with anything that requires XS, or
anything that requires anything else. I am working on a traverse-type
feature to the Tom::cc method, so it will follow 'use' statements. However,
this won't really be practical until the multiclass work has been finished,
which brings me to another point.
Tom::Multiclass will be released later on, as a seperate distribution. Tom
is getting complicated enough, without worrying about a recursive cc for
now.
This is the *final beta*. The API is frozen. In case of major problems, it
could be altered, but I don't forsee any (famous last words) - in the case
of any smaller problems the fixes will be made in later releases.
A mailing list out there is appropriate for discussing Tom. Subscribe to
perl5-agents-request@daft.com using the standard subscribe fred@foobar.com
syntax. You can send mail to the list at perl5-agents@daft.com.
Changes since Beta 3
--------------------
+ Tom makes sure any inserted object belongs to the class contained within
the Tom object.
+ Added documentation for the 'methods' method.
+ AutoInsertModuleCompile (for want of a better name) now works.
+ Some methods are protected with my protect module
(from .../CPAN/authors/id/JDUNCAN/)
+ Tom only optionally exports both 'cc' and 'repair'. This is because
Tom::Multiclass will also optionally exports 'cc' and 'repair'.
+ Smarter Makefile.PL - informs you if Tom will or will not work with
the current system configuration.
+ test suite available.
+ added a HINTS file to explain some ways of getting the most out of Tom.
+ killed the network stuff - the liklihood of anyone using such a primitive
wrapper around IO::Socket is a) not very, and b) useless anyway.
+ perl5.004 required.
+ Tom should now run under strict, however, it is not recommended, as other
peoples non-strictsafe code will cause errors.
+ Added a MODULES file which lets you know what modules you'll need and
where to get them.
+ Tom::MultiClass will be released later on, in a seperate distribution.
------------------------------
Date: 11 Oct 1997 12:45:19 GMT
From: tony@crux.blackstar.co.uk (Tony Bowden)
Subject: Best way to comma seperate a number?
Message-Id: <61nscv$lg3$1@sparc.tibus.net>
Hi,
What would be the best way to turn a number in a comma seperated version
for printing?
e.g. 1029 -> 1,029 12930233 -> 12,930,233 etc.
The best I can come up with is:
$number = reverse($number);
$number =~ s/(...)/$1,/g;
$number = reverse($number);
(and even then you'd need to chop any leading commas in case of strlen being
a multiple of 3)
but I'm sure there must be a better way...
I just can't find a way of matching from the right rather than the left.
(if it's in the FAQ then I've missed it, cos I have checked ...)
Tony
--
-----------------------------------------------------------------------------
Tony Bowden | tony@tmtm.com / NooNoo@teletubbies.org / http://www.tmtm.com/
Belfast, NI | I hang like the colors on a blind man's clothes
-----------------------------------------------------------------------------
------------------------------
Date: Sat, 11 Oct 1997 08:49:38 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Best way to comma seperate a number?
Message-Id: <i50o16.301.ln@localhost>
Tony Bowden (tony@crux.blackstar.co.uk) wrote:
: What would be the best way to turn a number in a comma seperated version
: for printing?
I would do it they way that is described in the Perl FAQ.
: but I'm sure there must be a better way...
You are right.
: I just can't find a way of matching from the right rather than the left.
: (if it's in the FAQ then I've missed it, cos I have checked ...)
-----------------
Perl FAQ, part 5:
"How can I output my numbers with commas added?"
-----------------
Thank you for checking. That's what you are supposed to do.
You, sir, are a good Usenet citizen.
It was pretty easy for me to find though.
How do you go about it when you check the FAQ?
Here is how I find out perl stuff whenever I have a question,
(maybe it will help you to get answers to Perl questions in seconds
instead of hours too):
Word search in all the *.pod (Plain Old Documentation) files that are
shipped with the perl distribution.
'comma' finds 414 lines - Blech!
'comma', excluding 'command' finds 73 lines - Not too bad, I could scan
that in a just minute or two
But, since this particular question is likely in the FAQ rather than
the regular man pages, I'd restrict the search to only the FAQ pod files:
'comma' finds 41 lines - Not bad at all
'comma', excluding 'command' finds 8 lines - Hey! There's the answer.
That whole sequence got me the answer in about 3-4 minutes, then I would
have returned to productive programming and my boss would wonder how I
knew so much about Perl ;-)
--
Tad McClellan SGML Consulting
tadmc@flash.net Perl programming
Fort Worth, Texas
------------------------------
Date: 11 Oct 1997 17:04:13 GMT
From: tony@crux.blackstar.co.uk (Tony Bowden)
Subject: Re: Best way to extract array elements, modify, store resulting list?
Message-Id: <61obid$4fe$1@sparc.tibus.net>
Randal Schwartz (merlyn@stonehenge.com) wrote:
: Cool! Another one like this:
: %headers = map /^(\S+):\s+(.*)/, @news_posting;
Cool indeed.
But, how would you best split the news_posting to headers and body?
Say for instance I wanted to write something which showed me only a
couple of headers from the news_posting and then the body?
When I was reading to @news_posting in the first place, would I make the
read a two stage process:
while (<IN>) { last if (/^$/); push (@header,$_); }
while (<IN>) { push (@body,$_) }
and then do the:
%headers = map /^(\S+):\s+(.*)/, @header;
or is there a way to work this into the map in the first place so that
a 'match' goes to one array and non-matches go to another?
Tony
--
-----------------------------------------------------------------------------
Tony Bowden | tony@tmtm.com / NooNoo@teletubbies.org / http://www.tmtm.com/
Belfast, NI | where's a policeman when you need one to blame the colour TV?
-----------------------------------------------------------------------------
------------------------------
Date: 11 Oct 1997 11:14:58 GMT
From: Shimpei Yamashita <shimpei@socrates.caltech.edu>
Subject: Re: can Perl do this?
Message-Id: <61nn3i$5ae@gap.cco.caltech.edu>
Tad McClellan <tadmc@flash.net> writes:
>: How would I go about writing this program?
>
>Start at the beginning, proceed to the middle, and finish at the end ;-)
>
>Learn how to program in Perl, and then write a Perl program that
>does what you want.
I disagree completely. How are you ever going to learn how to write
Perl programs if you don't write some? And if you're going to write
some, you might as well write ones that (try to) do what you want. It
would be one thing if this person was trying to write an OS in perl or
something, but I doubt parsing syslogs is so complicated that Perl
beginners (especially those who know another programming language)
wouldn't be able to figure out how to do it [1] after reading the
introductory chapter in the Llama book. It probably will take quite
a while for it to work, but that's part of the learning process.
[1] Doing it 100% correctly, of course, is probably difficult even for
experts, but it shouldn't be too hard to do it mostly right.
--
Shimpei Yamashita <http://www.patnet.caltech.edu/%7Eshimpei/>
------------------------------
Date: Sat, 11 Oct 1997 07:01:46 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: can Perl do this?
Message-Id: <arpn16.pk.ln@localhost>
Shimpei Yamashita (shimpei@socrates.caltech.edu) wrote:
: Tad McClellan <tadmc@flash.net> writes:
: >: How would I go about writing this program?
: >
: >Start at the beginning, proceed to the middle, and finish at the end ;-)
: >
: >Learn how to program in Perl, and then write a Perl program that
: >does what you want.
: I disagree completely.
The way I read it, you do not disagree at all.
: How are you ever going to learn how to write
: Perl programs if you don't write some? And if you're going to write
: some, you might as well write ones that (try to) do what you want. It
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
There is my "write a Perl program that does what you want" part.
: would be one thing if this person was trying to write an OS in perl or
: something, but I doubt parsing syslogs is so complicated that Perl
: beginners (especially those who know another programming language)
: wouldn't be able to figure out how to do it [1] after reading the
^^^^^^^^^^^
: introductory chapter in the Llama book. It probably will take quite
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There is my "Learn how to program in Perl" part.
I didn't say how _much_ Perl to learn. Learn a little for a simple job,
learn more for a harder job ;-)
: a while for it to work, but that's part of the learning process.
Or do you disagree with the beginning -> middle -> end progression part?
;-)
--
Tad McClellan SGML Consulting
tadmc@flash.net Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 11 Oct 1997 06:55:41 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Help!
Message-Id: <tfpn16.9k.ln@localhost>
[ Please put an actual subject in your Subject header. Many people will
never read an article whose subject they cannot discern before reading.
You don't want people to skip reading your article, do you?
]
John (u1436039@csi.uottawa.ca) wrote:
: We are beginners with PERL and we need to write a program to make search
: for a certain string.
: Actually, we started to use the Command " m // " but we just figured
: out how to find such a string as the following situation:
: string : word1 and word2 or word3
: | |____ Boolean
: opreator
: |______Boolean operator
: we used the following command:
: print if m/word1.*word2|word2.*word1|word3/
: We need to write a string ( query ) like this:
: print lines with word1 and word2 or word3 andnot word4
You don't have any grouping there.
You have not told us what precedence those operators should have.
So it is an ambiguous query.
It might be one of the below (or it might not...)
perl -ne 'print if (/word1/ && (?:word2|word3) && $_ !~ /word4/)' files...
perl -ne 'print if (/word1/ && /word2/ || /word3/ && $_ !~ /word4/)' files...
perl -ne 'print if ((/word1/ && /word2/) || (/word3/ && $_ !~ /word4/))' files...
...
--
Tad McClellan SGML Consulting
tadmc@flash.net Perl programming
Fort Worth, Texas
------------------------------
Date: 11 Oct 1997 08:18:26 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: Eli the Bearded <usenet-tag@qz.little-neck.ny.us>
Subject: Re: html2text
Message-Id: <8cu3eoz5tp.fsf@gadget.cscaper.com>
>>>>> "EtB" == Eli the Bearded <usenet-tag@qz.little-neck.ny.us> writes:
EtB> This is a script I proposed recently for someone who wanted a
EtB> one liner to strip HTML:
EtB> perl -MHTML::Parse -MHTML::FormatText -0777e '$f=new HTML::FormatText;print $f->format(parse_html(<>))'
EtB> There is probably some trick I am overlooking to shorten that.
Well, you can combine two of the steps and save yourself a variable:
perl -MHTML::Parse -MHTML::FormatText -0777e \
'print HTML::FormatText->new->format(parse_html(<>))'
Chained methods are cool. :-)
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 325 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 10 Oct 1997 15:43:45 -0400
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: map in void context (was Re: $x = $y || $z - dangerous assumption?)
Message-Id: <61m0hh$e3k$1@cyprus.atlantic.net>
According to Randal Schwartz <merlyn@stonehenge.com>:
>In the current implementation, the body of foreach is always doing
>less work than the body of map. [...]
>
>However, a foreach (as opposed to a foreach my) has to localize the
>control variable.
I think that aspect is a wash. Even lexical control vars are
"localized" in that their value is saved and restored. I'd be
surprised to see lexical control vars much faster than globals.
>A void use of grep, on the other hand, is relatively fast, because
>it's merely building a simple array from the scalars of the list being
>scanned (not from a newly created expression).
Quite. Specifically, while map needs to create a new list elsewhere
and then copy it to the stack, grep just works with the list while
it's still on the stack: keep this, toss that, keep the other...
But then, foreach doesn't even have to do *that*.
So I agree that the speed order is likely to be: foreach, grep, map.
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
"He's Mr. Big of 'Big And Tall' fame." // MST3K
------------------------------
Date: Fri, 10 Oct 1997 23:20:36 -0500
From: Adam <a-grayson@nwu.edu>
Subject: Merging Values
Message-Id: <343EFE93.5FACC7C1@nwu.edu>
If you have two string values (i.e. $valueone = 99 and $valuetwo = 11),
can they be merged anyway so that $valuethree = 9911?
Any answer would be much appreciated.
Thanks
Adam Grayson
P.S. If possible, please reply via e-mail as well as posting a reply to
the newsgroup. Thanks.
------------------------------
Date: Fri, 10 Oct 1997 13:20:11 +0100
From: Russell Odom <russ@mail.org.uk>
Subject: Re: MIME Header "Location:"
Message-Id: <343E1D7B.C5AD7ED8@mail.org.uk>
[comp.lang.perl removed from header]
Martien Verbruggen wrote:
>
> In article <3432705C.9F87651E@mail.org.uk>,
> Russell Odom <russ@mail.org.uk> writes:
> >
> > I think it this may be because some browsers don't recognise the
> > 'Location:' header, they need 'URI:' (which is apparently the official
> > header). Use the CGI module, it now produces both.
>
> Off topic,
True. I've now slapped myself on the wrist. :-)
> and wrong information.
Maybe...
> If a browser doesn't recognise the
> Location header field, and needs some made up URI header field
> instead, it is not HTTP/1.0 or HTTP/1.1 compliant.
In that case, I either misunderstood the docs completely, and am very
stoopid, or the docs for CGI.pm are wrong. From 'perldoc cgi':
GENERATING A REDIRECTION INSTRUCTION
print $query->redirect('http://somewhere.else/in/movie/land');
redirects the browser elsewhere. If you use redirection like
this, you should not print out a header as well. As of version
2.0, we produce both the unofficial Location: header and the
official URI: header. This should satisfy most servers and
browsers.
> sorry for wasting bandwidth. felt I had to correct the mistake.
Ditto.
Later,
Russ
---------------------------------------------------------------------
--[ R u s s e l l O d o m ]---[ *NEW:* mailto:russ@mail.org.uk ]--
--[ University of York, UK ]---[ http://www.york.ac.uk/~rjo100/ ]--
---------------------------------------------------------------------
--[ FAQ maintainer, news:comp.os.ms-windows.win95.moderated ]--
---------------------------------------------------------------------
------------------------------
Date: Sat, 11 Oct 1997 12:41:00 GMT
From: simon_lee~NoSpam~@super.zippo.com (Simon Lee)
Subject: Re: Net::Ftp on solaris 2.6
Message-Id: <343e6600.1733722@snews.zippo.com>
I've fixed it now.
The .ph file's went in the wrong place.
;)
------------------------------
Date: Wed, 08 Oct 1997 08:20:53 -0400
From: Tom Lynch <toml@synnet.com>
To: Mike S <mshavel@erols.com>
Subject: Re: Net:FTP Binary file transfer question.
Message-Id: <343B7AA5.6D29@synnet.com>
Mike S wrote:
>
> Hi
>
> I have gotten Net::FTP to work very well except for one thing.
> I can't seem to transfer the files in binary mode.
> I tried $ftp->type("binary") to no avail.
> Anyone know how to do this? Thanks very much for the advice.
>
> Mike
>
> mshavel@erols.com
Try:
$ftp->binary() || die "Cannot set BINARY mode: $!";
Tom
--
#--------------------------------------------------------------+
# Tom Lynch | Email: toml@synnet.com |
# Switching Division | Phone: (508)-264-1443 |
# 3COM Corporation | Fax : (508)-264-1418 |
# 80 Central Street | MS : MA#35 |
# Boxborough, Massachusetts | Zip : 01719 |
#--------------------------------------------------------------+
------------------------------
Date: Sat, 11 Oct 1997 17:29:14 GMT
From: freddie@helsingborg.se (Freddie Fernbrant)
Subject: Redirect as hidden value in form
Message-Id: <343fb4a4.12619256@nntpserver.swip.net>
Hi eveyone.
I am fairly new to Perl and have a redirection question (I know many do :) ).
I know how to redirect a page, it is not that. The program is that my script somehow gets ALL the vaules from
my form page (HTML) except it only seems to get 2 HIDDEN values. Then it skips to the "real" thing.
I use this in my form.
<FORM ACTION="/cgi-bin/form/form.pl" METHOD=POST>
<INPUT TYPE=hidden NAME="recipient" VALUE="name@domain.com">
<INPUT TYPE=hidden NAME="subject" VALUE ="WWW Form"
<INPUT TYPE=hidden NAME="redirect" VALUE = "http://xxx.xx.xxx.xx/something/something.html">
and I use this perl code:
read(STDIN, $namevalues, $ENV{'CONTENT_LENGTH'});
@namevalues = split(/&/, $namevalues);
foreach $namevalue (@namevalues) {
($name, $value) = split(/=/, $namevalue);
$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/<!--(.|\n)*-->//g;
$INPUT{$name} = $value;
if ($name =~ /^recipient$/i) { $recipients = $value; }
if ($name =~ /^email$/i) { $knownsender = $value; }
if ($name =~ /^name$/i) { $submitter_name = $value; }
if ($name =~ /^subject$/i) { $subject = $value; }
if ($name =~ /^redirect$/i) { $redirect = $value; }
}
print "Location: $redirect\n\n";
I have printed the results of the processing above and it gets ALL the vaules except the 3rd HIDDEN value. In
this case, redirect. It totally skips that.
If I erase the "hidden" subject, it gets all the values. So it just seems as if the script gets two hidden
values and ignores the rest. OR, the browser does not send all the info in this case.
Can anyone help me?
Thanks a lot!!
Freddie Fernbrant
freddie@myself.com
------------------------------
Date: 11 Oct 1997 16:27:55 GMT
From: "David Ransier" <david_ransier@intercept.com>
Subject: Re: SOLUTION: Are there problems using back quotes on Win95?
Message-Id: <01bcd662$64da79f0$714b62c7@itibit>
I finally figured out the problem. I'm guessing its due to the differences
in the WinNT and Win95 command shells.
The problem is how each command shell uses the slashes ( both "/" and "\")
inside the back quotes.
Here are two examples of a perl code, both work on WinNT but the second
fails on Win95.
$result = `dir \\perl\\bin`; # works on WinNT and Win95
$result = `dir /perl/bin`; # ONLY works on WinNT
Thanks,
David R
David Ransier <david_ransier@intercept.com> wrote in article
<01bcd5e1$31578b30$714b62c7@itibit>...
>
> Are there problems using back quotes on Win95?
>
> I have written some Perl programs that run fine on Unix (version 5.004)
and
> WinNT (Both ActiveState and the Gurusamy Surathy port).
>
> I seem to be having a problem on Win95 with statements like:
>
> $var = `command shell command goes here`;
>
> $var does not get any return values.
>
> I've looked through the FAQ and scanned Learning Perl on Win32 book. I
> can't find anything that says it behaves different between Win95 or
WinNT.
>
> Any ideas?
>
> Thanks,
> David R
>
>
> ------------------------------------------------------------------------
> _/_/_/ _/_/_/_/_/ _/_/_/ David M. Ransier
> _/ _/ _/ Senior Consultant
> _/ _/ _/ Intercept Technology Inc.
> _/ _/ _/ David_Ransier@Intercept.com
> _/ _/ _/ 503-692-0111 www.intercept.com
> _/_/_/ _/ _/_/_/ 503-691-9535 (fax)
> 404-352-0111 (Corp Headquarters)
>
>
------------------------------
Date: Sat, 11 Oct 1997 14:23:44 GMT
From: jaws@atl.mindspring.com (John Armsby)
Subject: Re: web-based mail reader in perl?
Message-Id: <61o2ea$4m5@camel19.mindspring.com>
Try going to a bookstore and browsing the Perl books. I believe I saw
the code (with CD) in either the Perl for Dummies book or the SAMS
Learn Perl in 21 days.
John
darrellb@hhcl.com (darrel berry) wrote:
>Looking for a free/shareware www-based mail client (sendmail/pop)
>written in perl...i've seen a few commercial offereings, but i bet
>there's something better out there with a GNU license ;-)
>looking for basic funtionality only, really (compose/read/reply/delete
>messages)
>any ideas?
>pls email replies
------------------------------
Date: Fri, 10 Oct 1997 13:08:32 +0100
From: Russell Odom <russ@mail.org.uk>
Subject: Re: Where is perl/Tk for Win32
Message-Id: <343E1AC0.E1A024D4@mail.org.uk>
Tony Baldassare wrote:
>
> In article <609lfu$6fg$1@204.179.92.76>, youngej@magpage.com wrote:
> :>Weihan Chang wrote:
> :>>
> :>> I saw someone mentioned about a version of perl/Tk on Win32(Windows
> :>> NT). Does anyone know where I can get a binary copy ?
> :>
> :>ftp://ftp.sedl.org/pub/mirrors/CPAN/ports/win95/Standard/x86/
> :> perl5.00402-bindist04-bc.tar.gz (5014 Kb)
> :>
> :>This excellent binary distribution of perl 5.004_02 by
> :>Gurusamy Sarathy (Just Another Perl Porter)
> :>includes perl/TK for Win32. Install this version, get your PATH set,
> :>then run widget for a perl/TK widget demonstration that is more or less
> :>the same as the TCL/TK demo (not to mention very impressive)...
>
> Excellent binary distribution ???
> Isn't that the SPUDIEST distribution which doesn't install in Windows 95
> just because it considers lowercase and uppercase filenames differently ?
Nope, it isn't. I've been using it on Win95 for a while now, no problems.
Definitely recommended.
HTH,
Russ
---------------------------------------------------------------------
--[ R u s s e l l O d o m ]---[ *NEW:* mailto:russ@mail.org.uk ]--
--[ University of York, UK ]---[ http://www.york.ac.uk/~rjo100/ ]--
---------------------------------------------------------------------
--[ FAQ maintainer, news:comp.os.ms-windows.win95.moderated ]--
---------------------------------------------------------------------
------------------------------
Date: 11 Oct 1997 16:34:15 GMT
From: pariah@netcomuk.co.uk (The Pariah)
Subject: xisofs v1.3 Perl/Tk interface to mkisofs/cdwrite/cdrecord
Message-Id: <61o9q7$l3e$1@news1.teleport.com>
xisofs v1.3
===========
xisofs is a Perl/Tk interface to mkisofs and cdwrite/cdrecord
tested under linux). It will allow you to create ISO9660 filesystems
and write them to a supported CDR device from within the same GUI.
The ISO9660 filesystems can also be written directly to a CDROM from
Windows programs such as Elektrosons Gear.
Note that cdrecord is supported under SunOS and Solaris.
Available from:
ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-
authors/Steve_Sherwood
http://www.netcomuk.co.uk/~pariah/
Features:
o Full GUI with tool bar, and context sensitive help
o Supports all features of mkisofs v1.11
o Supports most features of cdwrite 2.0
o Supports most features of cdrecord 1.4
o Allows projects to be saved and loaded
o User definable defaults for copyright messages etc.
o Free (Under the GNU Public Licience)
Requires (ie not supplied) :
o Perl 5.004
o Ptk 400.202
o mkisofs v1.11
o cdwrite v2.0 / cdrecord 1.5 (optional - needed to burn CDRs)
HISTORY
=======
xisofs v1.3
-----------
New Features:
+ Used Bubble help instead of balloon help. More reliable.
+ Added auto search for perl executable in install script
+ Added support for cdrecord v1.5
+ Enhanced Console Window's handling of CR characters
oops:
- 4 xpm files had binary rubbish on the end (Added by XV). Removed.
- Fixed problem with selection of CD writer software
xisofs v1.2
-----------
New Features:
+ Added support for cdrecord v1.4
+ Updated installation script.
oops:
- Didn't correctly append iso9660 image to cdwrite command line. Fixed.
xisofs v1.1
-----------
New Features:
+ Added support for cdwrite 2.0
+ Added icon bar with balloon help
+ Added status bar
xisofs v1.0
-----------
This was the initial version, written to make mkisofs easier to use.
Features:
+ GUI Interface via Perl/Tk 400.202
+ Supports all mkisofs parameters
+ Allows Defaults of fields to be saved
+ Allows 'projects' to save loaded/saved
+ Context sensitive help for most items by B3 clicking
Last Updated : 5th October, 1997
Steve Sherwood (pariah@netcomuk.co.uk)
--
Just like Pariah I have no name, Living in a blaze of obscurity
Need courage to survive the day....
Steve Sherwood <pariah@netcomuk.co.uk>
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 1160
**************************************