[12415] in Perl-Users-Digest
Perl-Users Digest, Issue: 6015 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 16 12:07:26 1999
Date: Wed, 16 Jun 99 09:00:26 -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 Wed, 16 Jun 1999 Volume: 8 Number: 6015
Today's topics:
Re: $_ and $@ - What are they? (I R A Aggie)
Re: $_ and $@ - What are they? <uri@sysarch.com>
Re: 'and' problem <uri@sysarch.com>
Re: a thread on threads (Cameron Laird)
Re: a thread on threads <uri@sysarch.com>
Re: Afraid to ask about Y2K! (Jerome O'Neil)
Re: Afraid to ask about Y2K! (Jerome O'Neil)
Re: Afraid to ask about Y2K! (I R A Aggie)
Asking for passwords and security (core dumps) (Dr. Henrik Seidel)
BigInt Hashes <bayer@she.net>
Re: Can anyone explain this behavior? (Bart Lateur)
Re: date formats <frog@ateb.com>
dbi problem haubold@my-deja.com
Re: dbi problem <gellyfish@gellyfish.com>
Re: dimensions of a jpg file <dscapin@harris.com>
Re: dimensions of a jpg file (Eric Bohlman)
Re: Does Perl have a future? (Cameron Laird)
Re: HELP: How to extract href link?? (Wong Dai)
Re: How to scan a directory and put all the files and t <gellyfish@gellyfish.com>
Re: How to scan a directory and put all the files and t (I R A Aggie)
Re: installing modules <dscapin@harris.com>
Re: Is it better perl than awk ? (Greg Bacon)
Re: Is it better perl than awk ? <uri@sysarch.com>
Re: Is it better perl than awk ? <gellyfish@gellyfish.com>
message board with perl (baga@gmx.net)
Re: MIcrosofts Attack on Perl (Cameron Laird)
MM_Win32 <ringm@usa.net>
Re: MM_Win32 <craig@mathworks.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 16 Jun 1999 13:54:04 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: $_ and $@ - What are they?
Message-Id: <slrn7mfba4.u8m.fl_aggie@thepentagon.com>
On 15 Jun 1999 19:52:43 -0500, Abigail <abigail@delanet.com>, in
<slrn7mdtr6.do2.abigail@alexandra.delanet.com> wrote:
+ The best way to find out is to consult the intestines of a M$ developer.
You say this like it is a bad thing. Of course, when we run out of
M$ developers, no more documentation.
James
------------------------------
Date: 16 Jun 1999 11:43:00 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: $_ and $@ - What are they?
Message-Id: <x7r9ncdud7.fsf@home.sysarch.com>
>>>>> "A" == Abigail <abigail@delanet.com> writes:
A> The best way to find out is to consult the intestines of a M$ developer.
print 'disgusting' x 2 ;
and won't all the chickens and sheep of the world protest that their
documentation jobs are being taken away?
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: 16 Jun 1999 11:38:58 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: 'and' problem
Message-Id: <x7vhcodujw.fsf@home.sysarch.com>
>>>>> "TM" == Terry Mealy <spike1965@worldnet.att.net> writes:
TM> ** Newbie Alert! Newbie Alert! **
TM> I am still a novice w/Perl but I'd like to take a stab at this. I'm
TM> sure experts will correct me if I'm wrong.
yes, we will.
TM> if(length($name) eq 0 && length($more_info) eq 0){
though that may actually work it is wrong to use eq where you mean ==.
length returns a number, not a string and eq compares strings.
and there was no need to assign the param values to variables before
taking their lengths. it might be good to do that if you were using them
later, but the code example didn't show that.
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: 16 Jun 1999 09:31:39 -0500
From: claird@Starbase.NeoSoft.COM (Cameron Laird)
Subject: Re: a thread on threads
Message-Id: <7k8cgb$6qb$1@Starbase.NeoSoft.COM>
In article <x7ogiihaho.fsf@home.sysarch.com>,
Uri Guttman <uri@sysarch.com> wrote:
>>>>>> "GB" == Greg Bartels <gbartels@xli.com> writes:
.
.
.
>threads are never needed, only desired by those who think they are a
>winner. redmond has pushed more threads onto the world by making fork
>disappear and all the kiddies think that is the only way to do it
>now. having a separate data space is usually a win and it requires you
>you to make a better IPC than you would with threads. also multiple
>processes (not necessarily forked) scale over multiple boxes (think
>seti, des cracking, etc.) whereas threads don't.
.
.
.
Threads are never needed--of course. I think in
this case you're saying that a threaded program-
ming model doesn't benefit Mr. Bartels' project.
Is that true? When *is* threading apt?
Do you have an opinion on why Microsoft has chosen
to push thread-based programming?
There certainly has been academic work on migratable
threads. I agree that it has little technical
application to this point.
--
Cameron Laird http://starbase.neosoft.com/~claird/home.html
claird@NeoSoft.com +1 281 996 8546 FAX
------------------------------
Date: 16 Jun 1999 11:53:26 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: a thread on threads
Message-Id: <x7ogigdtvt.fsf@home.sysarch.com>
>>>>> "CL" == Cameron Laird <claird@Starbase.NeoSoft.COM> writes:
CL> Threads are never needed--of course. I think in
CL> this case you're saying that a threaded program-
CL> ming model doesn't benefit Mr. Bartels' project.
CL> Is that true? When *is* threading apt?
i feel that his model is not clear enough to decide if threads are
warranted. as perl threads a not stable, that is a moot point so i was
pushing the fork solution. in c i have used threads where appropriate. i
wrote a large crawler and i needed to do parallel DNS lookups which
blocked. making child processes and their communication was too much so
a set of threads which used pipes to communicate and sync with the main
thread was the trick. a simple pointer to a struct was passed to/fro in
the pipe and it worked great.
CL> Do you have an opinion on why Microsoft has chosen
CL> to push thread-based programming?
as tom would say, because they didn't know how to implement fork? the NT
designer came from the VMS group at dec and they didn't use fork
either. so he must have though that was the only way to live. i prefer
having a choice of fork and thread. redmondware typically make you do
things their way.
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: 16 Jun 1999 14:45:48 GMT
From: jeromeo@atrieva.com (Jerome O'Neil)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <7k8das$3ep$1@brokaw.wa.com>
>: This thread is now one pedant long.
>
> "The power of accurate observation is commonly called [pedantry] by
> those who have not got it."
Spoken like a true pedant.
--
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947
The Atrieva Service: Safe and Easy Online Backup http://www.atrieva.com
------------------------------
Date: 16 Jun 1999 14:47:30 GMT
From: jeromeo@atrieva.com (Jerome O'Neil)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <7k8de2$3ep$2@brokaw.wa.com>
In article <37675e62@newsread3.dircon.co.uk>,
Jonathan Stowe <gellyfish@gellyfish.com> writes:
>> This thread is now one pedant long.
> I think we'll call this game Y2K Crescent ...
Indeed. Someone *has* to mention Hitler here Real Soon Now.
--
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947
The Atrieva Service: Safe and Easy Online Backup http://www.atrieva.com
------------------------------
Date: 16 Jun 1999 14:55:31 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <slrn7mfetc.e3.fl_aggie@thepentagon.com>
On 16 Jun 1999 14:47:30 GMT, Jerome O'Neil <jeromeo@atrieva.com>, in
<7k8de2$3ep$2@brokaw.wa.com> wrote:
+ In article <37675e62@newsread3.dircon.co.uk>,
+ Jonathan Stowe <gellyfish@gellyfish.com> writes:
+ >> This thread is now one pedant long.
+ > I think we'll call this game Y2K Crescent ...
+
+ Indeed. Someone *has* to mention Hitler here Real Soon Now.
We're all going to burn in Hell with Hitler 'cause we didn't do
anything to stop the Y2K problem in perl.
James
------------------------------
Date: 16 Jun 1999 15:33:06 GMT
From: Henrik.Seidel@gmx.de (Dr. Henrik Seidel)
Subject: Asking for passwords and security (core dumps)
Message-Id: <7k8g3i$5db$3@mamenchi.zrz.TU-Berlin.DE>
Hi,
I want to ask a user for a password and encrypt that password
afterwards. I am doing this with the code snippet below. It works fine,
but my problem is the following: if the program dumps a core (e.g., a
bad root guy sends a signal 11), the password is contained in clear
text in that core dump. I tried to set all variables used explicitely
to '********' after usage, but this does not help. Obviously, there
are some other variables (e.g., buffers) used implicitely that still
hold the password. I am looking for a solution that clears all those
variables used implicitly, i.e. I am looking for a solution with core
dumps without plain text passwords. Any help?
(P.S.: I know that root can do everything anyway, but root must know how
to do the right thing, and sending a signal is really easy.)
print "Username: $ENV{LOGNAME}\n";
$|=1;
print "Enter Gateway Password: ";
ReadMode('noecho');
my $passwd = ReadLine(0);
ReadMode('restore');
chomp $passwd;
print "\n";
print "Retype Gateway Password: ";
ReadMode('noecho');
$_ = ReadLine(0);
ReadMode('restore');
chomp;
print "\n";
unless ($passwd eq $_) { die "Passwords don't match. Exiting...\n" }
$|=0;
$_ = '********';
# Do something with $passwd (encrypt it) ...
$passwd = '********';
------------------------------
Date: Wed, 16 Jun 1999 16:35:45 +0200
From: Claus Bayer <bayer@she.net>
Subject: BigInt Hashes
Message-Id: <3767B641.3CEA0538@she.net>
Hi!
Sorry if this question has been asked million times before, but how
do i declare a Math::BigInt Value in an hash. Constructs like
%SomeHash = Math::BigInt->new("key","0"); or
%SomeHash = Math::BigInt->new("key" => "0");
doesn'd work! I want all values in that hash to be BigInt's Any ideas?
Thanks in advance
Claus
--
---------------------------------------------------------------------
Dipl. Inf. (FH) Claus Bayer | email: bayer@she.net
Xlink-POP | phone: +49 621 5953 222
Ludwigshafen/Heidelberg/Darmstadt | fax: +49 621 5953 201
Kaiserslautern | pgp: http://www.she.net/
c/o ShE Kommunikations-Systeme GmbH | ~bayer/bayer.pub
Donnersbergweg 1 | __ __
D-67059 Ludwigshafen, Germany | /_ /_/ /_
---------------------------------------------------- __/ / / /_ ----
------------------------------
Date: Wed, 16 Jun 1999 13:53:25 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Can anyone explain this behavior?
Message-Id: <376bac20.21658740@news.skynet.be>
Larry Rosler wrote:
>The other guys explained it, but they didn't give you the simplest
>solution -- change the 2 to 3.
No. The simplest solution would be to drop the ",2".
If the guy wants a split limit, it's probably for a reason.
Bart.
------------------------------
Date: Wed, 16 Jun 1999 09:59:41 -0400
From: Emily Latham <frog@ateb.com>
Subject: Re: date formats
Message-Id: <3767ADCD.A1E1DBF3@ateb.com>
Just so all of you know and can stop acting as though I am a complete
moron. I read the initial message and not only had tinkered with
localtime but also tried to use Date::Calc. It gave me TONS of errors
installing as on our university system it was moderately challenging to
make the modules work from my home directory. I think I have got
Date::Manip loaded, though. Thanks for the suggestion, Umesh. It was
most helpful.
Emily Brock Latham wrote:
>
> I have a user putting in a date of several different styles of input,
> and I have to convert it to numerical month and day stuff. I also have
> to find from the date what the day of the week is? Is there an easier
> way than loads of if/else statements? and I have no idea where to begin
> getting the day of the week info?
>
> --
>
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>
> Time's fun when you're having flies!
>
> @..@ eblatham@eos.ncsu.edu
> (----) CHECK OUT THE LILY PAD at....
> ( >__< ) http://www4.ncsu.edu/~eblatham/home.html
> ^^ ~~ ^^
------------------------------
Date: Wed, 16 Jun 1999 13:41:50 GMT
From: haubold@my-deja.com
Subject: dbi problem
Message-Id: <7k89ir$kea$1@nnrp1.deja.com>
I try to parse some ascii-files whose size varies between some 100kB
and 10MB with a perl-script. Then I use the parsed data to generate
some sql-statements which I execute using functions provided by the dbi
package. After a random amount of data has been parsed the following
error message appears:
DBD::Oracle::st execute failed: ORA-06502: PL/SQL: numeric or value
error
ORA-06512: at line 1 (DBD: oexec error) at myscript.pl line 1434
<IMPORT> chunk 64738
The line and chunk numbers vary, but the rest stays the same. After the
message has been repeated some hundred times, the perl-script aborts.
This behavior is strange, because the statement in the mentioned line
is definitely correct (It gets executed several times).
Any ideas whether this is a perl, a dbi or an sql-problem?
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 16 Jun 1999 15:46:09 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: dbi problem
Message-Id: <3767b8b1@newsread3.dircon.co.uk>
haubold@my-deja.com wrote:
> I try to parse some ascii-files whose size varies between some 100kB
> and 10MB with a perl-script. Then I use the parsed data to generate
> some sql-statements which I execute using functions provided by the dbi
> package. After a random amount of data has been parsed the following
> error message appears:
> DBD::Oracle::st execute failed: ORA-06502: PL/SQL: numeric or value
> error
> ORA-06512: at line 1 (DBD: oexec error) at myscript.pl line 1434
> <IMPORT> chunk 64738
> The line and chunk numbers vary, but the rest stays the same. After the
> message has been repeated some hundred times, the perl-script aborts.
> This behavior is strange, because the statement in the mentioned line
> is definitely correct (It gets executed several times).
> Any ideas whether this is a perl, a dbi or an sql-problem?
>
The error message is an Oracle one - so I guess that it is probably an
SQL problem.
/J\
--
"Babylon 5 has some impressive special effects and enough dodgy hairdos
to make the current Conservative front bench look trendy" - Radio Times
------------------------------
Date: Wed, 16 Jun 1999 10:20:28 -0400
From: Deamon George Scapin <dscapin@harris.com>
Subject: Re: dimensions of a jpg file
Message-Id: <3767B2AC.4724FCB7@harris.com>
No no no, I am keeping the ratio of old width/height to new width and
height.
Ron Grabowski wrote:
> Without converting the size of JPG itself, the image will become
> distorted if you simply change the <IMG> tags in the browser!
------------------------------
Date: Wed, 16 Jun 1999 15:08:01 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: dimensions of a jpg file
Message-Id: <ebohlmanFDFE1E.DGL@netcom.com>
Deamon George Scapin (dscapin@harris.com) wrote:
: No no no, I am keeping the ratio of old width/height to new width and
: height.
:
: Ron Grabowski wrote:
:
: > Without converting the size of JPG itself, the image will become
: > distorted if you simply change the <IMG> tags in the browser!
Browsers generally do a lousy job of rescaling images regardless of
whether or not you preserve the aspect ratio. Additionally, if you're
trying to shrink the images using browser rescaling, you're forcing the
user to download the full-sized image files; I've seen people try to do
this in order to create thumbnails for photo galleries, and the effect is
a site that takes forever to display.
------------------------------
Date: 16 Jun 1999 09:24:35 -0500
From: claird@Starbase.NeoSoft.COM (Cameron Laird)
Subject: Re: Does Perl have a future?
Message-Id: <7k8c33$6hc$1@Starbase.NeoSoft.COM>
In article <376579E4.735FFA4A@chatbase.com>,
TRG Software : Tim Greer <webmaster@chatbase.com> wrote:
>Christian Ahkman wrote:
.
.
.
>> Do you think the criticism of perl and other script-based solutions
>> for web applications is valid? Namely that the cost of perl/CGI is
>> too large (overhead of running a script for every request) compared to
>> servlets or COM objects that basically function as daemons?
>
>Take a look at some info about mod_perl and fastcgi, etc. I know what
>you're saying, and spawning so many processes can be murder on your
>system, but if you take advantage of such things, then any complaint
>anyone can use in such a manner is no longer valid. Sorry I didn't get
>into detail in regards to this, but I didn't think it would have been
>very relevant to the subject, but I guess I was wrong. You can even use
>fastcgi with programs compiled in C (Does that seem fast enough?) I
>don't think a servlet is going to out-do that in performance (not unless
>someone's a poor C coder).
>
>Just remember that Perl is always advancing as well. So it's not as if
>Sun will come out with something so new that Perl will be forgotten.
>Anything java related has a lot of catching up to do in regards to Perl.
.
.
.
I'll express it more starkly:
1. "Scripting" has only minimal semantic content
in this context. As used in this domain, it's
almost entirely a marketing adjective.
2. Language choice is essentially orthogonal to
performance concerns having to do with CGI.
Java can be used for CGI. So can C. Perl can
be used for in-process dynamic Web service
(far more conveniently than the former two,
for my money).
3. Anyway, achieved performance for almost all
projects should be assumed, until proven other-
wise, to depend principally on factors at
which Perl dominates: quality of libraries,
expressiveness which encourages algorithmic
elegance and propriety, ...
--
Cameron Laird http://starbase.neosoft.com/~claird/home.html
claird@NeoSoft.com +1 281 996 8546 FAX
------------------------------
Date: 16 Jun 1999 15:18:26 GMT
From: mpuscar@thunder.temple.edu (Wong Dai)
Subject: Re: HELP: How to extract href link??
Message-Id: <7k8f82$4a4$1@cronkite.ocis.temple.edu>
Jonathan Stowe (gellyfish@gellyfish.com) wrote:
: lufan@hotmail.com wrote:
: >
: > I use following expression extracting href link and
: > text name,
: > /<a[ ]+href=["|']?([^>|^'|^"]+)["|']?[\d|\s|\w|"|']*>([^<]+)<\/a>/i
: >
: The module HTML::LinkExtor ivailable from CPAN is probably what you
: want.
: Jonathan Stowe <jns@gellyfish.com>
Jonathan,
I do not think he can use LinkExtor because that module only extracts
the links, not the titles (which makes it not very useful IMHO)
--
Mike
mpuscar@technologist.com
Homepage: http://thunder.temple.edu/~mpuscar
------------------------------
Date: 16 Jun 1999 14:53:04 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How to scan a directory and put all the files and their size to a text file
Message-Id: <3767ac40@newsread3.dircon.co.uk>
Dariush_news <dazimi@yahoo.com> wrote:
> Greg Bacon <gbacon@itsc.uah.edu> wrote in message
> news:<7k6d12$645$2@info2.uah.edu>...
>> In article <7k6c2q$c1r$1@clio.net.metrotor.on.ca>,
>> "Dariush_news" <dazimi@yahoo.com> writes:
>> : I need to scan a directory and input all the file namse in to a text
> file
>> : with thier respecitve size.
>>
>> Maybe it would help if you showed us what you've tried so far.
>>
>
> First of all Thank you all for the support.
> This is what I have so far, which list all the files in the current
> directory.
> However I need to have the size of the files also, because I have to put the
> file names with the coresponding size in to a spreadsheet.
> Basically This program should monitor the directory for the files with thier
> size. If a size of file is zero or less than 10K, then I like to be notifed.
>
OK here is a fixed up version of your program :
#!/usr/local/bin/perl -w
use strict;
opendir(CURDIR, ".")|| die "Can not open the directory - $!\n";
my @files= sort grep !/^\.{1,2}/,readdir(CURDIR);
closedir(CURDIR);
print " the content of this directory is \n";
for my $file(@files)
{
my $size = -s $file;
print "$file $size\n";
}
Look at the first entry in the perlfunc manpage for more on the -s
thingumajig.
/J\
--
"Enter the Great Jaffa Cakes Debate. In these jam-filled concoctions
were cakes they would escape VAT. Because they are soft and not hard,
they were deemed to be cakes and therefore VAT free. In 1974 Master of
the Universe asked the VAT tribunal to exempt him from VAT because he
is the Supreme Authority in the Universe and therefore should not pay
it. He lost his case" - BBC News Website
------------------------------
Date: 16 Jun 1999 14:12:12 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: How to scan a directory and put all the files and their size to a text file
Message-Id: <slrn7mfcc5.u8m.fl_aggie@thepentagon.com>
On Wed, 16 Jun 1999 09:18:42 -0400, Dariush_news <dazimi@yahoo.com>, in
<7k88c0$3s2$1@clio.net.metrotor.on.ca> wrote:
+ However I need to have the size of the files also
You mean like '$size=(stat($filename))[7];'??
$filename='cancel';
$size=(stat($filename))[7];
print "$filename $size\n";
cancel 2957
% ls -l cancel
-rw------- 1 333 333 2957 Jun 15 13:46 cancel
If it isn't obvious, the size is in bytes, so divide by 1024 to get
kbytes, and again to get mbytes, and again to get gbytes. stat also
has other things to tell you, take a gander at 'perldoc -f stat' or a
copy of the Camel book.
James
------------------------------
Date: Wed, 16 Jun 1999 10:29:36 -0400
From: Deamon George Scapin <dscapin@harris.com>
Subject: Re: installing modules
Message-Id: <3767B4D0.507D2C24@harris.com>
Thanks David, I downloaded perl again and it had ppm with it. The version I
downloaded previously did not. I installed the module correctly and am using it
fine when I run the perl script from the command line. However, when I try to run
the script (with Sambar42 running) the "use Image::Size" statement in my script is
causing perl to flop. The netscape browser returns "document contains no data".
So I found that Sambar42 web server is using perl.exe in it's own directory rather
than the one that I am using. I ran this perl.exe from command line and it crashes
with a windows error "This program has performed an illegal operation and will be
shut down." Wuzup with that?
David Cassell wrote:
> Did you do everything listed in perlfaq8? Let's see...
> Okay, go back to the top and find my note about ActiveState's
> ppm program. Use that to install it. At a command prompt,
> just type:
>
> ppm install Image-Size
>
------------------------------
Date: 16 Jun 1999 14:42:09 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Is it better perl than awk ?
Message-Id: <7k8d41$j7m$1@info2.uah.edu>
In article <7k7fiv$3af$1@mathserv.mps.ohio-state.edu>,
ilya@math.ohio-state.edu (Ilya Zakharevich) writes:
: I would think that learning awk *in addition* to Perl is an exercise
: in futility. The situation may be quite different for those who know
: awk already.
I learned awk after I learned Perl (if you can believe that :-). There
are some cases where an awk program is a little shorter or simpler than
the equivalent Perl program, so I use awk in those cases.
Greg
--
The most incomprehensible thing about the universe is that it is
comprehensible.
-- Albert Einstein
------------------------------
Date: 16 Jun 1999 11:33:28 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Is it better perl than awk ?
Message-Id: <x7yahkdut3.fsf@home.sysarch.com>
>>>>> "BL" == Bart Lateur <bart.lateur@skynet.be> writes:
BL> Urm... do I have anything useful to add to the original thread? Maybe
BL> this: if this is all you need to do, Awk may be the way to go. Perl is
BL> a general power tool, far more general than awk, so if you expect to do
BL> far more, and more fancy stuff, in the near future, I would go for Perl.
BL> Also, if you're already somewhat familiar with programming, Perl may
BL> look more familiar.
awk in some ways is not a regular programming language while perl
is. awk has an fixed implied loop over all the lines of the input and it
has great difficulty breaking out of that mode. it has limitations on
the size of the data it can handle (line lengths) and has a very short
set of builtin operations and functions. perl can emulate the awk loop
(-n option) but it is a true general purpose language. as such
perl is much bigger and it has a massive public library of code and goes
many places awk never dreams about. but for a few simple cases awk is
better and faster than perl (larry wall says awk has to be better at
something). but i haven't written a line of awk code under fire in
years. i recently rewrote a (someone else's) set of awk/shell scripts
into perl and it was so much cleaner, better, more flexible, robust,
etc. in perl than awk.
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: 16 Jun 1999 16:39:59 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Is it better perl than awk ?
Message-Id: <3767c54f@newsread3.dircon.co.uk>
In comp.lang.perl.misc Uri Guttman <uri@sysarch.com> wrote:
>
> awk in some ways is not a regular programming language while perl
> is. awk has an fixed implied loop over all the lines of the input and it
> has great difficulty breaking out of that mode.
>
Yeah, but so has RPG/III ...
/J\
--
"Tony Blair is reported to be detained indefinitely under plans unveiled
by the Home Secretary" - Corrupt Teletext Page
------------------------------
Date: Wed, 16 Jun 1999 14:06:56 GMT
From: baga@gmx.net (baga@gmx.net)
Subject: message board with perl
Message-Id: <3767af28.14288255@news.techfak.uni-kiel.de>
I want to write a meassage board for a friend (he has already one but
that isn't aggod solution). He wants to have some features like
searching (e.g. author) through the articles etc. As there is much
traffic I think of using a database (does someone know a good small
database for simple functions when possible for free? I use a linux
system).
Before I want to start programming I want to ask if someone knows
solutions in perl that can be used as start? (I have to say that I
normally program with C but as I started with perl I 'm really
fascinated by it).
Thanks a lot,
Hans
baga@gmx.net
------------------------------
Date: 16 Jun 1999 10:30:04 -0500
From: claird@Starbase.NeoSoft.COM (Cameron Laird)
Subject: Re: MIcrosofts Attack on Perl
Message-Id: <7k8fts$9qe$1@Starbase.NeoSoft.COM>
In article <3764ddd9.330767508@news.newsguy.com>, Kvan <kvan@dis.dk> wrote:
.
.
.
>Simple: Java was kidnapped as a baby, whereas Perl is grown up. Just
>as MS can't hijack C++ by now, Perl is beyond any attempts at control
>they might try to apply. They can merely facilitate its use on MS
.
.
.
I've been mulling this over for a while. Think back
to the early part of the decade. C++ was relatively
portable, in senses which can be made precise, and
interoperability between objects produced by different
compilers was at least achievable.
Now, what "C++" means, as least at the business level
defined by recruiters and managers, is "the latest
MS VC++". VC++ is poorly compatible between versions,
I'm told it's either impossible or very difficult to
get VC-produced DLLs to work with the output of other
compilers, and a lot of practitioners seem to believe
that MFC is the standard library. Maybe MS *did*
hijack VC++.
--
Cameron Laird http://starbase.neosoft.com/~claird/home.html
claird@NeoSoft.com +1 281 996 8546 FAX
------------------------------
Date: Wed, 16 Jun 1999 15:45:56 +0400
From: "Oleg Semenov" <ringm@usa.net>
Subject: MM_Win32
Message-Id: <7k8cae$qs9$1@dragon.infopro.spb.su>
One silly question - does there exist an MM_Win32.pm for
ActivePerl that generates working makefiles (without &&, 2>&1
and all this unix stuff)?
I have patched MM_Unix.pm myself, but it is not perfect, as
my knowledge of perl is far from brilliant... It works, however...
------------------------------
Date: Wed, 16 Jun 1999 11:33:12 -0400
From: Craig Ciquera <craig@mathworks.com>
Subject: Re: MM_Win32
Message-Id: <3767C3B8.87CB5A6A@mathworks.com>
In my ActiveState version 5.17:
% find . -name MM_Win32.pm -print
./lib/ExtUtils/MM_Win32.pm
Craig
Oleg Semenov wrote:
> One silly question - does there exist an MM_Win32.pm for
> ActivePerl that generates working makefiles
------------------------------
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 6015
**************************************