[8564] in Perl-Users-Digest
Perl-Users Digest, Issue: 2182 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 25 18:07:34 1998
Date: Wed, 25 Mar 98 15:01:53 -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, 25 Mar 1998 Volume: 8 Number: 2182
Today's topics:
Re: PROPOSAL: The Perl Dictionary (Joergen W. Lang)
Re: PROPOSAL: The Perl Dictionary <scribble@pobox.com>
Re: PROPOSAL: The Perl Dictionary <uri@sysarch.com>
Re: revisiting "pod style comments revisited" <ptimmins@netserv.unmc.edu>
Re: SMTP <uri@sysarch.com>
Re: System Question ("John Dallman")
Re: System Questoin <steve@prilnari.com>
Re: System Questoin (Richard Bellavance)
Re: System Questoin (Andrew M. Langmead)
Re: Unlink on WinNT/95 <karld@feklore.demon.co.uk>
Re: Using Perl packages and "strict" (Andrew M. Langmead)
Re: what is wrong with being a novice ?? <keithmur@mindspring.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 25 Mar 1998 21:50:22 +0100
From: joergen.lang@schwaben.de (Joergen W. Lang)
Subject: Re: PROPOSAL: The Perl Dictionary
Message-Id: <1d6gseo.exv6vnsh3r9cN@host060-206.seicom.net>
Sperling - german for a sparrow that uses Perl
superlstition - to believe in daemons
perlfume - see Camelbook, Ch. 1 "Natural and artificial languages"
Footnote No. 5 (at least in my version...)
semiperlmeable - the way a lot of programmers react to Perl - it gets in
but it hardly gets out again
imperlfect - Perl 4 now is
perl jam - what some people use as a sig
perlm - possible hairdo, possible typo (for perl -m), I don't remember
properl (noun) - a Perl version that has lost its amateur status
perlvert - someone still using Perl 4 / not reading FAQs
perlcussion - what your head does after to much -> superlvision
Perlsia - land of camels, s.a. perfume
perlseverence - what a -> perlson needs to learn perl
perlsuade - convincing a perlson to use Perl instead of Java, etc...
Eli the Bearded <*@qz.to> wrote:
> brian d foy <comdog@computerdog.com> wrote:
> > brian_r_parkes@hotmail.com posted:
> > >superlative (su-perl-a'tive), noun, adj. -
> > >The shortest possible Perl script
> > >for any given problem.
> >
> > imperlative - Perl as a project requirement.
> >
> > perlambulate - stepping through your script with the debugger.
> > see Chipmunk.
> >
> > perl diem - payment for daily Perl work.
> >
> > perlfidy - filching someone's Perl script.
> >
> > perlilous - mucking with the internals or trying to understand Chip.
> >
> > perlmeate - to introduce your cow-orkers to Perl.
> >
> > perlplex - to obfuscate. see Eli the Bearded.
> >
> > perlsnickety - describing Perl hackers who argue the fine points.
> > see Abigail.
> >
> > perlspicuous - clearly written Perl code or a clear explanation.
> > see Tom Phoenix.
> >
> > perlturbation - smalls tweaks in a script.
>
> asperlation - the act of ardently desiring some perl functionality
> (eg true multiline comments)
>
> chaperlone - one who supervises a young perl script
>
> desperlado - a reckless perl coder (probably uses versions with known
> security holes)
>
> hyperlbole - specious claims that perl is the proper tool for every task
>
> imperlmeable - impervious to attempts to understand (see JAPH)
>
> juniperl - everygreen used to flavor the gin in Larry's martinis
>
> leperl - see perl 4.
>
> perlpetual - unceasing questions from people who ignore FAQ files
>
> perlturb - to confuse or disquiet with bizarre quoting delimiters
>
> reperltoire - the collection of perl tricks a person knows
>
> whimperl - the sound a perlturbed person makes
>
> Elijah
> ------
> perl -e 's ssqqprint qq\0just another new york perl hacker\n\0see'
--
-------------------------------------------------------------------
"Everything is possible - even sometimes the impossible"
HOELDERLIN EXPRESS - "Touch the void"
-------------------------------------------------------------------
------------------------------
Date: 25 Mar 1998 16:19:23 -0600
From: Tushar Samant <scribble@pobox.com>
Subject: Re: PROPOSAL: The Perl Dictionary
Message-Id: <6fbvtb$13t@tekka.wwa.com>
comdog@computerdog.com writes:
>
>perlturbation - smalls tweaks in a script.
I think I know just which word this was really derived from.
------------------------------
Date: 25 Mar 1998 17:53:49 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: PROPOSAL: The Perl Dictionary
Message-Id: <x7ra3qjsaq.fsf@sysarch.com>
these definitions need to be spoken: (hint s/erl/ur/g)
Perlina - perl code for pets
perlgative - code that make you take a (core) dump
imperle - perl with VB modules
perlify - 1. cleanse of all non-perl code 2. remove memory leaks from perl
perlee - blended perl code
perlgatory - where you wait until uncle bill sells only perl systems
perlitan - use very strict ;
perlchase - buy perl code or programs
perloin - steal perl code or programs
perl - to knit perl code
perlple - royal perl code
perlpose - reason to code in perl
perlse - budget for perl hackers
perlvey - feed perl hackers
perlsue - 1. chase after perl hackers 2. legal action involving perl
(see Randal)
perlview - 1. perl scoping 2. perl range operator 3. perl-tk
perlr - sound of cat who like perl
Perldue - 1. College where they teach perl. 2. perl code past deadline
sperl - encourage perl hackers to code faster
sperlious - bastardized perl code
sperln - reject perl code
sperlt - perl code that gushed out
experlgation - deleting bad perl code
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---- 8 Years of Perl Experience, Available Immediately
uri@sysarch.com --------- Resume and Perl Example at http://www.sysarch.com
Use the Best Search Engine on the Net -------- http://www.northernlight.com
------------------------------
Date: Wed, 25 Mar 1998 13:47:21 -0600
From: Patrick Timmins <ptimmins@netserv.unmc.edu>
Subject: Re: revisiting "pod style comments revisited"
Message-Id: <35195F49.2DA1@netserv.unmc.edu>
Don't ask me why, but on Win32 I've had trouble with this as well. It
seems to clear up if you have blank lines around all of your pod tags;
eg, the following code might fail on pod2html (depending on the perl
code it is embedded in, apparently?):
... snip in the middle of perl code ...
print "Windows Rools!\n";
=head1 Why Do I Love Bill?
He is meek.
He is kind.
He is humble.
=cut
print "Boink!\n";
... snip in the middle of perl code ...
But putting blank lines in seems to fix it; eg:
... snip in the middle of perl code ...
print "Windows Rools!\n";
=head1 Why Do I Love Bill?
He is meek.
He is kind.
He is humble.
=cut
print "Boink!\n";
... snip in the middle of perl code ...
Give it a try, and see if it helps.
Patrick Timmins
U. Nebraska Medical Center
kevin@cmhcsys.com wrote:
>
> hi,
>
> i've got a problem with podding. when i run pod2html on a particular
> document, the pod parts only get converted up to some point in the document.
> this is the first time i've tried interspersing pod with code, rather than
> putting all of the pod at the beginning or end of the file, so i wonder if
> i've violated the following (quoted from tom, who cites perlsyn:
>
> <begin quote>
> man perlsyn:
>
> Perl has a mechanism for intermixing documentation with source code.
> While it's expecting the beginning of a new statement, if the compiler
> encounters a line that begins with an equal sign and a word, like this
>
> Notice the "expecting new statement" part.
> <end quote>
>
> my problem is, i don't know what "expecting new statement" means. does it
> mean that, e.g., i CAN'T put pod in the middle of a subroutine definition or
> a WHILE loop? does it mean that i must ONLY put pod in the middle of a
> subroutine definition or a while loop?
>
> thanks,
>
> kevin "i didn't know what DEPRECATED means, either" cohen
>
> --- If we suppose for the moment that a pizza is a syntactical structue...
> --Nigel Chapman
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: 25 Mar 1998 16:01:15 -0500
From: Uri Guttman <uri@sysarch.com>
To: <angelo_sirigos@medscape.com>
Subject: Re: SMTP
Message-Id: <x7u38mjxic.fsf@sysarch.com>
Angelo Sirigos <angelo_sirigos@spamoff.medscape.com> writes:
> I'm trying to create a simple mailer which connects to my mailserver and
> sends out a message to a specified email address.
> The script goes through beginning to end but doesn't send the message.
> I was wondering if anyone can possibly give me a hand. below is the
> code.
> Thanks in advance for any help
use Net::SMTP ;
also for datestamps use POSIX::strftime or gmtime
hth,
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---- 8 Years of Perl Experience, Available Immediately
uri@sysarch.com --------- Resume and Perl Example at http://www.sysarch.com
Use the Best Search Engine on the Net -------- http://www.northernlight.com
------------------------------
Date: Wed, 25 Mar 1998 22:52:31 GMT
From: jgd@cix.compulink.co.uk ("John Dallman")
Subject: Re: System Question
Message-Id: <EqECvJ.Lnt@cix.compulink.co.uk>
In article <35195fc6.657385@nntp.msu.edu>, barberk3@pilot.msu.edu (Keith)
wrote:
> $cgi= "\/opt\/SUNWweb\/cgi-bin\/student-cgi\/";
> system("cd $cgi");
> Any suggestions as to why this won't work? I can get perl to make a
> dir, chmod, etc, but I can't move in and out of dirs.
Easy. System() starts a copy of the system shell (eg, sh, csh, bash, etc),
and asks it to run the "cd" command. The shell changes its own current
directory, but this has no effect whatsoever on the current directory of
the perl interpreter.
Use the built-in command chdir(), thus:
$cgi= "/opt/SUNWweb/cgi-bin/student-cgi/"; # no need to \ the /es
chdir( $cgi);
You might also like to look at the manpages for the Perl built-in commands
mkdir(), rmdir(), chmod(), unlink(), opendir(), readdir(), etc.
---
John Dallman jgd@cix.co.uk
------------------------------
Date: Wed, 25 Mar 1998 20:05:58 GMT
From: Steve Wells <steve@prilnari.com>
To: Keith <barberk3@pilot.msu.edu>
Subject: Re: System Questoin
Message-Id: <3519651B.414C51FB@prilnari.com>
Keith wrote:
> Hi, I was wondering why the following won't work for me:
> #!/usr/local/bin/perl5 -w
> print "Before\n";
> $cgi= "\/opt\/SUNWweb\/cgi-bin\/student-cgi\/";
> system("cd $cgi");
> print "AFTER";
> Any suggestions as to why this won't work? I can get perl to make a
> dir, chmod, etc, but I can't move in and out of dirs'.
$cgi = '/opt/SUNWweb/cgi-bin/student-cgi';
system ("cd $cgi");
should work if that directory exists.
STEVE
------------------------------
Date: 25 Mar 1998 15:34:11 -0500
From: charlot@CAM.ORG (Richard Bellavance)
Subject: Re: System Questoin
Message-Id: <6fbpo3$sqk@ocean.CAM.ORG>
In article <35195fc6.657385@nntp.msu.edu>,
Keith <barberk3@pilot.msu.edu> wrote:
>
>#!/usr/local/bin/perl5 -w
>print "Before\n";
>$cgi= "\/opt\/SUNWweb\/cgi-bin\/student-cgi\/";
>system("cd $cgi");
>print "AFTER";
>
Use the chdir function. What your "system" command does is create a
subprocess which changes its current directory and exits.
Oh, and there's no need to escape your "/"... And while you're at it,
use single quotes since you're not interpolating in $cgi:
$cgi = '/opt/SUNWweb/cgi-bin/student-cgi/';
Hope this helps,
Richard.
--
Richard Bellavance -- charlot@cam.org -- http://www.cam.org/~charlot/
"All along this path I tread / My heart betrays my weary head
With nothing but my love to save / From the cradle to the grave"
(Eric Clapton, "From the cradle")
------------------------------
Date: Wed, 25 Mar 1998 21:55:42 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: System Questoin
Message-Id: <EqEA8u.LnE@world.std.com>
Steve Wells <steve@prilnari.com> writes:
>$cgi = '/opt/SUNWweb/cgi-bin/student-cgi';
>system ("cd $cgi");
>should work if that directory exists.
For an odd definition of "works". The call to system() creates a
sub-processes. The directory for that subprocess is changed right
before it ends. It has no effect on the parent.
The perl function chdir() is probably the preferred route.
--
Andrew Langmead
------------------------------
Date: Wed, 25 Mar 1998 21:21:40 +0000
From: Karl Dyson <karld@feklore.demon.co.uk>
Subject: Re: Unlink on WinNT/95
Message-Id: <51SZJAAkVXG1EwIw@feklore.demon.co.uk>
In article <wcLLTCAPcOF1EwjB@feklore.demon.co.uk>, Karl Dyson
<karld@feklore.demon.co.uk> writes
>I've only recently started learning Perl and I've come across a bit of a
>problem. I borrowed a bit of code from the book "teach yourself CGI
>Programming with Perl 5 in a week" and it's supposed to wait until the
>file counter.lock does not exist before continuing and actually creating
>counter.lock itself.
>
>i.e This is a basic form of file locking so processes can tell if the
>file they need is already being worked on.
Right. I actually found a new way of doing this and I thought it might
interest some of you to see how I got around my initial problem.
This was the original routine which didn't work
>------------------------------------------------------------------------
>While (-f counter.lock) {
> select(undef,undef,undef,0.1;}
>open(LOCKFILE, ">counter.lock");
>
>#Do other stuff here.
>#E.g. what you want the CGI program to do
>
>close(LOCKFILE);
>unlink(counter.lock);
>
>------------------------------------------------------------------------
>Problem is: this code leaves a file named counter.lock on my harddrive.
>So a) the file isn't being deleted by unlink and
> b) the while loop at the beginning doesn't appear to be checking if
> counter.lock exists.
This is what I've done instead
------------------------------------------------------------------------
while (-e "counter.lock") { #Use the -e thing to check if the file
#exists. Notice the newly added quotes
#around the filename
}
open(LOCKFILE, ">counter.lock");
#Do other stuff
close(LOCKFILE);
unlink("counter.lock"); #Newly added quotes to this filename too!
------------------------------------------------------------------------
I'm still not sure why the first version didn't work. The book mentions
no reason why it shouldn't - but this version does.
Are you going to congratulate me for solving my first Perl problem? :)
Karl
--
Karl Dyson <karld@feklore.demon.co.uk>
"A look can be deceiving; a touch can be lethal."
------------------------------
Date: Wed, 25 Mar 1998 22:09:02 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Using Perl packages and "strict"
Message-Id: <EqEAv2.AD2@world.std.com>
Alberto Aimar <theAlberto.Aimar@iol.it> writes:
>1. If I do not put "strict" nor "my" statements it works.
>2. With "strict" and therefore "my" statements, it doesn't work.
> Most variables are null-valued.
Packages and lexically local variables (my() variables) are totally
oblivious to each other. See the FAQ entry "What's the difference
between dynamic and lexical (static) scoping? Between local() and
my()?" <URL:http://www.perl.com/CPAN-local//doc/manual/html/pod/
perlfaq7/What_s_the_diference_betwen_dy.html>
Since the my()d variables are outside of any block, their scope is the
entire file. Changing packages does not create a new scope. If you run
perl with the "-w" flag, you will get a warning:
"my" variable $bar masks earlier declaration in same scope at -e line 1.
If you want the variables to belong to the package, (and you want to
use the "use strict" pragma,) then use the "use vars" pragma to exempt
them from "strictness". If you want them to belong to the file, then
make them my()d.
If you want them to be in different packages, and you want them to be
lexically scoped, then put the packages in different files.
--
Andrew Langmead
------------------------------
Date: Wed, 25 Mar 1998 18:05:04 -0600
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: what is wrong with being a novice ??
Message-Id: <35199BAF.7D69DF64@mindspring.com>
Georg Bauer wrote:
>
> DRS <simpsond@tig.com.au> wrote:
>
> > What is wrong with it is that the vast majority of people - especially
> > newbies - are not using UNIX.
>
> Ok. What's wrong with perldoc perlfaq?
>
> And don't talk about UNIX now. This works with all Perl versions I
> worked with, except the Mac - there you have to use Shuck. And yes, it
> works with win32, too. I am very seldom in the happy situation to use
> Perl on a UNIX box.
>
This is the 2nd assertion I've seen on this NG in the last few days that
all Perl distributions except on Macs have perldoc and/or pod2*
converters. I have the ActiveState distribution on Win95, and *damned*
if I can find perldoc, pod2*, or any such thing.
Not that *I'm* unhappy. The HTML man pages and sources are all I really
need.
------------------------------
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 2182
**************************************