[8929] in Perl-Users-Digest
Perl-Users Digest, Issue: 2547 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat May 9 15:07:32 1998
Date: Sat, 9 May 98 12:00:32 -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, 9 May 1998 Volume: 8 Number: 2547
Today's topics:
"Dynamic" forms--Perl question <fred.r.cronkhite@erols.com>
Re: CPAN & Module gripes (was Re: Ever Wonder...?) lvirden@cas.org
Re: CPAN & Module gripes (was Re: Ever Wonder...?) lvirden@cas.org
Re: CPAN & Module gripes (was Re: Ever Wonder...?) lvirden@cas.org
Re: CPAN & Module gripes (was Re: Ever Wonder...?) (Stuart McDow)
Re: Creating computer account (Steven Wayne)
Re: Does Perl have a IDE?I don't like command line. scott@softbase.com
Re: grep question from newbie <jdf@pobox.com>
Re: Grieving our dying community (Stuart McDow)
Re: Help! This is drivin me nuts (rob zimmerman)
Help, I can't figure this one out <mskimin@centuryinter.net>
Re: Help, I can't figure this one out <sowmaster@juicepigs.com>
Re: How old is Perl? (Michael Stillwell)
Re: How old is Perl? <tchrist@mox.perl.com>
HTML::FormatText & parse_html - Doesn't work with table <ben@wallroyds.demon.co.uk>
Re: HTTP Request Headers <boyns@sdsu.edu>
Re: Logic of split() ? (Steven Wayne)
Missing perldoc (was: Re: Logic of split() ?) <rootbeer@teleport.com>
Re: MODULE MANIA STRIKES (Was Re: What does this do?) <upsetter@shore.net>
mSQL <---> MSAccess <ptrainor@bbn.com>
Re: Multiline substitution from command line in Perl 4. (Tad McClellan)
Re: QRe: == vs. eq <due@murray.fordham.edu>
Total Object Uselesness (Chris Nandor)
Re: Unable to use CPAN.pm through firewall lvirden@cas.org
Re: Using frames in perl: How to select target (Peter Caffin)
What does a bitwise do? <due@murray.fordham.edu>
Re: What does a bitwise do? <due@murray.fordham.edu>
Re: What does a bitwise do? (James Ludlow)
Re: What does a bitwise do? <due@murray.fordham.edu>
Re: Win95 Perl scripts DONT WORK on UNIX <toby@utobia.demon.co.uk>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 09 May 1998 14:52:01 -0400
From: "Fred R. Cronkhite" <fred.r.cronkhite@erols.com>
Subject: "Dynamic" forms--Perl question
Message-Id: <3554A5D1.E03@erols.com>
Fred C wrote:
I'm new, but not a novice with writing perl scripts. I have "on the
fly" perl for creating forms. However, I cannot find any reference on
how I can populate an the on the fly form with data obtained from, say,
a registration data file. For example, I want to provide the client
with the name and address values already in the form when the form is
opened by the browser, so that the client can simply fill any blank
fields in the form.
Can perl do this? Any references or example scripts?
Thanx
------------------------------
Date: 9 May 1998 13:03:25 GMT
From: lvirden@cas.org
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <6j1k6t$snn$1@srv38s4u.cas.org>
According to Steffen Beyer <sb@engelschall.com>:
:What about changing MakeMaker in such a way so that module authors would just
:add a line like
:
: DEPENDENCIES => qw(Data::Dumper Bundle::LWP),
Some modules already use some kind of feature like this because I've
seen MakeMaker building tell me it couldn't build something because the
necessary module (or version ) wasn't available.
P.S. Seems to me that use of CPAN's Bundle mechanism would be a really
nice way to solve some of the problem - cpan can just go and get the
pieces needed to build something.
However, one problem that has to be faced is that some of the comments
I've seen from folk who were having problems seemed to be because of
inexperience or no experience dealing with application building on what
ever platform was having problems, whether Unix, VMS, Windows, or whatever.
Others appear to be related to strange configuration problems.
Changes to CPAN cannot help some of these problems. And guides to
building are very tough to do (though I believe someone's working on
building guides) because so many people have so many varied combinations,
etc.
--
<URL:mailto:lvirden@cas.org> Quote: In heaven, there is no panic,
<*> O- <URL:http://www.teraform.com/%7Elvirden/> only planning.
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
------------------------------
Date: 9 May 1998 13:07:44 GMT
From: lvirden@cas.org
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <6j1kf0$snn$2@srv38s4u.cas.org>
According to Tom Christiansen <tchrist@mox.perl.com>:
:Perhaps we should just install a command called 'cpan'
:that were actually perl -MSCPAN -eshell.
Actually, I did something like that locally <grin>
$ cat /usr/local/bin/cpan
#! /bin/ksh
perl -w -MCPAN -e shell
--
<URL:mailto:lvirden@cas.org> Quote: In heaven, there is no panic,
<*> O- <URL:http://www.teraform.com/%7Elvirden/> only planning.
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
------------------------------
Date: 9 May 1998 13:15:08 GMT
From: lvirden@cas.org
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <6j1kss$snn$3@srv38s4u.cas.org>
According to Art Cohen <upsetter@shore.net>:
:user-unfriendliness. It's the typical computer-jock attitude of "It was
:hard for me to learn this so I see no reason to make it easy for anyone
:else."
Well, that may be one way to describe it. Another way might be:
Source code distributions, while safer, result in a much more complex
installation process. Users have to deal with applications with which they
have little background, such as c compilers, makefiles, linkers, libraries,
dependencies, etc. Unfortunately, it's rather difficult to locate 'compiling
and linking applications for dummies' type tutorials for all the various
platforms and combinations of install libraries, etc.
I've been using computers since 1973 or so. I still find Perl modules on
CPAN which are difficult to build, because of dependencies on non-perl
libraries but without paths to the location. I don't know if it's still
the case or not (haven't looked in a few months) but the CDK was a recent
example I can think of - the perl module requires the lib*.a to be
present, but all the references to it kept referring me to 'comp.sources.misc
archives'. However, that newsgroup has been dead for a while, uunet was
at the time rejecting accesses, and searches (at that time) against
altavista, etc. for cdk wasn't coming up with hits. I eventually found
a way into uunet and got the necessary library. And perhaps it's the
only case of this kind of thing. I suspect not though - I suspect that
there are occasionally modules that get into cpan that require a
library that isn't available thru cpan and the author forgets to
mention where to find it.
--
<URL:mailto:lvirden@cas.org> Quote: In heaven, there is no panic,
<*> O- <URL:http://www.teraform.com/%7Elvirden/> only planning.
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
------------------------------
Date: 9 May 1998 18:05:25 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: CPAN & Module gripes (was Re: Ever Wonder...?)
Message-Id: <6j25t5$jjj$1@ns1.arlut.utexas.edu>
lvirden@cas.org writes:
>
> However, one problem that has to be faced is that some of the
> comments I've seen from folk who were having problems seemed to be
> because of inexperience or no experience dealing with application
> building on what ever platform was having problems, whether Unix,
> VMS, Windows, or whatever. Others appear to be related to strange
> configuration problems.
Right. A problem I'm seen on clpm in regard to building modules is the
proper tools for building the module (C compiler, cpp, etc) aren't
executable on the machine. I haven't plumbed to depths of MakeMaker,
but it seems to use the %Config hash for choosing tools. That makes it
possible to check to see if the needed tools for building the module
are available. Theoretically, somthing like this could be done:
@needed_tools = qw(cpp cc ...);
Where elements of that list are valid keys for the %Config hash. That
list can be fed to a routine that checks for their existance. There
could be a mechanism for checking tool version numbers (eg gcc-2.8.1),
too, with a little forethought.
--
Stuart McDow Applied Research Laboratories
smcdow@arlut.utexas.edu The University of Texas at Austin
"Look for beauty in roughness, unpolishedness"
------------------------------
Date: Sat, 09 May 1998 16:28:42 GMT
From: steven@amber.co.uk (Steven Wayne)
Subject: Re: Creating computer account
Message-Id: <35558320.509522@news.demon.co.uk>
Ed Horton <ehorton@airmail.net> wrote:
>I am looking for a way to create a computer account on a PDC from a NT
>workstation. Can this be done in perl?.
>Thanks for any help
>Ed
It can be done with:
net user username /add /domain
which you could put in a perl script if you wish.
Steven.
--
We pray for one last landing, on the globe that gave us birth,
To rest our eyes on fleecy skies, and the cool green hills of Earth.
-- R.A. Heinlein
http://www.ambercomputing.demon.co.uk/
------------------------------
Date: 9 May 1998 14:39:18 GMT
From: scott@softbase.com
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6j1pqm$2ru$3@mainsrv.main.nc.us>
yujun (Xyujun@ppp.wzptt.zj.cn) wrote:
> Does perl have a IDE(like Turbo C2.0)?
Perl's IDE is Emacs! The two great tools that go great together.
Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
------------------------------
Date: 09 May 1998 09:59:45 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: "Victor Hawk" <vhhawk@worldnet.att.net>
Subject: Re: grep question from newbie
Message-Id: <3eejzdzy.fsf@mailhost.panix.com>
"Victor Hawk" <vhhawk@worldnet.att.net> writes:
> I have an 11,000+ element list of patterns in file1. I have a
> 50,000+ list of records in file2. I am trying to find any element in
> file1 in any field in file2. If I find it, I want to pass the entire
> file2 record (variable length) out to file3. If I don't find it,
> pass it to file4.
I think that the natural solution would involve a hash. Here is a
pseudo-perl expression of the idea:
while (<FILE1>) {
chomp;
$pat{$_}++
}
while (defined ($record = <FILE2>)) {
chomp $record;
if grep { exists $pat{$_} } split /delimiter/, $record {
print FILE3 "$record\n"
} else {
print FILE4 "$record\n"
}
}
> How can this be done in perl?
You should buy the book _Learning Perl_. You'd come up with my answer
pretty quick yourself, I reckon.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf/
------------------------------
Date: 9 May 1998 18:17:12 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: Grieving our dying community
Message-Id: <6j26j8$l3k$1@ns1.arlut.utexas.edu>
hawk@algonet.se (Hakan Hjelmstrom) writes:
>
> And again; Is this a bad thing? (answering FAQ's, that is)
Not in of of itself. But there's been an alarming amount of really bad
(and even incorect) answers to FAQs floating around. A little bit of
knowledge can be dangerous. A little bit of misinformation is
potentially disastrous.
> To top it of, some of the more proficient users still might need to
> keep an eye on all the "helpful but not clueless perl babytalkers"
> to make sure we're not providing answers that are actually plain
> wrong.
That's a tall order. It would require a lot of monitoring, and
countering an answerer's post can raise tensions and start a flame
war. Why bother? People should be pointed at the FAQs whenever
possible. At least they're trustworthy.
--
Stuart McDow Applied Research Laboratories
smcdow@arlut.utexas.edu The University of Texas at Austin
"Look for beauty in roughness, unpolishedness"
------------------------------
Date: Sat, 09 May 1998 17:41:32 GMT
From: rob@[remove]mwv.org (rob zimmerman)
Subject: Re: Help! This is drivin me nuts
Message-Id: <6j1ccb$eqa$1@newsy.ncia.net>
Not a silly question, I've been guilty of worse... but yes its there
:-)
Rob Zimmerman
----
"Jeremy Goldberg" <jgoldberg@dial-but-dont-spam.pipex.com> wrote:
>>cgi-lib.pl: Unknown Content-type:
>>[Thu May 7 21:52:19 1998] lingering close lost connection to client
>>207.141.176.82
>Silly question time, perhaps... you ARE putting in a
> print( "Content-Type: text/html\n\n" );
>to tell the browser what it's getting, aren't you?
------------------------------
Date: Sat, 09 May 1998 12:36:19 -0400
From: Mike Skimin <mskimin@centuryinter.net>
Subject: Help, I can't figure this one out
Message-Id: <35548602.52B2@centuryinter.net>
Hello,
I have a problem, I receive baseball statistics in a text file. The
stats come in the following format:
<!-- Start Stats -->
TEAM DAY NIGHT GRASS TURF ONE-RUN EXTRA
LAST10
---- ------- ------- ------- ------- ------- -------
------
ANAHEIM 4-5 14-10 15-15 3-0 6-3 1-1
5-5
BALTIMORE 9-6 8-10 16-16 1-0 3-6 0-1
4-6
<!--End Stats -->
I have a script that reads each line of the text file and converts it
into HTML for a web page. The problem I have is it converts the whole
line and I would like to only convert the columns for Team, Day, Night,
One-run and Last 10, thus eliminating the columns for Grass, Turf, and
Extra. I am stumped on this one.
Any and all ideas and help will be greatly appreciated.
Mike Skimin, Webmaster
Emerge Inc.
http://www.LorainCounty.com
------------------------------
Date: Sat, 09 May 1998 13:15:59 -0400
From: Bob Trieger <sowmaster@juicepigs.com>
To: Mike Skimin <mskimin@centuryinter.net>
Subject: Re: Help, I can't figure this one out
Message-Id: <35548F4F.689A@juicepigs.com>
[mailed & posted]
Mike Skimin wrote:
>
> Hello,
>
> I have a problem, I receive baseball statistics in a text file. The
> stats come in the following format:
>
> <!-- Start Stats -->
> TEAM DAY NIGHT GRASS TURF ONE-RUN EXTRA
> LAST10
>
> ---- ------- ------- ------- ------- ------- -------
> ------
>
> ANAHEIM 4-5 14-10 15-15 3-0 6-3 1-1
> 5-5
>
> BALTIMORE 9-6 8-10 16-16 1-0 3-6 0-1
> 4-6
>
> <!--End Stats -->
>
> I have a script that reads each line of the text file and converts it
> into HTML for a web page. The problem I have is it converts the whole
> line and I would like to only convert the columns for Team, Day, Night,
> One-run and Last 10, thus eliminating the columns for Grass, Turf, and
> Extra. I am stumped on this one.
Just split each line into an array and print the items you want.
Where are you stumped?
What have you tried?
--
Bob Trieger | Titanic: big boat, bigger
sowmaster@juicepigs.com | iceberg, big deal
------------------------------
Date: 9 May 1998 12:01:02 GMT
From: mist@yoyo.cc.monash.edu.au (Michael Stillwell)
Subject: Re: How old is Perl?
Message-Id: <slrn6l8hbu.akm.mist@fangorn.cs.monash.edu.au>
On 6 May 1998 23:29:52 GMT, Tom Christiansen <tchrist@mox.perl.com> wrote:
: NAME
: perlhist - the Perl history records
[ ... ]
Seeing all those version numbers at once makes me wonder: why has Perl
progressed in thousandths and ten thousandths instead of something
sensible and standard, like tenths?
Michael
--
.. ABSOLUT .SIG. ..
.. Michael Stillwell ..
.. mist@yoyo.cc.monash.edu.au ..
.. http://yoyo.cc.monash.edu.au/~mist/ ..
------------------------------
Date: 9 May 1998 14:59:16 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How old is Perl?
Message-Id: <6j1r04$1ta$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
mist@yoyo.cc.monash.edu.au (Michael Stillwell) writes:
:Seeing all those version numbers at once makes me wonder: why has Perl
:progressed in thousandths and ten thousandths instead of something
:sensible and standard, like tenths?
Why haven't you stopped beating your wife?
5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6.0, 6.1, ...
--tom
--
Travel important today; Internal Revenue men arrive tomorrow.
------------------------------
Date: Sat, 9 May 1998 19:54:34 +0100
From: "Ben" <ben@wallroyds.demon.co.uk>
Subject: HTML::FormatText & parse_html - Doesn't work with tables.
Message-Id: <894740126.15334.0.nnrp-05.c2de5b4a@news.demon.co.uk>
Hiya all!
The code below ...
$plain_text = HTML::FormatText->new->format(parse_html($html_text));
Will remove HTML from a string. But, there's a problem - It doesn't work
with tables.
I wonder if anyone know if there's any way of getting around it? Why won't
it work with tables?! It's the easiest job in the world ... Just remove the
<TR*> <TD*> <TABLE*> tags. How come the author doesn't like tables?
Or am I being a silly boy, missing something important? Can anyone please
tell me if there's a way to do it with tables?
Thanks for reading this.
Regards,
Ben.
------------------------------
Date: 09 May 1998 09:03:01 -0700
From: Mark Boyns <boyns@sdsu.edu>
Subject: Re: HTTP Request Headers
Message-Id: <x090obsa8a.fsf@sdsu.edu>
On 30 Apr 1998 webmaster@gardenweb.com writes:
> I need to see the request headers for an HTTP request EXACTLY as the
> browser sends them. It is a little beyond my ken to make a faux server
> that can record them.
>
> Does anyone know of a script or a site that might be able to show me
> exactly what Netscape sent the server?
Use the Muffin Snoop filter. More information available at
http://muffin.doit.org/
------------------------------
Date: Sat, 09 May 1998 16:28:41 GMT
From: steven@amber.co.uk (Steven Wayne)
Subject: Re: Logic of split() ?
Message-Id: <35548209.230231@news.demon.co.uk>
"Jeremy Goldberg" <jgoldberg@dial-but-dont-spam.pipex.com> wrote:
>> C:\> perldoc -f split
>
>I don't seem to have perldoc, sadly... is it meant to come with the Windows
>release?
>
<snip>
Not with the Activeware one. It does with the perl5.00402-bindist04
distribution. Tk works too.
See your local CPAN for details.
Steven.
--
We pray for one last landing, on the globe that gave us birth,
To rest our eyes on fleecy skies, and the cool green hills of Earth.
-- R.A. Heinlein
http://www.ambercomputing.demon.co.uk/
------------------------------
Date: Sat, 09 May 1998 16:35:41 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Jeremy Goldberg <jgoldberg@dial-but-dont-spam.pipex.com>
Subject: Missing perldoc (was: Re: Logic of split() ?)
Message-Id: <Pine.GSO.3.96.980509093026.25381A-100000@user2.teleport.com>
On Sat, 9 May 1998, Jeremy Goldberg wrote:
> I don't seem to have perldoc, sadly... is it meant to come with the
> Windows release?
Yes; perldoc (or an equivalent) should be part of every proper
installation of Perl. If it's not, complain to whoever installed your
Perl, or whoever built the distribution. Then pick up a proper
distribution from CPAN. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 9 May 1998 18:04:53 GMT
From: Art Cohen <upsetter@shore.net>
Subject: Re: MODULE MANIA STRIKES (Was Re: What does this do?)
Message-Id: <6j25s5$lf0@fridge.shore.net>
Bob Trieger <sowmaster@juicepigs.com> wrote:
:>
: I think you miss the point here. the original poster was obvious
: ignorant as to how to read the documentation for the read function or
: just too lazy. By using CGI.pm he will only have to read one document
: instead of the documentation for all the other functions used after the
: read.
So you're saying that the solution for newbies who don't even know where
to find documentation on Perl's built-in functions is to have them use
more *modules*? That's going to make it easier for him to learn Perl?
Forgive me if I remain a little skeptical.
--Art
National Ska/Reggae Calendar: www.ziplink.net/~upsetter/ska/calendar.html
Boston Ska Home Page: www.ziplink.net/~upsetter/ska/index.html
------------------------------
Date: Sat, 9 May 1998 12:14:48 -0400
From: Pat Trainor <ptrainor@bbn.com>
Subject: mSQL <---> MSAccess
Message-Id: <Pine.LNX.3.95.980509121309.5750A-100000@aura>
I use msqlperl, and would appreciate pointers to resources that
allow the exchange of information between mSQL and MSAccess? Posting to
the MS groups was not productive.. (surprise)..
TIA!
------------------------------
Date: Sat, 9 May 1998 10:49:08 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Multiline substitution from command line in Perl 4. How?
Message-Id: <ltt1j6.828.ln@localhost>
Andrew M. Langmead (aml@world.std.com) wrote:
I'm sure Andrew didn't mean it, but to avoid confusion:
: The $* variable, or the /m modifier have no effect here.
That's true enough.
: They only
: change how the "." metacharacter is handled.
But here he's talking about the /s modifier, not /m.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 9 May 1998 17:57:23 GMT
From: "Allan M. Due" <due@murray.fordham.edu>
Subject: Re: QRe: == vs. eq
Message-Id: <6j25e3$sp2$0@206.165.146.153>
Aaron Baugher wrote in message ...
>"Allan M. Due" <due@discovernet.net> writes:
[Snip]
> but the fact is that in any community, individuals will be judged
partially by the company
>they keep. On the net, using software that makes like more difficult
>for other programmers and users is like hanging around with a gang
>that likes to break windows in real life. Netiquette applies not only
>to your messages, but to the software that sends them.
>
What kind of problems is Outlook causing? I don't mind using it too much if
it just brands me a looser, but if I am causing folks problems I will stop
using it immediately. Any information is appreciated.
AmD
Worried user of lame software.
------------------------------
Date: Sat, 09 May 1998 17:09:11 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Total Object Uselesness
Message-Id: <pudge-0905981307190001@192.168.0.3>
Here is a complete waste of time, energy, and computing power.
#!/usr/bin/perl -wl
use strict;
my($x, $y);
$x = 'foobar';
$y = bless \substr($x, 3), "D'oh";
sub D'oh'oh {${$_[0]} = $_[1]}
$y->oh('baz');
print $x;
$y->oh('fighters');
print $x;
$y->oh('bar');
print $x;
__END__
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
MacPerl: Power and Ease (ISBN 1881957322), http://www.ptf.com/macperl/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: 9 May 1998 14:39:06 GMT
From: lvirden@cas.org
Subject: Re: Unable to use CPAN.pm through firewall
Message-Id: <6j1pqa$2k6$1@srv38s4u.cas.org>
According to Mark Conty <mconty@year.grain.cargill.com>:
:I have a version of "lynx" for my version of HP-UX, but I saw in the
:code that it doesn't yet support proxy authorization, so I'm probably
Recent Lynx change files seem to indicate that it has now been added - back in
June of 1997 I believe (or perhaps earlier). If you are willing to use
the latest release of the software, that might help some of the situation.
See <URL:http://lynx.browser.org/> .
--
<URL:mailto:lvirden@cas.org> Quote: In heaven, there is no panic,
<*> O- <URL:http://www.teraform.com/%7Elvirden/> only planning.
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
------------------------------
Date: Sat, 09 May 1998 04:27:17 GMT
From: UCE-trap_synic@omen.net.au (Peter Caffin)
Subject: Re: Using frames in perl: How to select target
Message-Id: <3557d9d3.7843454@news.omen.net.au>
John Mosey <mosey@alpha3.csd.uwm.edu> did cunningly address to
comp.lang.perl.misc..
:How do I tell my prel script to put it's output into a certain frame?
:Also, how do I have the script refresh a page when the output has changed?
These are both HTML issues and are best answered by:
(a) Looking for some HTML newsgroups like comp.infosystems.www.authoring.html
and finding out where their FAQs are,
(b) Searching for their FAQs through a search engine, or,
(c) Going to the Netscape homepage and reading their Help pages.
This question isn't even slightly Perl related.
--: _ ___ _ _ _
_oo__ |_|_ |__ _ | | _ |_|_' _ synic at omen dot net dot a u
//`'\_ | (/_|(/_| .|. |_(_|| | || | http://www.omen.net.au/~synic
/ PO Box 869, Hillarys WA 6923, AUSTRALIA
------------------------------
Date: 9 May 1998 13:23:10 GMT
From: "Allan M. Due" <due@murray.fordham.edu>
Subject: What does a bitwise do?
Message-Id: <6j1lbu$siu$0@206.165.146.137>
Hi Folks,
I searched dejanews for ways of randomly seeding salt and I found
multiple references to srand=(time|$$), which often led to someone stating:
no use srand(time^$$) although I also saw srand = ($$^time).
Now I new what time was, but I not seen the other elements before. In
the Perl docs I find:
$$ The process number of the Perl running this script. (Mnemonic: same as
shells.) Binary
Ok, I understand that.
``|'' returns its operators ORed together bit by bit.
Binary ``^'' returns its operators XORed together bit by bit.
Hmm, so I copied a little script :
$ans = 2 | 1204;
print ("2 OR 1204 is $ans\n");
and then tried switching the | to ^ and using different numbers. Sadly I
just can't figure out what these bitwise ors are up to. Could someone shed
a little light on what is going here? The ingnorance probably stems from a
poor understanding of bits. Thanks for any illumination you might be able
to provide.
--
Allan M. Due
Due@discovernet.net
Admin@WhiteCrow.net
The beginning of wisdom is the definitions of terms.
- Socrates
$ans = 1000 | 1204;
print ("1000 OR 1204 is $ans\n");
------------------------------
Date: 9 May 1998 13:58:34 GMT
From: "Allan M. Due" <due@murray.fordham.edu>
Subject: Re: What does a bitwise do?
Message-Id: <6j1nea$32n$0@206.165.146.137>
Sorry, was interrupted while typing. That should be what does a bitwise OR
do.
------------------------------
Date: Sat, 09 May 1998 16:22:04 GMT
From: jdludlow@millcomm.com (James Ludlow)
Subject: Re: What does a bitwise do?
Message-Id: <jdludlow-0905981127120001@dial-32.roch.millcomm.com>
In article <6j1lbu$siu$0@206.165.146.137>, "Allan M. Due"
<due@murray.fordham.edu> wrote:
[snip]
> ``|'' returns its operators ORed together bit by bit.
> Binary ``^'' returns its operators XORed together bit by bit.
>
>
> Hmm, so I copied a little script :
> $ans = 2 | 1204;
> print ("2 OR 1204 is $ans\n");
>
> and then tried switching the | to ^ and using different numbers. Sadly I
> just can't figure out what these bitwise ors are up to. Could someone shed
> a little light on what is going here? The ingnorance probably stems from a
> poor understanding of bits. Thanks for any illumination you might be able
> to provide.
[snip]
> $ans = 1000 | 1204;
> print ("1000 OR 1204 is $ans\n");
Bitwise means that the operator is working on the numbers in a binary form
(base 2). So the first step to understanding what's going on is to
convert your numbers into a binary form.
2 => 10
1204 => 010010110100
Now, think of looking at the numbers in columns, top to bottom. If a
number is missing, then it is just a zero, like this.
2 => 000000000010
1204 => 010010110100
Now, you need to know what the actual operator does. I'll call a number
that is on the top of the column "top", and the number on the bottom of
the column "bottom". The result of a bitwise-OR will be called
"result". When comparing 2 bits at a time, there are only 4 possible
situations.
OR
top | bottom | result
---------------------
0 | 0 | 0
0 | 1 | 1
1 | 0 | 1
1 | 1 | 1
You see, the OR really means if one number or the other is a one, then the
result is a one.
So let's apply that to the example:
2 => 000000000010
1204 => 010010110100
------------
010010110110 => 1206
Now, XOR is almost the same except that if both numbers are a one, the
result is a zero.
XOR
top | bottom | result
---------------------
0 | 0 | 0
0 | 1 | 1
1 | 0 | 1
1 | 1 | 0
For the example we've been using, the answer is identical because there
are no instances where two 1's line up with each other.
So let's make a new example:
13 => 01101
20 => 10100
-----
OR 11101 => 29
XOR 11001 => 25
The only difference between the OR and the XOR is at the middle bit where
two 1's line up with each other.
--
James Ludlow (jdludlow@millcomm.com)
------------------------------
Date: 9 May 1998 18:01:51 GMT
From: "Allan M. Due" <due@murray.fordham.edu>
Subject: Re: What does a bitwise do?
Message-Id: <6j25mf$t6i$0@206.165.146.153>
James,
Thanks very much, your explanation was quite understandible. It helped
me to see how all this works and how it pertains to creating the salt.
Always something new to learn.
AmD
------------------------------
Date: Sat, 09 May 1998 14:23:55 GMT
From: "Toby Rubenstein" <toby@utobia.demon.co.uk>
Subject: Re: Win95 Perl scripts DONT WORK on UNIX
Message-Id: <01bd7b56$22545d00$871fdec2@8730BL330165.ac.com>
Most Unix systems will have dos->unix and vice versa utilities.Try looking
for dos2ux or dos2unix. If your system doesn't have this then why not write
your own in Perl?
Toby.
John Beadles <beadles@nortel.com> wrote in article
<355380F2.C1E76D42@nortel.com>...
> edepot wrote:
> >
> > Hello. I found out that perl scripts written to run
> > on Windows 95 Perl DOES NOT WORK
> > on unix Perl.
>
> snip...
>
> > My question is, HOW DO YOU STRIP THE
> > "^M" character? Is there a perl script that
> > does this? Is there a /usr/bin program that
> > I can use to achieve this on many files?
>
> Programmers File Editor is a freeware Windows
> text editor available from:
>
> http://www.lancaster.ac.uk/people/cpaap/pfe/default.htm
>
> It has a unix output switch that allows you to
> set this. Works great, lasts long time.
> --
> ------------------------------------------------
> John T. Beadles Nortel CDMA RF Design
> Office: 972-685-7813 Fax: 972-684-3767
> Email (office): beadles@nortel.removethis.com
> Any opinions are mine and to do not represent
> those of my employer
> ------------------------------------------------
>
------------------------------
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 2547
**************************************