[13011] in Perl-Users-Digest
Perl-Users Digest, Issue: 421 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 8 15:06:34 1999
Date: Sun, 8 Aug 1999 12:05:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 8 Aug 1999 Volume: 9 Number: 421
Today's topics:
Re: CHMOD function <rootbeer@redcat.com>
Re: CHMOD function (Malcolm Ray)
Re: file manipulation? <revjack@radix.net>
Re: Getting Info (Abigail)
Re: Getting Info (I R A Darth Aggie)
Re: Getting Info (Donovan Rebbechi)
Re: matching ONLY first match in dada stream... (Abigail)
Re: Nastiness contrary to the spirit of perl? (Matt)
Re: Newbie question (Abigail)
Re: Nicer Way (Abigail)
OffTopic Was(Re: Where to find help other than perldoc <admin@futuristic.net>
PerlQt 2.008 <br2@netvision.net.il>
Re: PerlQt 2.008 (Donovan Rebbechi)
Translation of some nice little Perl scripts to produce <anonymous@web.remarq.com>
Re: Where to find help other than perldoc and books. <admin@futuristic.net>
Re: Where to find help other than perldoc and books. <admin@futuristic.net>
Re: Where to find help other than perldoc and books. (Anno Siegel)
Re: Where to find help other than perldoc and books. <uri@sysarch.com>
Re: Where to find help other than perldoc and books. (I R A Darth Aggie)
Re: Where to find help other than perldoc and books. <admin@futuristic.net>
Re: Where to find help other than perldoc and books. <mike@crusaders.no>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 8 Aug 1999 11:54:00 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: CHMOD function
Message-Id: <Pine.GSO.4.10.9908081150420.19222-100000@user2.teleport.com>
On Sun, 8 Aug 1999 stirling@banet.net wrote:
> try:
> $orig="sample.txt";
> chmod (0770,$orig);
>
> NOTICE: There are double quotes instead of single quotes.
In what way do you think that the value of "sample.txt" differs from
'sample.txt'?
Perhaps, if the problem is that chmod isn't changing the mode, checking
the return value of chmod would be helpful. Something like this.
chmod 0770, $orig
or warn "Can't chmod '$orig': $!";
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 8 Aug 1999 19:00:38 GMT
From: M.Ray@ulcc.ac.uk (Malcolm Ray)
Subject: Re: CHMOD function
Message-Id: <slrn7qrkum.lir.M.Ray@carlova.ulcc.ac.uk>
[re-arranged quoting order so it makes sense, sigh]
On Sun, 8 Aug 1999 14:01:24 -0400, stirling@banet.net <stirling@banet.net>
wrote:
>NightFever wrote in message <37a5cb50.16860675@news.idt.net>...
>>I'm tring to make this work:
>>
>>$OrignialLogFile = 'sample.txt';
>>..
>>..
>>..
>>..
>>chmod (0770, $OrignialLogFile);
>>
>>I'm tring to chmod a file to 770 (or any mode for that matter) and it
>>won't change it. It will change it if I put the exact file, but not a
>>a variable like this example, can anyone help?
>
>try:
>$orig="sample.txt";
>chmod (0770,$orig);
>
>NOTICE: There are double quotes instead of single quotes.
What difference do you think that makes? Have you read the section on
quote and quote-like operators in perlop? Hint: the *only* difference
between your code and the original (apart from the variable names) is that
yours runs ever-so-slightly slower, since Perl has to (uselessly) scan
the double-quoted string for interpolations.
--
Malcolm Ray University of London Computer Centre
------------------------------
Date: 8 Aug 1999 18:03:34 GMT
From: revjack <revjack@radix.net>
Subject: Re: file manipulation?
Message-Id: <7okgpm$gaj$1@news1.Radix.Net>
Keywords: Hexapodia as the key insight
ted fiedler explains it all:
:I have a file which looks like this:
That wouldn't happen to be an ARGI file, would it?
------------------------------
Date: 8 Aug 1999 13:15:52 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Getting Info
Message-Id: <slrn7qriaa.8pr.abigail@alexandra.delanet.com>
I R A Darth Aggie (fl_aggie@thepentagon.com) wrote on MMCLXVIII September
MCMXCIII in <URL:news:slrn7qrd10.tfp.fl_aggie@thepentagon.com>:
~~ On 08 Aug 1999 15:07:40 GMT, Jimtaylor5 <jimtaylor5@aol.com>, in
~~ <19990808110740.14799.00004343@ng-cj1.aol.com> wrote:
~~ + Here's a question for you guys. Is there a way with perl to get the total k
~~ + files in a directory, and the space left? If so could give me an example o
~~ + direct me to where I can find the information. Thanks.
~~
~~ #!/usr/bin/perl
~~ #-- -*-perl-*-
~~ @files=`du -sk $ARGV[0] * | sort -nr`;
I'm sure you mean $ARGV[0]/*, right?
~~ chomp(@files);
~~ $sum=0;
~~ foreach (@files) {
~~ print ;
~~ print "\n";
Why chomp if you're going to print the newline anyway?
~~ ($num,undef) = split;
That could be written as:
($num) = split;
~~ $sum+=$num
~~ }
~~ print "Total: $sum\n";
~~
$sum = 0;
foreach (`du -sk $ARGV[0]/* | sort -nr`) {
print;
$sum += (split) [0];
}
print "Total: $sum\n";
However, he doesn't say he wants to info of each and every file. But he
does want to know the space left.
So:
#!/opt/perl/bin/perl -w
use strict;
my $max = 4;
foreach my $dir (@ARGV) {
$max = length $dir if $max < length $dir;
}
printf "%-${max}s %7s %7s\n" => "Name", "Used", "Left";
foreach my $dir (@ARGV) {
do {warn "$dir is not a directory\n"; next} unless -d $dir;
my $used = (split ' ' => +(`du -k $dir`) [-1]) [0];
my $left = (split ' ' => +(`df -k $dir`) [-1]) [3];
printf "%-${max}s %7dkb %7dkb\n" => $dir, $used, $left;
}
__END__
Of course, this is unlike to work on non-Unix systems, but I do not
know the VMS equivalents of `du' and `df'. It shouldn't be too hard
to replace the `du' and `df' with the VMS equivalents though.
What do you say? Windows? What is that? I don't do Windows.
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 8 Aug 1999 18:20:47 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: Getting Info
Message-Id: <slrn7qrio3.tmm.fl_aggie@thepentagon.com>
On 8 Aug 1999 13:15:52 -0500, Abigail <abigail@delanet.com>, in
<slrn7qriaa.8pr.abigail@alexandra.delanet.com> wrote:
+ $sum = 0;
+ foreach (`du -sk $ARGV[0]/* | sort -nr`) {
+ print;
+ $sum += (split) [0];
+ }
+ print "Total: $sum\n";
Hmmm, yes, much better. This is why I'm still down in the mud, in
terms of perl expertise.
+ Of course, this is unlike to work on non-Unix systems
Well, yes, but that was my point in posting that (obviously inferior)
junk.
+ What do you say? Windows? What is that? I don't do Windows.
Heh.
James
------------------------------
Date: 8 Aug 1999 14:57:58 -0400
From: elflord@news.newsguy.com (Donovan Rebbechi)
Subject: Re: Getting Info
Message-Id: <slrn7qrkpl.2o8.elflord@panix3.panix.com>
On 08 Aug 1999 15:07:40 GMT, Jimtaylor5 wrote:
>Here's a question for you guys. Is there a way with perl to get the total kb of
>files in a directory, and the space left? If so could give me an example or
>direct me to where I can find the information. Thanks.
If you're on UNIX, you could do this:
my $diskuse=`du -s`;
You could also recurse through the file system sizing the files, and
add up the sizes,
eg something like this
( nb: pseudo code only. there are bugs: you need to include dotfiles,
and you need to consider special files ( fifos, etc ) more carefully.
# untested code
sub dir_size {
my $file=shift;
my $size=0;
if ( -f $file ) { return (stat($file))[7]; }
elsif ( -d $file )
{
foreach my $x ( <*> )
{
$size = $size + &dir_size($x);
}
return $size;
}
else return 0;
}
# end untested code
"space left" is an ambiguous term. What do you mean ?
--
Donovan
------------------------------
Date: 8 Aug 1999 13:19:49 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: matching ONLY first match in dada stream...
Message-Id: <slrn7qrihl.8pr.abigail@alexandra.delanet.com>
Bill Jones (bill@fccj.org) wrote on MMCLXVIII September MCMXCIII in
<URL:news:199908081434.KAA02389@astro.fccj.cc.fl.us>:
==
== OK; I am using the below to capture key MIS definitions -
==
== s{(mis\b)} {<A HREF="/cgi-bin/http_webster?isindex=$1">$1</A>}ig;
==
== But that matches everything, on each line, in the complete data (even
== without the global modifier.)
I do not believe you. Can you make a small program that shows this bug?
(That is, matching everything, without the /g modifier).
== I tried the below, to match just one, but it doesn't appear to work:
==
== s{(mis\b{1})} {<A HREF="/cgi-bin/http_webster?isindex=$1">$1</A>}i;
Doesn't work?, doesn't work? Perhaps you don't give it enough chocolate.
What do you expect it to do, and what does it? "Doesn't work" is a
pointless and useless statement, it's only purpose is to waste bandwidth.
Abigail
--
perl -wlne '}for($.){print' file # Count the number of lines.
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 08 Aug 1999 18:09:21 GMT
From: mck@iag.net (Matt)
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <37b0bf84.6235736@news.iag.net>
On 8 Aug 1999 17:17:10 GMT, fl_aggie@thepentagon.com (I R A Darth
Aggie) wrote:
>Oh, yes, I do. You were morphing your From: line, and the only reliable
>fingerprint for your posts was your ISP. In my experience, the only people
>who morph around like that are those attempting to evade killfiles. Such
>behaviour is considered rude. You don't want to post with a deliverable
>address? fine, but use only *one*.
Very well. I have been reprimanded, my knuckles are stinging, and I
have amended my foul ways.
>Because that was the only reliable way of nuking *your* posts. This is
>something that *you* thru *your* actions have directly caused.
I just do not understand the nuke happiness around here. During an
evaluation phase, where I was comparing Perl and Tcl for a project, I
monitored both groups. John O. started a thread in comp.lang.tcl
called "Why do you hate Perl?"
(http://x28.deja.com/[ST_rn=ps]/getdoc.xp?AN=450022348) For someone
who obviously had a personal interest in seeing the Tcl language
succed, such a subject seemed rather inappropriate. Even some of his
supporters suggested that he phrase the question differently.
My point here is that I chose to ignore the "misstep of politeness",
and I read the thread for it's technical value. In the end, a pro-Perl
post or two had the best value to me, as they were written in a
matter-of-fact, polite manner. These replies did not include any
killfile threats, they simply stated the useful facts. In the end, I
chose Perl for the project.
>You talk about public image, and perception. Take a deep breath, step
>back, and look at you own. It isn't exactly one that makes me want to
>take your words at face value...
I have, and I am OK with mine - it is not perfect, but it will do. I
do not suggest that I, or anyone else, is perfect. My involvement here
has been open, if improperly anonymous, and started with a "let's all
just get along" idea. I understand the backlash when someone comes
here and posts one of the following:
"How do I print to the command line ?"
"Perl seems to be LAME"
"VBScript Rules!"
"TCL is better because it is easier to read."
But if you indicate that all of my posts should be squelched because I
merely made an error in usenet etiquitte, I have equal difficulty in
believing that those with your attitude are more interested in a
cleaner c.l.p.m.
------------------------------
Date: 8 Aug 1999 13:22:04 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Newbie question
Message-Id: <slrn7qrilv.8pr.abigail@alexandra.delanet.com>
David Heller (dheller1@rochester.rr.com) wrote on MMCLXVIII September
MCMXCIII in <URL:news:37ADB9BA.7C3D679D@rochester.rr.com>:
[]
[] I get the following message from my perl interpreter: Warning Setting
[] locale failed Check your settings LC_ALL = (unset) and LANG = us what
[] does this mean and how do I fix it? my O.S. is NetBSD 1.4 .
Well, it means that setting your locale failed. And it suggests checking
your settings. Did you check them? Are they correct? Did you read the
manpage about locales? Did you read the man page about warnings/errors?
Did you do *anything* besides throwing your hands up in the air and
rushing to Usenet crying for help?
Abigail
--
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 8 Aug 1999 13:57:16 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Nicer Way
Message-Id: <slrn7qrknt.8pr.abigail@alexandra.delanet.com>
Larry Rosler (lr@hpl.hp.com) wrote on MMCLXVIII September MCMXCIII in
<URL:news:MPG.12176252de44a39b989e05@nntp.hpl.hp.com>:
.. In article <7okcio$jdk$1@lublin.zrz.tu-berlin.de> on 8 Aug 1999 16:51:36
.. -0000, Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> says...
.. ...
.. > I don't think pack() has been exploited yet. It brings back the \e
.. > modifier, but it's faster by a factor of almost three:
.. >
.. > #!/usr/bin/perl -w
.. > use strict;
.. >
.. > my $chmod = 'rwxr-xr-x';
.. > $chmod =~ tr/rwx-/1110/;
.. > $chmod =~ s/(...)/ord pack 'b3', $1/ge;
.. > print "$chmod\n";
.. > __END__
.. >
.. > I won't say how many attempts I took to make pack work. I lost
.. > count anyway.
..
.. About 3.5 times faster on this machine than the attempt I published a
.. few minutes ago. Certainly the 'nicest', by yet another dimension.
Ok, ok, Mr. Benchmark, I'm waiting for a full Benchmark report of all
proposed solutions .... ;-)
Abigail
--
perl -e '$a = q 94a75737420616e6f74686572205065726c204861636b65720a9 and
${qq$\x5F$} = q 97265646f9 and s g..g;
qq e\x63\x68\x72\x20\x30\x78$&eggee;
{eval if $a =~ s e..eqq qprint chr 0x$& and \x71\x20\x71\x71qeexcess}'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 8 Aug 1999 14:25:01 -0400
From: "James A Culp III" <admin@futuristic.net>
Subject: OffTopic Was(Re: Where to find help other than perldoc and books.)
Message-Id: <7okif5$k2s$1@ffx2nh3.news.uu.net>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote in message
news:7oki1t$jie$1@lublin.zrz.tu-berlin.de...
> James A Culp III <admin@futuristic.net> wrote in comp.lang.perl.misc:
>
> [...]
>
> >My apologies for the lousy line wraps I haven't been able to get a decent
> >Usenet client for my linux machine working. So I'm stuck with this MS
> >garbage.
>
> Your linewraps are fine, but if you want a decent newsreader, I
> recommend trn. It's a no-frills ascii reader, but it gives you
> a clear view of what's going on in a newsgroup. It's also free
> and compiles painlessly on every machine I've tried.
>
> Anno
No luck for me with trn I wish I could find it I'm more comfortable in a
telnet session to my server. (i.e. text only)
But thanks for the advice I'll get it one of these hours, days, months,
etc...
--
James A Culp III
admin@futuristic.net
http://www.futuristic.net/ for inexpensive web, domain, and e-mail hosting
------------------------------
Date: Sun, 08 Aug 1999 20:19:21 +0300
From: Pavel Ravits <br2@netvision.net.il>
Subject: PerlQt 2.008
Message-Id: <37ADBC19.C4D720DA@netvision.net.il>
Hi,
If somebody using PerlQt 2nd version and/or got undefined symbol in Qt.pm
please contact - I need to know how I can make it work,
PerlQt compiled and installed but programs don't work because that.
Maybe something with my versions not good - I have perl 5.004_05 and Qt 1.42
Thanks,
Pavel
------------------------------
Date: 8 Aug 1999 14:37:31 -0400
From: elflord@news.newsguy.com (Donovan Rebbechi)
Subject: Re: PerlQt 2.008
Message-Id: <slrn7qrjjb.2o8.elflord@panix3.panix.com>
On Sun, 08 Aug 1999 20:19:21 +0300, Pavel Ravits wrote:
>If somebody using PerlQt 2nd version and/or got undefined symbol in Qt.pm
>please contact - I need to know how I can make it work,
>PerlQt compiled and installed but programs don't work because that.
>Maybe something with my versions not good - I have perl 5.004_05 and Qt 1.42
I tried Perl-QT and didn't have much more luck than you.
Unless you really need QT, I'd recommend perl-Tk. It's maintained
( unlike perl-QT ) , and the docs are good ( again, unlike perl-QT ).
If you use perl-QT, you're also most likely going to have your programs
break when QT-2.0 becomes widely used ( will perl-QT ever be
ported to QT-2.0 ? )
Like you, I'd like to learn QT, but I will probably just do it in C++
cheers,
--
Donovan
------------------------------
Date: Sun, 08 Aug 1999 10:34:13 -0800
From: angela <anonymous@web.remarq.com>
Subject: Translation of some nice little Perl scripts to produce an executable program.
Message-Id: <934137257.10424@www.remarq.com>
Hi,
We have created some nice little Perl scripts, that run
under<A
HREF="http://www.lawyerboys.com">http://www.lawyerboys.com</
A>.
1. a game: /lovengine.html or http://www.lovengine.com
2. a multiple poll: /polls.html
Now we are looking for someone, who is able to translate
these scipts into a language that allows executable programs
to run on a PC.
Thank you in advance.
regards
Angela
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Sun, 8 Aug 1999 13:58:34 -0400
From: "James A Culp III" <admin@futuristic.net>
Subject: Re: Where to find help other than perldoc and books.
Message-Id: <7okgth$ivo$1@ffx2nh3.news.uu.net>
I R A Darth Aggie <fl_aggie@thepentagon.com> wrote in message
news:slrn7qrfau.tfp.fl_aggie@thepentagon.com...
> On Sun, 8 Aug 1999 04:33:07 -0400, James A Culp III
<admin@futuristic.net>, in
> <7ojfp8$p94$1@ffx2nh3.news.uu.net> wrote:
>
> + I am interested in finding one or more experienced perl programmers
> + that would be willing to spend a minimal amount of time (by their
> + definition) to peruse code, and answer style
>
> You've read perlstyle, I take it?
>
> James
>
Thank you for your response I R.
Actually yes I have read perlstyle, and I follow most of the advice in it.
However in my previous post "style" was probably the wrong word. I need
assistance with questions like:
"Should I make this script a bunch of sub-routines or just run it straight
through?"
The type of question that can only be answered from experience.
That actually is one of my questions and I'm sure it is answered in one of
the many perl books that I have purchased but I have been unable to find it
using the proper search methods (index, toc, etc) and have seen no
references in the perl documentation that I am aware of.
I also would like to find a person or group of people that could look over
my code and/or snippets and critique it giving recommendations for better
methods etc.
Basically yes those unwritten flames are correct, I want a teacher without
paying the tuition. I cannot afford to goto college at the moment due to
having to support a family, but at the moment all of my free time and some
of my time at work goes into improving my knowledge of Perl. I just feel I
need to find an internet site or group of people willing to basically point
me in the right direction.
Teaching yourself works but it goes alot faster and less painfully if
someone is there to push you in the right direction somewhat.
Thank you for reading this far down, any comments are appreciated either
here or via e-mail.
My apologies for the lousy line wraps I haven't been able to get a decent
Usenet client for my linux machine working. So I'm stuck with this MS
garbage.
Sincerely,
James A Culp III
admin@futuristic.net
http://www.futuristic.net/ for inexpensive web, domain, and e-mail hosting
------------------------------
Date: Sun, 8 Aug 1999 14:08:06 -0400
From: "James A Culp III" <admin@futuristic.net>
Subject: Re: Where to find help other than perldoc and books.
Message-Id: <7okhfd$jcc$1@ffx2nh3.news.uu.net>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote in message
news:7okg5j$jg3$1@lublin.zrz.tu-berlin.de...
> James A Culp III <admin@futuristic.net> wrote in comp.lang.perl.misc:
> > Is there a newsgroup, website, or group of people one can goto for
> >critiques of code. I am just beginning to learn perl, and have many
style
> >based questions that cannot or are not answered in any FAQ, or document
that
> >I have come across.
> >
> > I am interested in finding one or more experienced perl programmers
> >that would be willing to spend a minimal amount of time (by their
> >definition) to peruse code, and answer style and hard-headed newbie
> >questions. I would post some of these here but am frankly not anxious to
A)
> >waste bandwidth for what most would consider silly/stupid questions and
B)
> >draw flames upon myself for asking silly/stupid questions.
>
> Oh, easy. Just post your code here. Don't ask for critique, though.
> Claim it's the optimal solution that can't be improved, no way, noho, sir.
>
> Serious answer: You can get that here if you observe a few points.
>
> - Post a self-contained script, that demonstrates your solution to
> a single problem. Usually that means not to dump to the newsgroup
> a script as it exists on your machine. Isolate a salient point,
> if possible in just five to ten lines, but then make it self-
> contained. If necessary, include data using the __DATA__ construct.
>
> - Start your script with the lines
>
> #!/your/path/to/perl -w
> use strict;
>
> Note the -w at the end of the first line. People are much more
> inclined to take a closer look if your script compiles and gives
> no warnings with these two restrictions. Also, if you have to
> open files, always check for success, as in
>
> open( IN, $file) or die "Can't read $file: $!\n";
>
Actually I learned these in the last 2 weeks of following this newsgroup as
I have learned quite a bit about howto manipulate perldoc to coax out the
information I desire. :)
And -w is a bitch (excuse my language) but it sure does make you write nice
"clean" code this I have learned. Same with use strict;
> If you observe these points, you have avoided the three most
> frequent reasons for people to dismiss your code as inadequate
> without even bothering to look closer.
>
> - Be sure your question is a Perl question. This group is not
> about HTML, or CGI, or Databases. Asking questions about
> one of the above is another common reason why posters receive
> errmmm... unsatisfactory replies in this group.
>
> - Be sure your question isn't answered in the documentation that
> comes with Perl. You access this with the perldoc command, which
> is also included in any recent Perl installation. In particular,
> you can read about all Perl functions if you issue the command
>
> perldoc -f <function-name>
>
> The documentation also includes the FAQ list. This is accessed
> by
>
> perldoc -q <keyword>
>
> , which scans all the questions for the given keyword and displays
> the answers. Of course, perldoc explains itself more fully if
> you type "perldoc perldoc".
Contrary to alot of "newbies" I do not fear man pages or perldoc output I
find it quite concise, however until I started following this newsgroup (the
day I took up Perl for fun and profit) I was not aware that perldoc existed
and couldn't figure out why man never turned up the answers I expected.
perldoc is also a LOT faster than waiting for Usenet answers (no offense).
>
> Good luck.
Thanks I'll probably need it :)
>
> Anno
>
>
Please forgive the clarity of my response I find it difficult to put
thoughts into words most times. I'm Definitely not English Lit. material.
--
James A Culp III
admin@futuristic.net
http://www.futuristic.net/ for inexpensive web, domain, and e-mail hosting
------------------------------
Date: 8 Aug 1999 18:25:01 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Where to find help other than perldoc and books.
Message-Id: <7oki1t$jie$1@lublin.zrz.tu-berlin.de>
James A Culp III <admin@futuristic.net> wrote in comp.lang.perl.misc:
[...]
>My apologies for the lousy line wraps I haven't been able to get a decent
>Usenet client for my linux machine working. So I'm stuck with this MS
>garbage.
Your linewraps are fine, but if you want a decent newsreader, I
recommend trn. It's a no-frills ascii reader, but it gives you
a clear view of what's going on in a newsgroup. It's also free
and compiles painlessly on every machine I've tried.
Anno
------------------------------
Date: 08 Aug 1999 14:35:04 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Where to find help other than perldoc and books.
Message-Id: <x77ln6f7dz.fsf@home.sysarch.com>
>>>>> "JAC" == James A Culp <admin@futuristic.net> writes:
JAC> "Should I make this script a bunch of sub-routines or just run it
JAC> straight through?"
JAC> The type of question that can only be answered from experience.
too true. that is the definition of experience. that answer which is
known without always being to express how it is known. i call it my gut
feeling. i use it to mark the boundaries between client/server, api's,
objects, etc. it can't be easily taught in a course.
JAC> That actually is one of my questions and I'm sure it is answered
JAC> in one of the many perl books that I have purchased but I have
JAC> been unable to find it using the proper search methods (index,
JAC> toc, etc) and have seen no references in the perl documentation
JAC> that I am aware of.
that is a general programming problem not specific to perl. perl has its
idiomatic ways which influence your decisions, but deciding what to make
a sub is a problem in all languages
JAC> I also would like to find a person or group of people that could
JAC> look over my code and/or snippets and critique it giving
JAC> recommendations for better methods etc.
try your local perl monger's group. go to www.pm.org and see if there is
a local chapter. the boston pm does tech meetings once a month and code
review (and shredding) is a common topic. other groups do similar
things.
if the code or sub is short enough (< 30 lines or so) then posting here
is sorta ok. heed anno's comments on making sure the basics like -w and
strict are covered.
JAC> My apologies for the lousy line wraps I haven't been able to get
JAC> a decent Usenet client for my linux machine working. So I'm stuck
JAC> with this MS garbage.
there are plenty. try gnus in emacs. don't worry about tom c. flaming to
use something else as he won't see this post i think. he has banned my
email to him and he hasn't followed up a post of mine in a while. wait
until i corner him in monterey.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 8 Aug 1999 18:32:32 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: Where to find help other than perldoc and books.
Message-Id: <slrn7qrje3.tmm.fl_aggie@thepentagon.com>
On Sun, 8 Aug 1999 13:58:34 -0400, James A Culp III <admin@futuristic.net>, in
<7okgth$ivo$1@ffx2nh3.news.uu.net> wrote:
+ However in my previous post "style" was probably the wrong word. I need
+ assistance with questions like:
Perhaps... :)
+ "Should I make this script a bunch of sub-routines or just run it straight
+ through?"
+ The type of question that can only be answered from experience.
Yes. I tend to write scripts that do one thing, and only one thing. If
there are obvious sub-routines, then I'll break them up into such. Most
of my programs are only a few dozen or so lines long, and so for the
most part, I don't have subroutines.
Much more, tho, and they'd have to get broken up.
+ That actually is one of my questions and I'm sure it is answered in one of
+ the many perl books that I have purchased but I have been unable to find it
+ using the proper search methods (index, toc, etc) and have seen no
+ references in the perl documentation that I am aware of.
I can't say that I've noticed such a recommendation. Its an application
and/or sanity-specific thing. My personal rule-of-thumb is: if making
additional modifications means I start tearing my hair out, it's well
past time to subdivide the problem into components.
Smarter people than me do that as a first step...
+ I also would like to find a person or group of people that could look over
+ my code and/or snippets and critique it giving recommendations for better
+ methods etc.
Code review, probably a good thing. I would recommend using good subjects,
possibly with [Review Request] or similiar as a preface. Also a handy
killfile tag for those who wish to remain oblivious. You could try that,
as an experiment. Might be useful to other people to look and see what
comes out.
+ My apologies for the lousy line wraps I haven't been able to get a decent
+ Usenet client for my linux machine working. So I'm stuck with this MS
+ garbage.
The line wraps aren't too bad. Have you tried slrn under linux? I
kinda like it.
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: Sun, 8 Aug 1999 14:42:57 -0400
From: "James A Culp III" <admin@futuristic.net>
Subject: Re: Where to find help other than perldoc and books.
Message-Id: <7okjgp$krn$1@ffx2nh3.news.uu.net>
Uri Guttman <uri@sysarch.com> wrote in message
news:x77ln6f7dz.fsf@home.sysarch.com...
> >>>>> "JAC" == James A Culp <admin@futuristic.net> writes:
>
>
> JAC> "Should I make this script a bunch of sub-routines or just run it
> JAC> straight through?"
>
> JAC> The type of question that can only be answered from experience.
>
> too true. that is the definition of experience. that answer which is
> known without always being to express how it is known. i call it my gut
> feeling. i use it to mark the boundaries between client/server, api's,
> objects, etc. it can't be easily taught in a course.
>
> JAC> That actually is one of my questions and I'm sure it is answered
> JAC> in one of the many perl books that I have purchased but I have
> JAC> been unable to find it using the proper search methods (index,
> JAC> toc, etc) and have seen no references in the perl documentation
> JAC> that I am aware of.
>
> that is a general programming problem not specific to perl. perl has its
> idiomatic ways which influence your decisions, but deciding what to make
> a sub is a problem in all languages
>
> JAC> I also would like to find a person or group of people that could
> JAC> look over my code and/or snippets and critique it giving
> JAC> recommendations for better methods etc.
>
> try your local perl monger's group. go to www.pm.org and see if there is
> a local chapter. the boston pm does tech meetings once a month and code
> review (and shredding) is a common topic. other groups do similar
> things.
Actually I'm in a fairly perl (perlicly?) challenged area, Eastern Shore of
Maryland. There is no local Perl Mongers group so I applied to start one
hoping that I'm not the only one in the area. If I have any luck maybe I'll
meet others.
sub humour {
Until then which way did you say boston is?
And can I speak english there or do I need to learn Bostonese?
}
>
> if the code or sub is short enough (< 30 lines or so) then posting here
> is sorta ok. heed anno's comments on making sure the basics like -w and
> strict are covered.
>
<snip my newsreader disclaimer>
> there are plenty. try gnus in emacs. don't worry about tom c. flaming to
> use something else as he won't see this post i think. he has banned my
> email to him and he hasn't followed up a post of mine in a while. wait
> until i corner him in monterey.
>
> uri
>
> --
> Uri Guttman ----------------- SYStems ARCHitecture and Software
Engineering
> uri@sysarch.com --------------------------- Perl, Internet, UNIX
Consulting
> Have Perl, Will Travel -----------------------------
http://www.sysarch.com
> The Best Search Engine on the Net -------------
http://www.northernlight.com
> "F**king Windows 98", said the general in South Park before shooting Bill.
Thanks,
James A Culp III
admin@futuristic.net
http://www.futuristic.net/ for inexpensive web, domain, and e-mail hosting
------------------------------
Date: Sun, 8 Aug 1999 20:51:24 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: Where to find help other than perldoc and books.
Message-Id: <Wkkr3.407$Xp2.3571@news1.online.no>
James A Culp III <admin@futuristic.net> wrote in message
news:7okhfd$jcc$1@ffx2nh3.news.uu.net...
> perldoc is also a LOT faster than waiting for Usenet answers (no offense).
perldoc should be faster than asking the question in the first place :-)
--
Trond Michelsen
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
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 V9 Issue 421
*************************************