[6457] in Perl-Users-Digest
Perl-Users Digest, Issue: 82 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 10 12:28:25 1997
Date: Mon, 10 Mar 97 09:00:21 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 10 Mar 1997 Volume: 8 Number: 82
Today's topics:
Re: 10 commandments (was re: Which one is the best (pat (Stijn van Dongen)
Re: 10 commandments (was re: Which one is the best (pat <jvenu@ctp.com>
[Q] modules <wouter.de.boer@pobox.com>
Re: [Q] modules <guha@algonet.se>
Re: [Q] modules <jvanornum@lucent.com>
ANNOUNCE: Text::BibTeX 0.1 (Greg Ward)
Re: Debugging trivia! (Tad McClellan)
Re: Directory traversal and symbolic links <roderick@argon.org>
Guestbook Entry Numbering (Stephen Arthur)
Install help for 5.003 on Solaris? (Jim Rudolf)
LAOLA library (Martin Schwartz)
Re: Perl5.003 and sfio compile problem <byersa@agva.com>
PLEASE HELP! (Mikael Hallendal)
Re: Please Respond (A. Deckers)
Re: PLEASE, HELP A NEWBIE!! 2nd attempt (Erik Braun)
Re: RAND/SRAND query (Ilya Zakharevich)
Re: RAND/SRAND query <roderick@argon.org>
Re: simple new question! (Steffen Beyer)
Re: Sort question (Tim Gim Yee)
Re: Starting with PERL: a question (K.James)
Re: Who makes more $$ - Windows vs. Unix programmers? (Harold Stevens)
Re: Who makes more $$ - Windows vs. Unix programmers? ("Bob Taylor")
Re: Who makes more $$ - Windows vs. Unix programmers? <edge@mud.imperium.net>
Why can't I subscript split? (John Kodis)
Re: Why can't I subscript split? (Honza Pazdziora)
Win95 Registry question... (Rob Naccarato)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 10 Mar 1997 10:48:37 GMT
From: stijnvd@cwi.nl (Stijn van Dongen)
Subject: Re: 10 commandments (was re: Which one is the best (pattern matching))
Message-Id: <stijnvd.857990917@news.cwi.nl>
Devin Ben-Hur <dbenhur@egames.com> writes:
>13) Thou shall try use Benchmark whenever thou needs
> to ask 'which method is faster?'
Ok, but sometimes one is interested to know
i) which is *intrinsically* the faster method
ii) with perhaps a pointer to characteristics of perl internals,
with which the majority on this forum is unfamiliar. I like
to get some intuition about what's under the hood of the car.
iii) whether the answer is difficult or impossible to give.
Regards,
Stijn van Dongen
stijnvd@cwi.nl
------------------------------
Date: Mon, 10 Mar 1997 09:04:35 -0500
From: "Jagadeesh K. Venugopal" <jvenu@ctp.com>
Subject: Re: 10 commandments (was re: Which one is the best (pattern matching))
Message-Id: <332414F3.65D6@ctp.com>
Zenin wrote:
>
[About use strict]
> IMHO, when they get past ~200 it's almost mandatory, and if you go
> over ~1k it would be death without it...
> --
Sometimes I get the feeling that -w and strict must be default options
with -no_w and 'use nostrict' as choosable options. I have discovered
many problems with my scripts after developing them, when I ran them
under 'strict'.
--
______________________________________________________________________
Jagadeesh K. Venugopal
Cambridge Technology Partners, 304 Vassar Street Cambridge, MA 02139
Phone: 617.374.2028; Fax: 617.374.8300; E-mail: jvenu@ctp.com
______________________________________________________________________
------------------------------
Date: Tue, 04 Mar 1997 13:31:31 +0100
From: Wouter de Boer <wouter.de.boer@pobox.com>
Subject: [Q] modules
Message-Id: <331C1623.41C67EA6@pobox.com>
Hello,
Is it possible when you have programmed some own modules to store them
elsewhere in your system, likewise C/C++ ??
In C/C++ I use:
#include "/usr/home/wouter/lib/test.c";
I want the same in Perl but I don't know how. I've tried:
use "/usr/home/wouter/lib/test.pm";
use /usr/home/wouter/lib/test.pm;
but all failed.
Can anybody help me ??
Thanks,
Wouter
------------------------------
Date: 10 Mar 1997 14:20:33 GMT
From: "Gunnar Hdgglund" <guha@algonet.se>
Subject: Re: [Q] modules
Message-Id: <01bc2d5e$5f08a8b0$240364c3@dell-xps-pro200>
Wouter de Boer <wouter.de.boer@pobox.com> wrote in article
<331C1623.41C67EA6@pobox.com>...
> Hello,
>
> Is it possible when you have programmed some own modules to store them
> elsewhere in your system, likewise C/C++ ??
>
> In C/C++ I use:
>
> #include "/usr/home/wouter/lib/test.c";
>
> I want the same in Perl but I don't know how. I've tried:
>
> use "/usr/home/wouter/lib/test.pm";
> use /usr/home/wouter/lib/test.pm;
>
> but all failed.
>
> Can anybody help me ??
>
> Thanks,
>
> Wouter
>
Try using
require '/usr/home/wouter/lib/test.pm';
Gunnar
------------------------------
Date: Mon, 10 Mar 1997 10:06:18 -0500
From: James Van Ornum <jvanornum@lucent.com>
To: Wouter de Boer <wouter.de.boer@pobox.com>
Subject: Re: [Q] modules
Message-Id: <3324236A.2654@lucent.com>
I have successfully used the following combination:
use lib '/home1/jhv/PERL/Sprite-3.1';
use Sprite;
Notice that the second use line does not include the .pm suffix
even though the full filename is Sprite.pm.
As the perlmod manual page indicates,
use Module;
is exactly equivalent to:
BEGIN { require "Module.pm"; import Module; }
Hope that helps.
--
Jim Van Ornum
HR 1F-101
(908) 615-2552
------------------------------
Date: 10 Mar 1997 14:06:21 GMT
From: greg@bic.mni.mcgill.ca (Greg Ward)
Subject: ANNOUNCE: Text::BibTeX 0.1
Message-Id: <5g14gt$16s$1@nadine.teleport.com>
Text::BibTeX
version 0.1
Greg Ward (greg@bic.mni.mcgill.ca)
8 March, 1997
Text::BibTeX is a Perl module (with a couple of helper modules) for
reading, parsing, and writing BibTeX files. Currently, it provides only
the lowest level of support needed to process BibTeX bibliographies:
parsing the entries and turning them into Perl hashes. (Or rather, Perl
objects queried through methods. But it's all done with hashes
internally.) No knowledge of BibTeX conventions or requirements is present
in the module, both in order to make it more general (i.e. the input files
could hold any kind of data that lends itself to a bit of structure) and
because I wanted to make this release before adding a whole new layer of
code.
The home site for Text::BibTeX is
ftp://ftp.bic.mni.mcgill.ca/pub/users/greg/
and it should show up on CPAN in modules/by-authors/Greg_Ward.
--
Greg Ward - Research Assistant greg@bic.mni.mcgill.ca
Brain Imaging Centre (WB201) voice: (514) 398-4965 (or 1996)
Montreal Neurological Institute fax: (514) 398-8948
Montreal, Quebec, Canada H3A 2B4
------------------------------
Date: Mon, 10 Mar 1997 07:21:00 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Debugging trivia!
Message-Id: <sr11g5.dn.ln@localhost>
Trottinette (trot@cam.org) wrote:
: Hello Perl-folks!
: Since I am about to kill my computer out of frustration, here is a
: simple debugging trivia for you.
: In the following, I am trying to merge two programs, each working
: separately, but not together. the goal is to grap the data submitted
: from a web form using post, and to write those data to the file
: texte.txt.
: Here is the thing which is not working (print perfectly "The POST data
: is: $data" "Deuxieme fois: $data", no compilation errors, but data is
: not written to file).
: Have fun and thanks!
: Nicolas
: --
: #!/usr/local/bin/perl
When your perl script is not doing the right thing, you should
ALWAYS enable compiler warnings. Perl might just be able to
help you figure out where your bug is.
For a CGI perl script, check the server error logs after enabling
warnings:
#!/usr/local/bin/perl -w
# ^^
: sub readPostData
: {
: local(*queryString) = @_ if @_;
: local($contentLength);
: $contentLength = $ENV{"CONTENT_LENGTH"};
: if($contentLength)
: {
: read(STDIN,$queryString,$contentLength);
: }
: return 1;
: }
Why reinvent this wheel?
There are a couple of perl modules (CGI.pm for one) that will do
this for you. They will likely do it right too. I don't see
where yours is URL decoding stuff...
: $requestType = $ENV{"REQUEST_METHOD"};
: print "Content-type: text/plain\n\n";
: if($requestType eq "POST")
: {
: &readPostData(*data);
: print "The POST data is:\n\n";
: print $data;
: print "\n\n\r";
:
: open (VARIABLE, ">texte.txt");
What if the open() call did NOT succeed? You haven't checked the
return value.
open (VARIABLE, ">texte.txt") || print "could not open 'texte.txt' $!";
You likely have a permissions problem.
Which would make it a CGI or Unix problem, not a perl problem.
: print VARIABLE ($data);
: }
:
: print "Deuxieme fois:\n\n";
: print $data;
: print "\n";
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: 9 Mar 1997 20:16:24 -0500
From: Roderick Schertler <roderick@argon.org>
To: david.holmes@bigfoot.com (David M Holmes)
Subject: Re: Directory traversal and symbolic links
Message-Id: <pzg1y4v9ep.fsf@eeyore.ibcinc.com>
On Thu, 6 Mar 1997 19:16:01 GMT, david.holmes@bigfoot.com (David M Holmes) said:
>
> But then I noticed that it goes wrong just after it has output the
> entries for a symlinked directory.
[...]
> chdir "$thisdir" or die "Can't cd to $thisdir: $!";
[...]
> chdir ".." or die "Can't cd up a directory level: $!";
This simply doesn't work if $thisdir is a symlink to a directory. ".."
in the linked-to directory is not generally the linked-from directory.
The easiest fix is to make sure that $thisdir is an absolute path before
the first chdir then replace the second with another chdir to $thisdir.
Alternately you could not chdir at all, instead keeping track of the
current path internally.
(Note I didn't actually read or test your code, I don't know if are
other problems going on.)
--
Roderick Schertler
roderick@argon.org
------------------------------
Date: 10 Mar 1997 12:42:29 GMT
From: arthurs@blkbox.com (Stephen Arthur)
Subject: Guestbook Entry Numbering
Message-Id: <5g0vjl$cu1@news.blkbox.com>
I hava an HTML guestbook that uses a PERL script to return data,
and I wanted to know if anyone knows of a way
that I can use PERL to consecutively number the guestbook entries.
Any ideas would be greatly appreciated.
Thanks,
Stephen
arthurs@blkbox.com
------------------------------
Date: Mon, 10 Mar 1997 14:13:04 +0100
From: rudolf@metadesign.de (Jim Rudolf)
Subject: Install help for 5.003 on Solaris?
Message-Id: <rudolf-1003971413040001@jim.metadesign.de>
Greetings c.l.p.m:
Has anyone compiled a help file for installing perl5.003 on Solaris?
I've looked at the FAQ but that's for perl5.001 and I assume some
things have changed.
Briefly, Configure makes a list of *hundreds* of signal names, and
that causes problems later in the script. Just for fun, I commented
out part of the script to get past that part and Configure completes,
but during the make I get a compile error in mg.c complaining about
not knowing the size of 'act' and 'oact'. It leads one to believe
that accepting all Configure defaults is not the way to go. We're
running SunOS 5.5.
Any help would be greatly appreciated.
Thanks in advance,
Jim
________________________________________________________________________
Jim Rudolf MetaDesign plus GmbH rudolf@metadesign.de
"I have left orders to be awakened at any time in case of
national emergency, even if I'm in a cabinet meeting."
-- Ronald Reagan
------------------------------
Date: 10 Mar 1997 14:06:41 GMT
From: schwartz@cs.tu-berlin.de (Martin Schwartz)
Subject: LAOLA library
Message-Id: <5g14hh$194$1@nadine.teleport.com>
Hello,
I just finished a new distribution of LAOLA. This is a distribution of
source codes and information about the binary format of OLE documents.
Can be found at:
http://wwwwbs.cs.tu-berlin.de/~schwartz/pmh/laola.html or at
http://user.cs.tu-berlin.de/~schwartz/pmh/laola.html
There you will find especially:
Hacking guide
Explanation of the binary format of OLE documents.
laola.pl
A perl library, that gives access to OLE documents like Word and Excel
without Microsoft code. You can read documents, read and modify existing
streams and read and modify garbage. Supports a litte bit property sets.
A quick reference file for this library is now available. The code should
be rather system independent. However, at MS DOS and some Unix systems
it worked well.
Demonstration programs:
lclean (ALPHA version!)
A program able to detect, save and clean the trash sections in OLE
documents. Can store and extract some file in the garbage sections.
This file will not be noticed by the documents application.
ldat
Prints out the standard properties of an OLE document. Shows how to
read some printer info out of Word and Excel documents.
lhalw
Draws the text section out of a Word 6+ file.
lls
Prints the file structure of OLE documents. Streams can be saved
into files.
Comments welcome,
Martin
--
// Le degre zero de l'ecriture? Zero probleme!
------------------------------
Date: Sun, 09 Mar 1997 21:11:50 -0500
From: Al Byers <byersa@agva.com>
Subject: Re: Perl5.003 and sfio compile problem
Message-Id: <33236DE6.43B2@agva.com>
Al Byers wrote:
>
I will answer with what I have found to date. The problem mentioned
above was solved by including '-D__STD_C' in my ccflags string. The
modules in sfio are looking for that and not '-DSTANDARD_C'.
Now I having trouble with the build giving me a "misaligned access"
fault.
--
Al Byers Automation Group of Virginia
P.O. Box 1091 Waynesboro, VA 22980
540.949.8777 byersa@agva.com
------------------------------
Date: 10 Mar 1997 13:25:50 GMT
From: micke@cel95mhl.campus.mdh.se (Mikael Hallendal)
Subject: PLEASE HELP!
Message-Id: <5g124u$sg4@aragorn.mdh.se>
Hi!
I need help using print() to print colors in an color_xterm.
Say for exampel that I want to print 'Hi' in red what's the syntax.
Please Answer with email.
/Micke
--
-----------------------------------------------------------
E-mail : <cel95mhl@mds.mdh.se>
: <micke@cel95mhl.campus.mdh.se>
HomePage : <http://mds.mdh.se/~cel95mhl>
PGP-Key available from : <http://www.mds.mdh.se/~cel95mhl>
or finger cel95mhl@legolas.mdh.se
-----------------------------------------------------------
------------------------------
Date: 10 Mar 1997 15:31:41 GMT
From: Alain.Deckers@man.ac.uk (A. Deckers)
Subject: Re: Please Respond
Message-Id: <slrn5i8aau.qf7.Alain.Deckers@nessie.mcc.ac.uk>
In <33186BD7.1FD5@ix.netcom.com>,
Scott Green <mogreen@ix.netcom.com> wrote:
>Subject: Please Respond
That's a seriously sucky subject line. It tells readers *nothing* about
the subject of your enquiry and is likely to put some people off reading
your article alltogether.
You might benefit from reading the article entitled "Choosing Good
Subject Lines", published in clpm at regular intervals.
>Would somebody please look at this and tell me what is wrong?
By what definition of "wrong"? :-)
Seriously, it is a good idea to include some diagnostic information in
your enquiries, even when they are relatively simple.
>#! /usr/local/bin/perl
^
You don't want a space between ! and /
But the biggest blooper is that you din't use the -w switch:
#!/usr/local/bin/perl -w
>if ($ENV{'HTTP_REFERER'} ne 'www.mydomain.com')
I don't think you want 'ne', since 'www.mydomain.com' is not a valid URL.
Something as follows might be more usefull:
if ($ENV{'HTTP_REFERER'} !~ m|^http://www.mydomain.com|)
But remember that HTTP_REFERER isn't always defined.
> {
> print <<"HTML";
You're not interpolating anything, so why use double quotes?
As for the rest, this is not an HTML group, but what the heck...
> <HTML>
> <HEAD>
> <TITLE>Illegal</TITLE>
> </HEAD>
> <BODY>
> <H1> User Unauthorized <H1>
^
</H1>
> <br>
I don't think this is necessary.
>
> Sorry, but this server has no permissions to access this script.
<P>Sorry, but ....</P>
> </BODY>
> </HTML>
>
>HTML
>
> exit;
>}
>
>Thank You, you can email me at mogreen@ix.netcom.com if you have any
>solutions.
Why, is your newsfeed flaky?
HTH,
--
Alain.Deckers@man.ac.uk <URL:http://www.man.ac.uk/%7Embzalgd/>
------------------------------
Date: 10 Mar 1997 14:07:11 GMT
From: erik@paxp01.mipool.uni-jena.de (Erik Braun)
Subject: Re: PLEASE, HELP A NEWBIE!! 2nd attempt
Message-Id: <slrn45i85cf.usn.erik@paxp01.mipool.uni-jena.de>
This has no relation to perl, aber trotzdem:
On Sun, 9 Mar 1997 21:15:02 -0600, Tad McClellan <tadmc@flash.net> wrote:
>Some news servers (Netscape) have a bug that truncates posts
>when they have a line with only a dot on them.
>
>.
and 'elm' to!
Have you ever sent a Perl-Skript with FORMATs with elm?
Oh, I hate Elm, I hate Unix and its strange-behaving software! Gnl! Argh!
(sorry, I had a long fight against Unix during the last hours)
--
erik@minet.uni-jena.de
------------------------------
Date: 10 Mar 1997 11:26:51 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: RAND/SRAND query
Message-Id: <5g0r5r$j2e$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Brian L. Matthews
<blm@halcyon.com>],
who wrote in article <5g0fmb$peh$1@halcyon.com>:
>
> I don't know, sub rand { 0; } is pretty bad as far as randomness goes,
> although it's pretty fast. :-)
I think if you try benchmarking it agains the builtin one you would be
badly surprised (but I did not try it).
Ilya
------------------------------
Date: 9 Mar 1997 20:21:09 -0500
From: Roderick Schertler <roderick@argon.org>
To: "Timothy H. Keitt" <tkeitt@santafe.edu>
Subject: Re: RAND/SRAND query
Message-Id: <pzd8t8v92c.fsf@eeyore.ibcinc.com>
On Sun, 09 Mar 1997 12:24:31 -0700, "Timothy H. Keitt" <tkeitt@santafe.edu> said:
>
> I assume perl uses UNIX's rand() function.
Right.
> This is one of the worst random number generators ever devised!
Oops.
> Now the question: Can you provide an alternate random number generator
> to perl at build- or run-time?
If your ints are the same as your longs you should be able to get away
with adding `-Drand=random -Dsrand=srandom' to your compiler flags,
either interactively or on the Configure command line (
./Configure -D 'ccflags=-Drand=random -Dsrand=srandom'
). I've done a test Configure/compile/test with these added to my
normal flags. (The latest developer sources contain a much improved
rand() test suite, BTW.)
We should change Perl so it prefers random() or lrand48() to rand(),
though. Cc: to perl5-porters in case anyone feels inspired.
--
Roderick Schertler
roderick@argon.org
------------------------------
Date: 10 Mar 1997 07:21:00 GMT
From: sb@en.muc.de (Steffen Beyer)
Subject: Re: simple new question!
Message-Id: <5g0cos$4pf$1@en1.engelschall.com>
Tom Christiansen <tchrist@mox.perl.com> wrote:
> :After all, "0" and "1" aren't far-fetched choices for "false" and "true",
> :are they? :-)
> But they're wrong. Witness
> ($false, $true) = (0, 1);
> $test = (10 < 5);
> if ($test eq $false) { print "no, 10 is bigger than 5\n" }
> else { print "yes, 10 is smaller than 5\n" }
You're right, of course.
But I didn't even think of doing that (what for?! Perl has better ways
of doing tests!); I would always do:
($false, $true) = (0, 1);
$test = (10 < 5);
unless ($test) { print "no, 10 is bigger than 5\n" }
else { print "yes, 10 is smaller than 5\n" }
or
($false, $true) = (0, 1);
$test = (10 < 5);
if ($test) { print "yes, 10 is smaller than 5\n" }
else { print "no, 10 is bigger than 5\n" }
!! :-)
I use "0" and "1" (just like the original poster) a lot for "false" and
"true", but only for *setting* flag values, *not* for testing them!
For instance,
$wait = 1;
while ($wait)
{
# ... some code
if ( ... )
{
$wait = 0;
}
# ... some more code (reason for not using "last"!)
}
Yours sincerely,
--
|s |d &|m | Steffen Beyer <sb@sdm.de> (+49 89) 63812-244 fax -150
| | | | software design & management GmbH & Co. KG
| | | | Thomas-Dehler-Str. 27, 81737 Munich, Germany.
"There is enough for the need of everyone in this world,
but not for the greed of everyone." - Mahatma Gandhi
------------------------------
Date: Mon, 10 Mar 1997 01:55:55 GMT
From: tgy@chocobo.org (Tim Gim Yee)
Subject: Re: Sort question
Message-Id: <33236453.404113654@news.oz.net>
On 9 Mar 1997 23:46:45 GMT, viet@airmail.net wrote:
>How do I sort a list with elements: ("Dec96", "Nov96", "Jan97", "Feb97",
>...) so that the latest the newest (Feb97) would come out first? I checked
>a technique called Schwartian Transform but could not figure out how to
>make it work with my list. Would somebody please help?
I'll try. The following snippet applies the Schwartian Transform to
your problem. HTH...
---------------
#!/usr/bin/perl
# Wanted to give the 'here docs' a try :)
@array = split /\n/, <<KUPO;
Dec96
Nov96
Jan97
Feb97
Aug96
Feb92
KUPO
# It was fun the first time.
# A hash: Jan => 0, Feb => 1...
%hash = map {ucfirst $_, $no++} split /\n/, <<LALI;
jan
feb
mar
apr
may
jun
jul
aug
sep
oct
nov
dec
LALI
@sorted = map {$_->[0]}
sort {$b->[2] <=> $a->[2] or $b->[1] <=> $a->[1]}
map {/(\w\w\w)(\d\d)/; [$_, $hash{$1}, $2]}
@array;
-------------
--
Tim Gim Yee tgy@chocobo.org
http://www.chocobo.org/~tgy/moogle.html
'po!
------------------------------
Date: 10 Mar 1997 09:57:52 GMT
From: bss194@thunder (K.James)
Subject: Re: Starting with PERL: a question
Message-Id: <5g0lv0$6lm@hydraulix.bangor.ac.uk>
Ronald Fischer (rfi@uebemc.siemens.de) wrote:
: Hugh Blandford <hugh@island.net.au> writes:
: | From the website, it appears that the only basic instruction material is
: | from O'Reilly in the form of the 'llama' book. Yet this only deals with
: | PERL version 4. Is this where I will have to start? Does anyone know of
: | any tutorial docs at universities around the world that might be of
: | help?
: I experienced the same when asking at my bookstore. Nevertheless, O'Really
: issued a new edition in 1996, which is said to deal with Perl 5 - so keep
: looking.
Is there really a Llama for Perl 5? I bought mine recently and it's the
Perl 4 version.
Re. the original poster's question, I was in exactly the same situation
(no programming experience before starting Perl about 6 months ago) and
the old Llama did fine to start with, despite being for v4.
I haven't yet found a good online tutorial for complete beginners, but by
the time you get through the Llama you'll be able to go straight onto
stuff like the 'Far More Than You Ever Wanted To Know About...' tutorials
on CPAN.
--
Keith James Ph.D. - k.james@bangor.ac.uk PGP 2.6.2i Key ID 469A9FA1
Biodegradation Group *Encrypt and Survive*
School of Biological Sciences Nightmare: Quake me up now!
University of Wales, Bangor, UK
-------http://oracle.bangor.ac.uk/sbs/research/biodegradation/-------
------------------------------
Date: 10 Mar 1997 11:45:46 GMT
From: stevens@adam.dseg.ti.com (Harold Stevens)
Subject: Re: Who makes more $$ - Windows vs. Unix programmers?
Message-Id: <5g0s9b$ld@sf18.dseg.ti.com>
In article <33238785.174566912@news.calgary.agt.net>, ttoews@agt.net (Tony Toews) writes:
|> futureprog@bridge.net.NOSPAM.PLEASE (Future Programmer) wrote:
|>
|> >Subject says it all. Based on your personal experience and statistics,
|> >where a good programmer can make more money - in Windows or Unix arena?
[Snip...]
|> The fact that you ask where the money tells me that you'll likely
|> never be one of the best.
[Snip...]
Thank you for injecting some sanity in an inane thread. I've been in the
business 25 years and seen language/OS fads come and go with abandon. It
is like anything else: employers are not looking for robot coders. You'd
better bring a lot more to the table than mere technical proficiency and
your wallet. They can pick that up anytime at a local job shop. IMHO, if
you don't find yourself loving at least some part of the job (maybe even
just the people you work with) you're not far from the unemployment line
and/or substance abuse counseling. No amount of money can make you happy
(whatever that means personally); it only makes it easier to get started
finding out who you are and what you really need to do with your life.
IMHO: anybody serious about issues like this would be better served with
a focused visit to the pages of something like the Bhagavad Gita, not in
trolling Usenet newsgroups.
Regards, Weird
(Harold Stevens)
wyrd@ti.com
------------------------------
Date: Sun, 9 Mar 1997 13:32:11 -0800
From: brtaylor @ qtpi.lakewood.ca.us ("Bob Taylor")
Subject: Re: Who makes more $$ - Windows vs. Unix programmers?
Message-Id: <r8avf5.03j.ln@localhost>
In article <5qsxov$gkm@skyway.bridge.net>,
futureprog@bridge.net.NOSPAM.PLEASE (Future Programmer) writes:
> Subject says it all. Based on your personal experience and statistics,
> where a good programmer can make more money - in Windows or Unix arena?
> Unix appeals more to me and is more advanced technically, but I am
> afraid that it is losing the market share to Windows 95. I want to be in
> the consulting field.
>
> I am a recent college graduate in NYC and have offers to work in
> both fields. Please do not start Windows vs. Unix OS flamewar.
> Your insighful observations are appreciated. Please followup.
>
I would recommend learning BOTH. Why put all your eggs in one basket?
--
+---------------------------------------------------------------+
| Bob Taylor Email: brtaylor@qtpi.lakewood.ca.us |
|---------------------------------------------------------------|
| A witty statement goes here! (when I get to it!) |
+---------------------------------------------------------------+
------------------------------
Date: 10 Mar 1997 10:25:39 -0500
From: Mark Lehrer <edge@mud.imperium.net>
Subject: Re: Who makes more $$ - Windows vs. Unix programmers?
Message-Id: <w7sp23ahvw.fsf@mud.imperium.net>
futureprog@bridge.net.NOSPAM.PLEASE (Future Programmer) writes:
> Unix appeals more to me and is more advanced technically, but I am
> afraid that it is losing the market share to Windows 95. I want to be in
> the consulting field.
If you're going to be a consultant, you need to understand both
systems and where they fit in to the picture. Different companies
will use different solutions.
In general, I'd say that Windows work is easier to find because more
companies use it, but there are also more people with Windows skills
so you won't necessarily make as much. A good Unix programmer can
make a killing, but the work is harder to find...
------------------------------
Date: 9 Mar 1997 01:35:06 GMT
From: kodis@kodis.jagunet.com (John Kodis)
Subject: Why can't I subscript split?
Message-Id: <slrn5i44ud.jrf.kodis@kodis.jagunet.com>
I'm trying to extract and operate on one field in a line. It seems
that since split yields an array, and since an array can be
dereferenced to yield an array element, that I should be able to do
something along the lines of...
sort { $split(':',$a)[4] cmp $split(':',$b)[4] } @passwd;
...which causes perl to report ``Can't use subscript on split at -e
line 1, near "2]"''. I've tried all manner of bracketing,
referencing, and dereferencing without any success, and couldn't find
anything appropriate in the Camel book. I know that I could just use
a couple of temporary array variables to solve the problem, but I'd
really like to know how to do this as a nice neat one-liner.
-- John Kodis.
------------------------------
Date: Mon, 10 Mar 1997 15:48:58 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Why can't I subscript split?
Message-Id: <adelton.858008938@aisa.fi.muni.cz>
kodis@kodis.jagunet.com (John Kodis) writes:
> I'm trying to extract and operate on one field in a line. It seems
> that since split yields an array, and since an array can be
> dereferenced to yield an array element, that I should be able to do
> something along the lines of...
>
> sort { $split(':',$a)[4] cmp $split(':',$b)[4] } @passwd;
>
> ...which causes perl to report ``Can't use subscript on split at -e
> line 1, near "2]"''. I've tried all manner of bracketing,
> referencing, and dereferencing without any success, and couldn't find
> anything appropriate in the Camel book. I know that I could just use
> a couple of temporary array variables to solve the problem, but I'd
> really like to know how to do this as a nice neat one-liner.
Use
sort { (split(':',$a))[4] cmp (split(':',$b))[4] } @passwd;
The split mustn't be $split and you have to index the list the split
returns.
Hope this helps.
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: Mon, 10 Mar 1997 15:10:22 GMT
From: rob@viking.sheridanc.on.ca (Rob Naccarato)
Subject: Win95 Registry question...
Message-Id: <E6u25A.JAt@sheridanc.on.ca>
How can I change a user's UNC home dir in Perl-Win32 thru the registry?
--
Rob Naccarato
rob.naccarato@sheridanc.on.ca
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 82
************************************