[12587] in Perl-Users-Digest
Perl-Users Digest, Issue: 6187 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 1 04:17:14 1999
Date: Thu, 1 Jul 99 01:00:23 -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 Thu, 1 Jul 1999 Volume: 8 Number: 6187
Today's topics:
Re: "push" 2 dim array <kgentes@worshipmusic.com>
Re: Apples and Oranges <dgris@moiraine.dimensional.com>
Re: Clueless and in need of help! <JFedor@datacom-css.com>
Extracting OLE files from MS Access? (Lee Borkman)
HELP!!!! PLEASE!!!! <anfinger@mediaone.net>
Re: HELP!!!! PLEASE!!!! (Andreas Fehr)
Re: How to store hashes (Bart Lateur)
Re: I'm looking for some virgin men, send me a message <garyg@gator.net>
Re: Inserting @ in a string??? <JFedor@datacom-css.com>
Re: killing subprocess ==> reproducible core dump <jwz@jwz.org>
make my day fix an array :-) <wavey@pilot.infi.net>
Re: make my day fix an array :-) <uri@sysarch.com>
Re: Modules on Win32 <JFedor@datacom-css.com>
Re: Net::FTP get with space in filename? <JFedor@datacom-css.com>
Re: Perl or PNP...which is better? <nospam.newton@gmx.net>
Re: Perl or PNP...which is better? <nospam.newton@gmx.net>
Perl Problem with Netscape, but not lynx... illiath@my-deja.com
Re: Perl Problem with Netscape, but not lynx... <nospam.newton@gmx.net>
Premature end of script headers: <mycheese@kconline.com>
Re: Printing Strange Hex Characters to a File (Abigail)
Re: regex to match RCS string (Abigail)
Re: regExpr question. (Bart Lateur)
Re: Robot email/poster for this group (Lee)
Should I use fetchrow_hashref for this? <gjohn@crossland.com.au>
solved e: dynaloader francesc_guasch@my-deja.com
Re: strange regex behaviour - don't understand what's g (I.J. Garlick)
Using strict <socket0@hotmail.com>
Re: Using strict <uri@sysarch.com>
Re: why doesn't this for loop work <nospam.newton@gmx.net>
Re: yacc like tool <mustafa@india.ti.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 01 Jul 1999 07:08:40 GMT
From: "Kim Gentes" <kgentes@worshipmusic.com>
Subject: Re: "push" 2 dim array
Message-Id: <YtEe3.49680$Fz2.7210@news.rdc1.az.home.com>
again, a crucial cockpit error.. you were right (and come to think
of it, so was I- originally)... my problem was that I couldn't see
the variable being refreshed in the ActiveState debugger. So
I "thought" (I use the term loosely) that meant the operation
was ill formed. Instead it was the use of the ActiveState
debugger variable viewer that was ill informed.
sorry for the rucus...
-----------------------------------------------------------
as I heard a VB programmer once say "I gravel at your feet"..
and the Perl hacker replied.. "It's 'grovel', you idiot. Now put
that regexp down before you hurt yourself".
Signed,
$Line->{King}
Tad McClellan <tadmc@metronet.com> wrote in message
news:06cel7.cb2.ln@magna.metronet.com...
>
> : # push @{$TelProbRec{ProbeMicro}}, [@fields [2..4]];
>
>
> It would have been oh so much clearer if you had made
> a complete Perl program that illustrates what you are
> trying to do.
>
> I don't see any problem there.
>
> If you do, please try explaining it again (with real code
> that "doesn't work")
>
------------------------------
Date: 01 Jul 1999 00:28:39 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: Apples and Oranges
Message-Id: <m3btdwq3xk.fsf@moiraine.dimensional.com>
tadmc@metronet.com (Tad McClellan) writes:
> [ snip code. Only Silly People need to look at it because they
> are the only ones who use symbolic references. ]
Nonsense.
% cd lib/perl5/5.00503
% egrep -l 'no[[:space:]]+strict.*refs' **/*.pm | wc -l
21
%
dgris
--
Daniel Grisinger dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: Thu, 1 Jul 1999 04:06:36 -0400
From: "Jody Fedor" <JFedor@datacom-css.com>
Subject: Re: Clueless and in need of help!
Message-Id: <7lf5nn$4is$1@plonk.apk.net>
Harmanie wrote in message <19990630215511.23761.00004679@ng-cf1.aol.com>...
>How in the heck to I run the acecard.pl from the operating system?
>Christine
http://www.yoursite.com/cgi-bin/acecard.pl
should work if you have it all installed correctly and have chmod acecard.pl
to 755 and uploaded it to your server in ascii.
Jody
------------------------------
Date: Thu, 01 Jul 1999 05:18:45 GMT
From: borkman@usa.net (Lee Borkman)
Subject: Extracting OLE files from MS Access?
Message-Id: <377af9d8.6653807@news>
Hi all,
Anyone know how to extract OLE images from an MS Access database?
I have about 1000 images which need to be saved to separate files for
Intranet publishing.
DBD::ODBC, win32::ODBC?
TIA,
Lee Borkman
------------------------------
Date: Thu, 01 Jul 1999 02:26:49 -0400
From: Ice Nyne <anfinger@mediaone.net>
Subject: HELP!!!! PLEASE!!!!
Message-Id: <377B0A28.509ECB31@mediaone.net>
How do I start the program activeperl?!? please help!
------------------------------
Date: Thu, 01 Jul 1999 07:26:29 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: HELP!!!! PLEASE!!!!
Message-Id: <1103_930813989@chstaw0439>
On Thu, 01 Jul 1999 02:26:49 -0400, Ice Nyne <anfinger@mediaone.net> wrote:
> How do I start the program activeperl?!? please help!
>
>
>
The following worked for me:
Get a PC running Windows NT (or 95/98)
Load ActivePerl from http://www.activestate.com (binaries as a setup for Windows)
Run the setup
Read the documentation
Hope this helps??
------------------------------
Date: Thu, 01 Jul 1999 06:48:30 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: How to store hashes
Message-Id: <37800700.2487937@news.skynet.be>
Abigail wrote:
>!! I would use a tab-delimited file.
>
>That's about the last thing I would do.
>
>Why not use a DBM file?
DB files tend to grow terribly big. If you just want to store some
temporary session data, tab-delimited text files are as small as it can
get.
Plus, (some) DB engines do have a reputation of being not too robust.
See the recent thread about the Berkely DB ("Tied hash not scaling -
advice?", <news:7lbp4n$2d0$1@shell2.ba.best.com>), and in the "full-text
searching in Perl" article in DDJ jan 1999 ("I've had several
crashes...").
>Or, if you plan to read/write the entire hash
>at once, something like Data::Dumper, Storable, or FreezeThaw?
Hmmm... executable datafiles? Nice. World-writable, no less. Very
secure.
Aren't you promoting pre-canned solutions just because they are just
that: "pre-canned"?
>I don't understand your point about spreadsheet cells. We're talking
>about hashes, don't we?
I'm taking about "real live data". Many (most?) DB engines don't even
allow tabs or newlines in their data fields. Most users never miss it.
You *can* encode tabs and newlines (and backslashes) like this, if you
must:
local($\,$,) = ("\n","\t");
foreach $key (keys %hash) {
my $value = $hash{$key};
$value =~ s/([\\\n\t])/{ "\\" => "\\\\", "\n" => "\\n",
"\t" => "\\t"}->{$1}/ge;
print $key,$value;
}
and decode it as
while(<FILE>) {
chomp;
my($key,$value) = split /\t/;
$value =~ s/\\([\\nt])/{ "\\" => "\\", n => "\n",
t => "\t"}->{$1}/ge;
$hash{$key} = $value;
}
Bart.
------------------------------
Date: Thu, 01 Jul 1999 02:05:56 -0400
From: "Gary M. Greenberg" <garyg@gator.net>
Subject: Re: I'm looking for some virgin men, send me a message and what you're in to.
Message-Id: <377B0544.CF6FBB6E@gator.net>
Hmmm, you might try following the thread:
how do i fucking run perl w32
;p
Jen Balcmon wrote:
>
> I'm looking for some virgin men, send me a message and what you're in to.
Gary
Putting out fire with gasoline
------------------------------
Date: Thu, 1 Jul 1999 04:29:29 -0400
From: "Jody Fedor" <JFedor@datacom-css.com>
Subject: Re: Inserting @ in a string???
Message-Id: <7lf72i$588$1@plonk.apk.net>
Dan Gervais wrote in message ...
>
>How can I insert a @ in a string in a perl script???
>if I do it as so:
>
># print MAIL "sales@multicorpora.ca\n\n;
>
>The script doesn't want to run. Is there a special way of inserting a @???
>
>
You just need to escape the character by using a \ in front of it:
print MAIL "sales\@multicorpora.ca\n\n";
Jody
------------------------------
Date: Thu, 01 Jul 1999 00:31:43 -0700
From: Jamie Zawinski <jwz@jwz.org>
Subject: Re: killing subprocess ==> reproducible core dump
Message-Id: <377B195F.5A483DDF@jwz.org>
Jason Reed wrote:
>
> How about this: (I moved the waitpid outside the signal handler
> and the alarm inside the if-open-pipe-successful)
Yup, that works. Well, I had to make one more change to get the
subprocess to actually die: instead of
$pid = open (F, "| program")
I had to do
$pid = open (F, "| exec program")
so that $pid was actually the pid of "program" and not the pid of
the "sh" that was running "program". Without that "kill('TERM', $pid)"
didn't actually kill it. I can almost understand why this is, but then,
no, not really. I had to do this same kind of crazy thing with
xscreensaver, and never fully understood why.
Anyway, thanks for your help. http://www.jwz.org/webcollage/ is
significantly more robust now!
--
Jamie Zawinski jwz@jwz.org http://www.jwz.org/
------------------------------
Date: Thu, 01 Jul 1999 02:00:56 -0400
From: "Mr. Dave" <wavey@pilot.infi.net>
Subject: make my day fix an array :-)
Message-Id: <377B0418.89E266ED@pilot.infi.net>
This is a snippet of a data file that my script will work on
=casper64= Jun 10 00:45:42, dane
=maddog= Jun 10 00:54:15, dane
=casper64= Jun 10 00:56:12, jamesgr
Any one know an efficiant way to eliminate lines that have the same
=user= and are within one minute of each other? Keep in mind the array
might me as large as 800 or more elements! If I sort the array (=user=
will be in ABC order) I have a subroutine that can eliminate entries
within a minute of each other. But I need the entries in chronological
order....
Any help would be greatly appreciated =]
Thanx in advance!!
------------------------------
Date: 01 Jul 1999 03:26:11 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: make my day fix an array :-)
Message-Id: <x7iu844yr0.fsf@home.sysarch.com>
>>>>> "D" == Dave <wavey@pilot.infi.net> writes:
D> This is a snippet of a data file that my script will work on
D> =casper64= Jun 10 00:45:42, dane
D> =maddog= Jun 10 00:54:15, dane
D> =casper64= Jun 10 00:56:12, jamesgr
D> Any one know an efficiant way to eliminate lines that have the same
D> =user= and are within one minute of each other? Keep in mind the array
D> might me as large as 800 or more elements! If I sort the array (=user=
D> will be in ABC order) I have a subroutine that can eliminate entries
D> within a minute of each other. But I need the entries in chronological
D> order....
so sort them by name and run your sub and then sort the result by time.
duh!!
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
------------------------------
Date: Thu, 1 Jul 1999 04:26:08 -0400
From: "Jody Fedor" <JFedor@datacom-css.com>
Subject: Re: Modules on Win32
Message-Id: <7lf6s8$54i$1@plonk.apk.net>
Jordan Hiller wrote in message <377A5DA4.C5C9E0A9@email.com>...
>I run ActiveState's Perl for Win32 on my Windows 98 machine. How do I
install
>modules from CPAN?
http://www.activestate.com/package/
Jody
------------------------------
Date: Thu, 1 Jul 1999 04:21:26 -0400
From: "Jody Fedor" <JFedor@datacom-css.com>
Subject: Re: Net::FTP get with space in filename?
Message-Id: <7lf6je$506$1@plonk.apk.net>
leow wrote in message <377A60AF.4A90FD7A@ufl.edu>...
>Hello,
>Leo Wierzbowski
>Univ of Florda
>leow@ufl.edu
Try using %20 for the space.... ie. .... this%20file.htm
Jody
>
------------------------------
Date: Thu, 01 Jul 1999 08:32:18 +0200
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: Perl or PNP...which is better?
Message-Id: <377B0B72.F995FFBE@gmx.net>
Cameron Laird wrote:
>
> In article <drkcl7.4j.ln@magna.metronet.com>,
> Tad McClellan <tadmc@metronet.com> wrote:
> >
> > What is PHP?
>
> VERY roughly, a simpler language than Perl for just Web scripting
> <URL:http://starbase.neosoft.com/~claird/comp.infosystems.www.servers.misc/php.html>.
Stands for "PHP: Hypertext Preprocessor". Home page at
http://www.php.net .
Cheers,
Philip
------------------------------
Date: Thu, 01 Jul 1999 08:32:31 +0200
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: Perl or PNP...which is better?
Message-Id: <377B0B7F.BB6ABFA2@gmx.net>
Ook! wrote:
>
> Um, did the poster mean "PHP"?
Yes.
Cheers,
Philip
------------------------------
Date: Thu, 01 Jul 1999 05:59:00 GMT
From: illiath@my-deja.com
Subject: Perl Problem with Netscape, but not lynx...
Message-Id: <7lf030$4m1$1@nnrp1.deja.com>
I'm just starting to learn perl/cgi programming, and I've got a small
problem here.
I have written a small script (it doesn't do all it's supposed to do but
that's not important really), and it displays fine (when using lynx),
but netscape refuses to display it at all.
I'm not sure whether this is just a problem with netscape, or whether my
code is faulty, and unfortunately as I am posting this from deja I am
unable to attach the script... so... umm.. yeah...
Everything else seems to be saying it is fine, If I ask netscape to
display the source of the page (the output from the script), it displays
the source code properly.
I can't see what's causing this problem as I've based the script on a
lot of example scripts I've seen, or got here, and the initial headers
appear fine in comparison.
I'm runnning Debian Linux (potato), running perl 5.004_004, netscape
4.6(1? not sure there), and apache 1.3.6 (with full cgi-bin/perl support
modules).
As I say, lynx works fine (I have not been able to check it with IE as I
only have the one machine <grin>).
Hope someone can tell me what I am doing wrong here.
Regards,
Peter Ludwig
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 01 Jul 1999 08:41:01 +0200
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: Perl Problem with Netscape, but not lynx...
Message-Id: <377B0D7D.547A16C5@gmx.net>
illiath@my-deja.com wrote:
>
> Hope someone can tell me what I am doing wrong here.
You have an error on line 27.
Cheers,
Philip
------------------------------
Date: Thu, 1 Jul 1999 01:59:31 -0500
From: "Mike Lansing" <mycheese@kconline.com>
Subject: Premature end of script headers:
Message-Id: <7lf3k0$2j61$1@nix2.kconline.com>
Ok whats with this? I am somewhat young at the perl site of programming. I
have the same script on two diffrent servers...one works the other doesn't
so it goes with out fail that something on my code that talks to the server
is off its block..
Premature end of script headers:
/mnt/web/guide/thepunkpage/cgibin/submit_form.cgi
thats the error I recieve. is there any good tuts or help files that teach
an idiot like myself what to do in this case?!?! my code is 4 blocks long
so I wont post it....
- Mike
http://come.to/NodProgrammingInc
mycheese@kconline.com
------------------------------
Date: 1 Jul 1999 02:23:22 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Printing Strange Hex Characters to a File
Message-Id: <slrn7nm5qo.31h.abigail@alexandra.delanet.com>
stefs@interlog.com (stefs@interlog.com) wrote on MMCXXIX September
MCMXCIII in <URL:news:7le1al$q8t$1@nnrp1.deja.com>:
!! Hello,
!! This is probably a _really_ simple question,
!! but its causing a bit of grief. How can we
!! put 'strange' hex values that we 'build up'
!! out to a file.
Introduce them to each other first, so they don't feel strange anymore?
!! Okay, some clarification is always helpful via
!! code:
!!
!! open (fp, ">data");
!!
!! my $characters="cc00ff00";
!!
!! while (length($characters)>0)
!! { my $chop_char=chop $characters;
!! my $tmp_value="00$chop_char";
!! my $value=sprintf("%.3X",$tmp_value);
!! print fp $value;
!! }
!!
!! close (fp);
!!
!! The ultimate result would be a file that had
!! the characters as follows:
!!
!! <0x000><0x000><0x00f><0x00f> ...
Hmmm, do you really want those <>'s there? Your code doesn't reflect
that, so assume not. Instead of processing it character by character,
why not all at once?
my $characters = reverse "cc00ff00";
$characters =~ s/./0x00$1/g;
open (fp, "> data") or die "Failed to open data: $!";
print fp $characters;
close fp;
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\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: 1 Jul 1999 02:28:16 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: regex to match RCS string
Message-Id: <slrn7nm640.31h.abigail@alexandra.delanet.com>
Tim Potter (Tim.Potter@anu.edu.au) wrote on MMCXXX September MCMXCIII in
<URL:news:6yoghx6ltx.fsf@acronym.anu.edu.au>:
`` I'm trying to write a regex to match what rcsfile(5) defines as a
`` string. From the manual page, a string is defined as
``
`` string ::= @{any character, with @ doubled}*@
``
`` so I came up with the following regex
``
`` /^(@((@@)|([^@]))*@)$/
``
`` This regex works fine for small strings but for large strings (900
`` lines at ~40KB) perl crashes with a segmentation fault. Does anyone
`` have any hints for rewriting this so it actually works? )-:
``
Which version of Perl is that? Perl shouldn't segfault.
I would write it as:
/^@(?:[^@]+|@@)*@$/
which doesn't set a gazillion $DIGITS variables.
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: Thu, 01 Jul 1999 06:48:27 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: regExpr question.
Message-Id: <377affec.675687@news.skynet.be>
marlon wrote:
>> > $foo =~ /<!-- something unique 1 -->(.*?)<!-- something unique 2 -->/s;
>> > print $1;
>
> 1) Why do I need both the * and the ?, I've tried it with and with out
> the ? and both results are the same.
Try it with two of those substrings in the string in $foo. You'll soon
see the difference.
Bart.
------------------------------
Date: Thu, 01 Jul 1999 02:31:28 -0500
From: rlb@intrinsix.ca (Lee)
Subject: Re: Robot email/poster for this group
Message-Id: <B3A083809668F4693@204.112.166.88>
In article <7lecnn$o37$1@news.NERO.NET>,
stanley@skyking.OCE.ORST.EDU (John Stanley) wrote:
>People discussing perl is what this group was created for.
Maybe, but that's rarely what it's used for.
It's mostly a Q and A group. Most of the Qs are FAQs and most of the As are
rude. I'm glad that a solution to this is being sought, because I would
like to see some actual discussion now and then.
Now that we know what you stand against, can you tell us what you stand
for? Do you like the group as-is? If not, do you have a suggestion that
does not (presumably) involve bots?
Lee
------------------------------
Date: Thu, 01 Jul 1999 06:48:55 GMT
From: GJohn <gjohn@crossland.com.au>
Subject: Should I use fetchrow_hashref for this?
Message-Id: <7lf30l$5fa$1@nnrp1.deja.com>
I am just starting with Perl CGI scripts.
I have been asked to recreate in Perl what someone has done in VB using
recordsets. I have an sql statement which involves about 10 columns in
2 tables. I have no problem in printing this info in various ways using
DBI:DBD. But the VB application then travelled backwards through all
the rows returned (the recordset), doing various calculations & using a
couple of arrays to keep track of amounts. Then, it printed the data in
the original order with a couple of extra (calculated) columns also
printed. I have a couple of questions:
* I am hoping to code using column names if possible, instead of
array positions, in case we add columns to the tables later. However,
if it's much easier to code, I'm happy to use array positions.
* My documentation suggests fetchrow_hashref "is currently not
portable between databases because different databases return field
names with different letter cases". Also, it says "currently a new hash
reference is returned for each row. This is likely to change so don't
rely on it". Do you think fetchrow_hashref is okay to use?
* I would like to see some example code where all rows are collected
in hash/array etc, then processed, then printed, ideally using column
names for access, such as hashref. At the moment I have only seen code
whereby the rows are processed as they are retrieved by the cursor. Any
suggestions of URL for such an example?
Thanks in advance,
Gary Robertson
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 01 Jul 1999 07:33:39 GMT
From: francesc_guasch@my-deja.com
Subject: solved e: dynaloader
Message-Id: <7lf5kj$782$1@nnrp1.deja.com>
I just solved this issue manually copying the file libmysqlclient.a
from the mysql sources to /usr/lib
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 1 Jul 1999 07:50:06 GMT
From: ijg@connect.org.uk (I.J. Garlick)
Subject: Re: strange regex behaviour - don't understand what's going on
Message-Id: <FE6LrI.un@csc.liv.ac.uk>
In article <e6ldl7.e02.ln@magna.metronet.com>,
tadmc@metronet.com (Tad McClellan) writes:
> I.J. Garlick (ijg@connect.org.uk) wrote:
>
>
> I do not get any messages when I run that code...
Hmmmm. Rick Delaney sent me email stating that he doesn't get said error
in 5.005_03 only in 5.004_04. This probably explains a few things since we
are running 5.004_04 here :-) (His post hasn't shown up here yet, at least
on my news feed)
He's a very nice man though as he supplied a fix as well (for 5.004_04
that is)
Looks like it's time to pester the sys asdmins to upgrade again.
Thanks people.
> --
> Tad McClellan SGML Consulting
> tadmc@metronet.com Perl programming
> Fort Worth, Texas
--
Ian J. Garlick
ijg@csc.liv.ac.uk
Don't worry about avoiding temptation -- as you grow older, it starts
avoiding you.
-- The Old Farmer's Almanac
------------------------------
Date: Thu, 01 Jul 1999 09:16:08 -0700
From: Socket0 <socket0@hotmail.com>
Subject: Using strict
Message-Id: <377B9448.5FD8@hotmail.com>
A client has asked me to use strict on a Perl application I wrote for
them. Up to now, my programming has been pretty slapdash, with variables
grabbed out of the air and used all over the place. Apart from what it
basically is, I know nothing about strict. Are there any good tutorials
or resources regarding strict available on the Net, or any books that
specifically cover good programming practice in Perl? Anything covering
the subject in more depth than the Perl documentation or FAQ.
Thanks
s0.
------------------------------
Date: 01 Jul 1999 03:31:01 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Using strict
Message-Id: <x7g1384yiy.fsf@home.sysarch.com>
>>>>> "S" == Socket0 <socket0@hotmail.com> writes:
S> A client has asked me to use strict on a Perl application I wrote
S> for them. Up to now, my programming has been pretty slapdash, with
S> variables grabbed out of the air and used all over the place. Apart
S> from what it basically is, I know nothing about strict. Are there
S> any good tutorials or resources regarding strict available on the
S> Net, or any books that specifically cover good programming practice
S> in Perl? Anything covering the subject in more depth than the Perl
S> documentation or FAQ.
there is no need for such in depth stuff. use strict is simple. just
properly declare all variable names in their desired scope. you can just
turn on use strict and keep hacking away at the error messages until you
have declared all your variables. remember to use my in almost all cases
and declare them in the tightest scope that works, i.e in a sub or loop or
the file.
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
------------------------------
Date: Thu, 01 Jul 1999 08:34:08 +0200
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: why doesn't this for loop work
Message-Id: <377B0BE0.FD38C293@gmx.net>
Slav Inger wrote:
>
> By the way, even though pre- or
> post-incrementing doesn't matter in this case, I'd think that
> post-incrementing is a little cleaner and easier to read (??).
Pre-incrementing is a little faster, if you care about that -- because
Perl doesn't have to save a copy of the previous value. So if you just
do it for the side effect (no assiging, etc.), pre-incrementing is
slightly more efficient.
Cheers,
Philip
------------------------------
Date: 01 Jul 1999 11:33:14 +0530
From: Mustafa Kamal <mustafa@india.ti.com>
Subject: Re: yacc like tool
Message-Id: <t1qvhc4nbz1.fsf@india.ti.com>
Albrecht,
I use byacc -P for generating perl code for yacc script.
adding a little from the README file. Hope this helps.
Regards,
Mustafa Kamal
# $Id: README,v 1.3 1996/12/17 01:42:26 jake Exp $
------------------------
Perl 5 Byacc Patches 0.5
------------------------
This is a set of patches to perl-byacc1.8.2 which cause it to generate
a Perl 5 class implementing a parser (instead of a file full of global
data and procedures). It's nice if you want to be squeaky clean, and
very nice if you have a need for multiple parsers or multiple
instances of a parser in one program.
How to install it
-----------------
1. Get perl-byacc1.8.2 and unpack it. See
ftp://ftp.sterling.com/local/perl-byacc.tar.Z
2. Copy reader.c and skeleton.c from this directory to the
perl-byacc1.8.2 directory.
3. Compile perl-byacc1.8.2 as usual.
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 6187
**************************************