[8251] in Perl-Users-Digest
Perl-Users Digest, Issue: 1869 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Feb 11 22:07:19 1998
Date: Wed, 11 Feb 98 19:01:32 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 11 Feb 1998 Volume: 8 Number: 1869
Today's topics:
HUMOR: Userspeak vs Hackerspeak <tchrist@mox.perl.com>
Re: Learning Perl <c.evans@clear.net.nz>
Re: Metacharacters and script security - advice please. (Martien Verbruggen)
Re: module for passwd interaction on solaris (Clay Irving)
Re: Need some help ! (Martien Verbruggen)
Re: Perl Banner Rotation (Martien Verbruggen)
Re: Perl compiler (Martien Verbruggen)
Re: PUZZLE: Answer me these questions three (O'Shaughnessy Evans)
remove a known line of text from a file <charlesb@ccmail.orst.edu>
Re: remove a known line of text from a file <tchrist@mox.perl.com>
Re: strange key behaviour and the Blue Camel <rra@stanford.edu>
Re: strange key behaviour and the Blue Camel (Martien Verbruggen)
Re: test!! please ignore this message i am seeing if it <dgoddard@us.oracle.com>
Re: test!! please ignore this message i am seeing if it <tchrist@mox.perl.com>
Re: Text databases. Was: Should I stock up on food and <docdwarf@erols.com>
Re: Un crypt <c.evans@clear.net.nz>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 12 Feb 1998 01:18:14 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: HUMOR: Userspeak vs Hackerspeak
Message-Id: <6btikm$c1k$1@csnews.cs.colorado.edu>
Programmers, have you ever noticed that while you went into a profession
that used to get listed on the science section in the newspapers, but
that now it's been demoted to merely the business section?
Users, do you get the idea that programmers march to the beat of a
different drummer?
Have you all not wondered why programmers and users never seem to
understand each other? It's mediaspeak! What you really need is
this handy dandy quick reference conversion guide!
C:\ root#
============= =================
ace programmer hacker
advertisements lying
applications programming useless user stuff
away from the computer offline
BBS kiddie chat
beta test public bug release
borrowware unethical piracy and thievery
C script C program
carriage return newline
CGI waste of valuable time
CGI's CGI programs
client current computer
client-server networking
coding hacking
computers cool fun toys
console tty
desktop window manager
disk diskette
disk floppy
disk floppy disk
DOS programmer-hostile
drive filesystem
drive partition
elitism competance
email mail
emails messages
exe a.out
file or directory file
folder directory
getting help paying a consultant
GUI productivity impediment
hacker cracker or criminal
hacking criminal trespassing
hard disk disk
hard disk drive disk
hard drive disk
hit counter vanity GIF
impossible dream fork
install reboot
Internet BBS Usenet
intranet local network
legacy pre-hegemony
Linux upgrade permanent virus protection
mainframe legacy
marketing lying
menus moronic UI
Microsoft the Evil Empire
NT unnatural child of Windows and VMS
offline Internet-deprived
online documentation manpage
operating system web browser
PC Wintel box
program counter PC
rapid prototyping hacking
reading the source getting help
script program
send an email send mail
server remote computer
shareware lame buddy-can-you-spare-a-dimeware
shortcut link
software fleeceware on a floppy
source code software
text editor editor
text or binary file file
Unix programmer-friendly
unreadable protocol spec CGI
user-friendly expert-obsequious
what's that? FAQ list
Windows unnatural child of DOS and a Mac GUI
wizard programming systems programming
word-processor GUI-based low-tech typewriter
World Wide Web Internet
writing programs playing games
--
Tom Christiansen tchrist@jhereg.perl.com
/* Force them to make up their mind on "@foo". */
--Larry Wall, from toke.c in the v5.0 perl distribution
------------------------------
Date: 12 Feb 1998 14:41:25 +1300
From: Carey Evans <c.evans@clear.net.nz>
To: kees <kaddba@nedernet.nl>
Subject: Re: Learning Perl
Message-Id: <87pvktd2gr.fsf@psyche.evansnet>
kees <kaddba@nedernet.nl> writes:
> So what? Well, I want to use Perl (version 4), and I want to get to know
> it quickly. But without a decent introduction I tend to get lost in the
> complete syntax guides, I'm not a C programmer. Is there a good
> introduction course or book to show me the 'getting started' part of
> using Perl 4.
See your subject: "Learning Perl" by Randal Schwartz and Tom
Christiansen from O'Reilly <URL:http://www.ora.com/>. The _old_ first
edition was for Perl 4. The new second edition is for Perl 5. If
you'd read this group lately you would have seen Tom Christiansen post
the URL of his list of Perl book critiques in
<URL:news:6bpont$35k$1@csnews.cs.colorado.edu>.
> I have to use Perl 4 because Rational supports the use of it with
> ClearCase (and my managers require support ;-).
Did you know there are no plans to make Perl 4 Y2K compliant? Do your
managers?
--
Carey Evans http://home.clear.net.nz/pages/c.evans/
GNU GPL: "The Source will be with you... always."
------------------------------
Date: 12 Feb 1998 00:16:09 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Metacharacters and script security - advice please.
Message-Id: <6btf09$4ho$1@comdyn.comdyn.com.au>
In article <34e2280b.26848213@news.skynet.co.uk>,
networks@skynet.co.uk (User) writes:
> Metacharacters and script security - advice please.
Most of this, if not all, is covered in the perlsec man page
perldoc perlsec
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | The gene pool could use a little
Commercial Dynamics Pty. Ltd. | chlorine.
NSW, Australia |
------------------------------
Date: 11 Feb 1998 21:39:59 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: module for passwd interaction on solaris
Message-Id: <6btndv$8ja@panix.com>
In <34E0BCEA.79D4@sgi.net> Mark Kogon <mkogon@sgi.net> writes:
>Does anyone know of a perl module which will do the passwd command after
>a useradd has been run on a solaris 5.6 system. With solaris, passwd
>needs to run after useradd before the account is valid.
I haven't tried it, but:
AcctInfo.pm
http://www.wcnet.org/~jzawodn/perl/AcctInfo/index.html
A Perl module for accessing and updating Solaris account information
(user's password, shell, home directory, account expiration information,
group membership, quota, etc.).
[ in the Solaris section of Perl Reference, http://reference.perl.com ]
--
Clay Irving <clay@panix.com> I think, therefore I am. I think?
http://www.panix.com/~clay/
------------------------------
Date: 11 Feb 1998 23:52:52 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Need some help !
Message-Id: <6btdkk$46k$11@comdyn.comdyn.com.au>
In article <34e2123b.0@news1.ibm.net>,
"Phil Jach - Reverse to get address" <moc.care@hcajp - Reverse to get address> writes:
> chop(@XLINES); should work.
chomp is safer. What happens if one of the elements of @XLINES doesn't
end in a newline?
Never use chop unless you really intend to chop off the last
_character_.
Martien
--
Martien Verbruggen | My friend has a baby. I'm writing down
Webmaster www.tradingpost.com.au | all the noises the baby makes so later
Commercial Dynamics Pty. Ltd. | I can ask him what he meant - Steven
NSW, Australia | Wright
------------------------------
Date: 11 Feb 1998 23:54:09 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Perl Banner Rotation
Message-Id: <6btdn1$46k$12@comdyn.comdyn.com.au>
In article <6bt5ud$3p4$1@news01.iafrica.com>,
"Jaco Greeff" <jaco@mad.scientist.com> writes:
> I was wondering is there is any really good banner rotation software
> (similar to the kind LinkExchange uses) available for a small price (free is
> always better :). This software needs to be in perl because I want to
> integrate parts of my existing code into the codebase. Any ideas?
This really isn't a question about perl.
Try www.cgi-resources.com. It has lots of these things lying around,
and a lot of them are written in Perl.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Advertising: The science of arresting
Commercial Dynamics Pty. Ltd. | the human intelligence long enough to
NSW, Australia | get money from it.
------------------------------
Date: 12 Feb 1998 00:04:08 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Perl compiler
Message-Id: <6bte9o$46k$13@comdyn.comdyn.com.au>
In article <34E21728.37B1@nortel.ca>,
Peter Chan <chanp@nortel.ca> writes:
> I was wondering where I can get a perl compiler.
Third time today I am answering the same question:
You can download perl from www.perl.com
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au |
Commercial Dynamics Pty. Ltd. | Curiouser and curiouser, said Alice.
NSW, Australia |
------------------------------
Date: 12 Feb 1998 01:21:21 GMT
From: shaug@callamer.com (O'Shaughnessy Evans)
Subject: Re: PUZZLE: Answer me these questions three
Message-Id: <6btiqh$bq7$1@ha1.rdc1.occa.home.com>
In article <6btdvg$2c4$11@csnews.cs.colorado.edu>,
Tom Christiansen <tchrist@mox.perl.com> writes:
> Question 1: Is this program recursive?
No.
> Question 2: How many hashes does it use?
Two.
> Question 3: What are the names of these hashes?
%login and %group.
--
O'Shaughnessy Evans
http://www.callamerica.net/shaug/
------------------------------
Date: Wed, 11 Feb 1998 17:20:23 -0800
From: Brian Charles <charlesb@ccmail.orst.edu>
Subject: remove a known line of text from a file
Message-Id: <34E24E56.5764F508@ccmail.orst.edu>
Hi
How do I remove a known line of text from a file?
Basically I have a form on the web and the info when submitted is
written to a file. How can I delete a line of information from that file
if the user wants to remove the info?
Brian
------------------------------
Date: 12 Feb 1998 02:27:19 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: remove a known line of text from a file
Message-Id: <6btmm7$f6k$4@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
Using that broken excuse for a newsreader, Mozilla 4.04 [en] (WinNT; I),
In comp.lang.perl.misc, Brian Charles <charlesb@ccmail.orst.edu> writes:
: How do I remove a known line of text from a file?
You mean, other than any of the several ways that the second question from
the fifth section of the perl frequently asked questions list explains?
% man perlfaq5
...
How do I change one line in a file/delete a line in a file/insert
a line in the middle of a file/append to the beginning of a file?
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"Many folks want nothing more than to live and let learn." --Larry Wall
------------------------------
Date: 11 Feb 1998 16:56:17 -0800
From: Russ Allbery <rra@stanford.edu>
To: perlbug@perl.org
Subject: Re: strange key behaviour and the Blue Camel
Message-Id: <m390rhwsi6.fsf@windlord.Stanford.EDU>
[ This message has also been posted to comp.lang.perl.misc. ]
My understanding was that => was supposed to treat the string on the left
side as a quoted string, but that appears to fail for numbers. Note the
following:
windlord:~> perl -e '%hash = (000 => "Something"); print keys %hash, "\n"'
0
windlord:~> perl -e '%hash = ("000" => "Something"); print keys %hash, "\n"'
000
I'd personally consider this a bug, at least a documentation one. (This
is under 5.004_04.)
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: 12 Feb 1998 00:24:49 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: strange key behaviour and the Blue Camel
Message-Id: <6btfgh$4ho$2@comdyn.comdyn.com.au>
In article <6bt7o7$ml6@fidoii.cc.lehigh.edu>,
"Phil R Lawrence" <prl2@lehigh.edu> writes:
> Blue Camel pp. 50 says, "The => identifier is just a synonym for a comma,
> but its visually more distinctive, and it also quotes any bare identifiers
> to the left of it..."
A slightly different piece of documentation:
perldoc perldata
[snip]
It is often more readable to use the => operator between key/value
pairs. The => operator is mostly just a more visually distinctive
synonym for a comma, but it also arranges for its left-hand operand to
be interpreted as a string, if it's a bareword which would be a legal
identifier.
The important bit here is 'legal identifier'.o
Somewhere else in the same documentation:
Most often, it consists of a single identifier, that is, a string
beginning with a letter or underscore, and containing letters,
underscores, and digits.
> my %hash = (
> "0" => "Quoted One Zero",
> "00" => "Quoted Two Zeros",
> 0 => "One Zero",
> 00 => "Two Zeros",
> 000 => "Three Zeros",
> );
0, 00, 000 are not legal identifiers.
> there are in fact only 2 keys being assinged to: '0' and '00'. Why?
Because "0", 0, 00, and 000 are effectively the same here.
> Doesn't this go against what the Camel said?
No, because it mentions 'bare identifier'.
> Also, why does
> $key = "000";
> print "$hash{$key}\n";
>
> print something different than
> print "$hash{000}\n";
because "000" is a string, and 000 is a number, the number 0, which
when used as a key into a hash will expand to the string "0". You'll
find that $hash{"0"}, $hash{000} and $hash{0} do print the same thing.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | For heaven's sake, don't TRY to be
Commercial Dynamics Pty. Ltd. | cynical. It's perfectly easy to be
NSW, Australia | cynical.
------------------------------
Date: Wed, 11 Feb 1998 18:06:19 -0800
From: Denis Goddard <dgoddard@us.oracle.com>
Subject: Re: test!! please ignore this message i am seeing if it works!
Message-Id: <34E2591B.CF1F314A@us.oracle.com>
Tom Christiansen wrote:
>
>[...] In the next, moderated
> incarnation of this newsgroup, we shall be free of such.
>
Sounds ominous. Do you know something we don't know?
>
> "If you only have a nail, you tend to see every hammer as a problem."
> --Larry Wall
(quoting Maslow)
--
__ __ _ __ __
~~~~(__)|-< /-\(__ |__(-_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Denis Goddard, Senior Member, Tech. Staff |"I see the heads of men arise
email: dgoddard@us.oracle.com |with hungry minds and open eyes!"
ourworld.compuserve.com/homepages/d_goddard| -Rush, from 2112: _The Oracle_
------------------------------
Date: 12 Feb 1998 02:20:48 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: test!! please ignore this message i am seeing if it works!
Message-Id: <6btma0$f6k$2@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, Denis Goddard <dgoddard@us.oracle.com> writes:
:Sounds ominous. Do you know something we don't know?
It would be presumptuous of me to concur, don't you think? :-)
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"... an initial underscore already conveys strong feelings of
magicalness to a C programmer."
--Larry Wall in <1992Nov9.195250.23584@netlabs.com>
------------------------------
Date: Wed, 11 Feb 1998 21:27:30 -0500
From: The Goobers <docdwarf@erols.com>
To: "T.S. Monk" <ts_monk@hotmail.com>
Subject: Re: Text databases. Was: Should I stock up on food and buy an AK-47?
Message-Id: <34E25E12.1947@erols.com>
T.S. Monk wrote:
>
[snip]
>
> A bud of mine uses something called "Gofer" that usually turns up some
> pretty embarrassing strings from our mail list group's BBS days.
Does he prefer the Classical Gopher or the Romantic Gopher?... or does
he show himself to be a purist and Gopher Baroque?
DD
------------------------------
Date: 12 Feb 1998 14:43:56 +1300
From: Carey Evans <c.evans@clear.net.nz>
To: Edward Harris <Webmaster@eg-web.com>
Subject: Re: Un crypt
Message-Id: <87n2fxd2cj.fsf@psyche.evansnet>
Edward Harris <Webmaster@eg-web.com> writes:
> If anyone has a good formula for uncrypting information previously
> crypted using perls "crypt" command, I would appreciate knowing it.
If you find one, let me know. I know a few password files I'd like to
run it on.
% perldoc -f crypt
[...]
Note that crypt is intended to be a one-way function, much like breaking
eggs to make an omelette. There is no (known) corresponding decrypt
function. As a result, this function isn't all that useful for
cryptography. (For that, see your nearby CPAN mirror.)
[...]
--
Carey Evans http://home.clear.net.nz/pages/c.evans/
GNU GPL: "The Source will be with you... always."
------------------------------
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 1869
**************************************