[30904] in Perl-Users-Digest
Perl-Users Digest, Issue: 2149 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 22 18:09:46 2009
Date: Thu, 22 Jan 2009 15:09:12 -0800 (PST)
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, 22 Jan 2009 Volume: 11 Number: 2149
Today's topics:
Re: CGI.pm and Use of uninitialized value in pattern ma <hansmu@xs4all.nl>
Re: CGI.pm and Use of uninitialized value in pattern ma (Randal L. Schwartz)
Re: CGI.pm and Use of uninitialized value in pattern ma <yankeeinexile@gmail.com>
Current output column? <Steve.Roscio@hp.com>
Re: How can I use a REGEX to process WORDS <uri@stemsystems.com>
Re: How can I use a REGEX to process WORDS sln@netherlands.com
Re: How can I use a REGEX to process WORDS <1usa@llenroc.ude.invalid>
Re: How can I use a REGEX to process WORDS sln@netherlands.com
Re: inputting the ephemerides <hjp-usenet2@hjp.at>
Interesting open3 redirection problem usenet@schweikhardt.net
matching [0-127] <tux@nospam.ciuc.deu>
Re: matching [0-127] <burner+usenet@imf.au.dk>
Re: matching [0-127] <name@champ.com>
Re: matching [0-127] <tux@nospam.ciuc.deu>
Re: matching [0-127] <Steve.Roscio@hp.com>
Re: on looking for work <uri@stemsystems.com>
Re: on looking for work <cwilbur@chromatico.net>
Re: unable to open file <hansmu@xs4all.nl>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 22 Jan 2009 21:47:22 +0100
From: Hans Mulder <hansmu@xs4all.nl>
Subject: Re: CGI.pm and Use of uninitialized value in pattern match
Message-Id: <4978dc8d$0$190$e4fe514c@news.xs4all.nl>
Peter J. Holzer wrote:
> On 2009-01-21 15:33, A. Farber <Alexander.Farber@gmail.com> wrote:
>> I wish there were some clever module
>> for better-to-memorize passwords though.
>> Maybe by alternate vowels and consonants?
>
> Not a perl module, but might help: The "pwgen" utility present in some
> Linux distributions.
The pwgen utility on my Linux box does not have an option to
alternate vowels and consonants.
How about this:
#!/usr/bin/perl -w
use strict;
use warnings;
my @vowels = split //, 'aeiou';
my @consonants = split //, 'bcdfghjklmnpqrstvwxyz';
foreach (1..4) {
print $consonants[rand @consonants];
print $vowels[rand @vowels];
}
print "\n";
Hope this helps,
-- HansM
------------------------------
Date: Thu, 22 Jan 2009 13:56:30 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
To: "A. Farber" <Alexander.Farber@gmail.com>
Subject: Re: CGI.pm and Use of uninitialized value in pattern match
Message-Id: <86y6x3j981.fsf@blue.stonehenge.com>
>>>>> "A" == A Farber <Alexander.Farber@gmail.com> writes:
A> I wish there were some clever module
A> for better-to-memorize passwords though.
You mean besides Crypt::YAPassGen, and the five modules it references in its
manpage? Which I found in the CPAN with a 5 second search?
Have people forgotten how to search the cpan? It's Perl's greatest resource!
print "Just another Perl hacker,"; # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
------------------------------
Date: 22 Jan 2009 16:35:52 -0600
From: Lawrence Statton <yankeeinexile@gmail.com>
Subject: Re: CGI.pm and Use of uninitialized value in pattern match
Message-Id: <87tz7rge9j.fsf@hummer.cluon.com>
merlyn@stonehenge.com (Randal L. Schwartz) writes:
>
> Have people forgotten how to search the cpan? It's Perl's greatest resource!
>
AMEN! I frequently say: I use (and make my living at) Perl for two
reasons: CPAN and jobs.perl.org
--L
------------------------------
Date: Thu, 22 Jan 2009 14:31:40 -0700
From: Steve Roscio <Steve.Roscio@hp.com>
Subject: Current output column?
Message-Id: <glaojt$dnl$1@usenet01.boi.hp.com>
Is there a special var or IO:Handle or ??? thing that keeps track of the
current column of output to a filehandle? Like $. counts input lines
(rows), this thing would keep track of the current output column number.
I imagine it would use $ORS to know when it starts back at zero.
------------------------------
Date: Thu, 22 Jan 2009 12:45:58 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: How can I use a REGEX to process WORDS
Message-Id: <x7ljt344kp.fsf@mail.sysarch.com>
>>>>> "s" == spydox <spydox@gmail.com> writes:
s> I really like your construct: undef for $number, $color, $buffer;
you shouldn't like that construct. it is slower and clunkier than
needed. my rule is to avoid explicit use of the undef function as much
as possible. this is for style reasons and undef is easily avoidable
s> is that the same (effecively) as
s> ( $number, $color, $buffer ) = (undef, undef, undef );
why the extra redundant undef's?
( $number, $color, $buffer ) = () ;
that is faster than the for loop and shorter than the explicit undef
list.
but i suspect there isn't a need for undefing like that. whenever i see
a bunch of that sort of code i smell a poor design of the loop or
whatever. designing things so you don't need that is not difficult and
you can use scope, sub return, etc. to handle things without explicit
calls to undef.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
------------------------------
Date: Thu, 22 Jan 2009 17:59:23 GMT
From: sln@netherlands.com
Subject: Re: How can I use a REGEX to process WORDS
Message-Id: <aschn4h1370kbhr4p3mag5nar6epiob6ss@4ax.com>
On Wed, 21 Jan 2009 13:33:15 -0800 (PST), spydox@gmail.com wrote:
>I often find that I need to make a change to a block with logic like:
>
>IN ALL START APPLE..END APPLE blocks, change NUMBER N to NUMBER N+1 if
>the color is RED
>
>Using a regex to do this seems impractical to me ( and perhaps it
>really is), so in these WORD-ish cases I usually just loop through the
>array lines and set flags like $inAPPLE++... Its also tricky because
>often as in this case, I have to *look ahead* to check the color.
>Which makes looping not so nifty either.
>
>What I'd really prefer is a regex that sensed when I was in a START
>APPLE..END APPLE clause (of course ONLY in one clause- not the very
>FIRST START APPLE to the very LAST END APPLE), then
>
>Another approach I sometimes take is to split() the blocks out, then
>map the regex into the split array, then recombine. That's actually
>usually pretty effective, but sort of a pain because I have to
>scalarize the array, split it, map it, recombine it, and then re-array
>it. Geesh!
>
>So anyhow- I'm just wondering if this is some sort of perfunc or regex
>etc I can use to assist? I feel like I'm barking up the wrong tree..
>Thanks in advance gurus..
>
[snip data]
I guess this is one way to do it if you don't mind zero-width assertions.
sln
-------------------------------
use strict;
use warnings;
my $txt = join '', <DATA>;
my $delim1 = "START APPLE";
my $delim2 = "END APPLE";
my $color = "COLOR RED";
my $number = "NUMBER";
my $cntr = 0;
sub getChange
{
return ($_[0] =~ /\s$color\s/i and $_[0] =~ s/(\s$number\s)(\d+)(\s)/$1.($2+1).$3/ie);
}
$txt =~ s/((?:\s|^)$delim1(?=\s))((?:(?!\s$delim1\s).)*?\s)($delim2(?:\s|$))/
my $chunk = "$1$2$3";
if (getChange($chunk)) { ++$cntr; print $chunk."\n"; }
$chunk;
/isge;
if ($cntr > 0)
{
print "\nChanged $cntr block(s)\n";
} else {
print "\nDid not change any blocks, count = $cntr\n";
}
print "\n----------------------\nTXT:\n'$txt'\n";
__DATA__
!
START APPLE
.
.
NUMBER 5
COLOR RED
.
.
END APPLE
.
!
START ORANGE
.
.
NUMBER 10
COLOR GREEN
.
END ORANGE
.
.
!
START APPLE
.
.
NUMBER 10
COLOR GREEN
.
.
END APPLE
!
START APPLE
.
.
NUMBER 2
COLOR RED
.
.
END APPLE
------------------------------
Date: Thu, 22 Jan 2009 18:11:45 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: How can I use a REGEX to process WORDS
Message-Id: <Xns9B9B863CC72E1asu1cornelledu@127.0.0.1>
Uri Guttman <uri@stemsystems.com> wrote in
news:x7ljt344kp.fsf@mail.sysarch.com:
>>>>>> "s" == spydox <spydox@gmail.com> writes:
>
> s> I really like your construct: undef for $number, $color, $buffer;
>
> you shouldn't like that construct. it is slower and clunkier than
...
> but i suspect there isn't a need for undefing like that.
No there isn't. I was being careless. Thanks for the correction.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
------------------------------
Date: Thu, 22 Jan 2009 21:00:02 GMT
From: sln@netherlands.com
Subject: Re: How can I use a REGEX to process WORDS
Message-Id: <95mhn45av6f381tak4i60rc4s2qtbkvrj2@4ax.com>
On Wed, 21 Jan 2009 22:22:00 GMT, "A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote:
>spydox@gmail.com wrote in news:449a577f-1721-4f94-ac73-2717c8cb1e37
>@m12g2000vbp.googlegroups.com:
>
>> I often find that I need to make a change to a block with logic like:
>>
>> IN ALL START APPLE..END APPLE blocks, change NUMBER N to NUMBER N+1 if
>> the color is RED
>>
...
[snip OP statement]
>
>I am not sure anything is really wrong with the approaches listed above.
>I would be inclined to parse the data into proper Perl data structures
>(in this case an array of hashrefs seems reasonable). However, it seems
>to me like you are not familiar with the range operator .. so I came up
>with the following example using your data:
>
>#!/usr/bin/perl
>
>use strict;
>use warnings;
>
>my ($number, $color, $buffer);
>
>while ( <DATA> ) {
> print and next unless my $seq = /^START APPLE/ .. /^END APPLE/;
>
> $buffer .= $_;
> $number = $1 if /^NUMBER (\d+)/;
> $color = $1 if /^COLOR (\w+)/;
>
> if ( $seq =~ /E0$/ ) {
>
> if ( $color eq 'RED') {
^^
if ( $color && $number && $color eq 'RED') {
> my $replacement = $number + 1;
> $buffer =~ s/^NUMBER $number/NUMBER $replacement/m;
> }
>
> print $buffer;
> undef for $number, $color, $buffer;
^^^^^ funny this doesen't undefine $_ in my Perl
# $_ = undef for $number, $color, $buffer;
# or
($number, $color, $buffer) = ();
# Doesen't matter if they are undefined, but they should be set to a cleared state
# here in some way, $buffer for sure. Un-matched NUMBER or COLOR within a sequence block
# will either kick out with an error or will use matches from a previous block.
# I guess this isn't nit-picking, just error prevention.
> }
>}
>
sln
# test data:
__DATA__
!
START APPLE
.
.
NUMBER 5a
COLOR RED
.
.
END APPLE
.
!
START APPLE
.
.
NUMBER 10
COLOR
.
.
END APPLE
!
START APPLE
.
.
NUMBER 2
COLOR RED
.
.
END APPLE
------------------------------
Date: Thu, 22 Jan 2009 19:03:32 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: inputting the ephemerides
Message-Id: <slrngnhd7l.mnb.hjp-usenet2@hrunkner.hjp.at>
On 2009-01-22 00:40, Larry Gates <larry@example.invalid> wrote:
> On Wed, 21 Jan 2009 13:01:25 -0800, Jim Gibson wrote:
>
>> You are actually having trouble extracting '6' from '6m' with (\d{2}),
>> which causes all of your other matches to shift up one. You are better
>> off matching a string of digits with (\d+), rather than insisting upon
>> a specific number. If not, you should use (\d{1,2}).
>
> Thanks, Jim, that puts me back on track.
>
> My next hard match is ° 59.3' ,as in:
> Mercury 20h 36m 41s -16° 59.3'
>
> What I have is *(\d{1,2}\.\d{1})
"*" applies to the expression to the left of it. Starting a pattern with
it makes no sense. If you think that the pattern to the left of your
number is relevant, quote it completely, otherwise omit it.
> No amount of mixing symbols worked on
> this one.
>
> There's also trouble with the moon, as it has an extra ER that the others
> don't have. This is the current script:
>
> my $filename = 'eph6.txt';
> open(my $fh, '<', $filename) or die "cannot open $filename: $!";
>
> while (<$fh>) {
>
>
>
> /(\w+)\W+(\d{1,2}).*?(\d{1,2}).*?(\d{1,2}).*?([-+]\d{1,2}).*(\d{1,2}\.\d{1})/;
Use the /x modifier and comments to make your regex more readable:
/(\w+)\W+ # name
(\d{1,2}) .*? (\d{1,2}) .*? (\d{1,2}) .*? # RA
([-+]\d{1,2}) .* (\d{1,2}\.\d{1}) # declination
/x;
This makes it much easier to see that you match the longest possible
sequence of arbitrary characters (/.*/) in the middle of the
declination. So in
> Sun 19h 43m 51s -21â–‘ 17.8' 0.984 -35.020 87.148 Set
/.*/ will match "â–‘ 17.8' 0.984 -35.020 8" and /(\d{1,2}\.\d{1})/
will match "7.1". You probably wanted /.*?/ instead like in RA.
But using /.*?/ when you want to match a fixed string isn't ideal,
either. You *know* that between the hours and minutes of the RA there is
always the string "h ", so you should match it that way:
/(\w+)\W+ # name
(\d{1,2}) h\ (\d{1,2}) m\ (\d{1,2}) s .*? # RA
([-+]\d{1,2}) °\ (\d{1,2}\.\d{1})' # declination
/x;
You also know that your fields are separated by a single tab, so match
that tab:
/(\w+) \t # name
(\d{1,2}) h\ (\d{1,2}) m\ (\d{1,2}) s \t # RA
([-+]\d{1,2}) °\ (\d{1,2}\.\d{1})' \t # declination
/x;
> Pluto 18h 6m 40s -17â–‘ 44.9' 32.485 -52.833 108.052 Set
> C:\MinGW\source>
> ^^^^^^^
> I wonder why ° doesn't display.
° isn't an ASCII character. To read and print the file correctly, you
need to know which character set is used in the file and in your
terminal and convert accordingly.
hp
------------------------------
Date: Thu, 22 Jan 2009 13:28:47 -0800 (PST)
From: usenet@schweikhardt.net
Subject: Interesting open3 redirection problem
Message-Id: <64095365-88ac-4b9e-a5d3-61df8d93977a@o40g2000prn.googlegroups.com>
Consider this little complete perl program, intended to imitate a
shell's
gcc -v -E -x c - </dev/null >/dev/null
command:
#!/usr/bin/env perl
use warnings;
use strict;
use File::Spec;
use IPC::Open3;
# WORKS: shell$ gcc -v -E -x c - </dev/null >/dev/null
# WORKS: my @cmd = ('gcc', '-v', '-E', '-x', 'c', '/dev/null');
# This one never gets out of the while loop.
my @cmd = ('gcc', '-v', '-E', '-x', 'c', '-');
if (open (my $NULLOUT, ">", File::Spec->devnull)) {
if (open (my $NULLIN, "<", File::Spec->devnull)) {
my $pid = open3 ($NULLIN, $NULLOUT, \*CMD, @cmd);
while (<CMD>) {
print;
}
print "left while(<CMD>)\n";
waitpid ($pid, 0);
close CMD;
close $NULLIN;
}
close $NULLOUT;
}
I wonder why it never gets out of the "while" loop, but apparently
hangs somewhere waiting to read input that never arrives (after
printing gcc's stderr correctly). ps(1) says its wait channel it
piperd,
$ ps -o wchan,args|grep perl
piperd perl ./o3.pl (perl5.8.8)
I'm stumped. Does any perl guru know what's going on and how to
correct the situation?
Regards, Jens
------------------------------
Date: Thu, 22 Jan 2009 10:34:57 -0600
From: Tux Tango <tux@nospam.ciuc.deu>
Subject: matching [0-127]
Message-Id: <gla77h$4j0$1@news.acm.uiuc.edu>
This is probably not the best way to match ip addresses but I need a
quick and dirty fix. I am trying to match ip addresses like this:
xxx.xx.[0-127].*
if ($ip =~ /^xxx\.xx\.(0)\.\d+$/ )
{
print "yes\n!"
}
I am not sure how the capture the third byte
it cannot be 128-255.
any idea? thanks.
--s
------------------------------
Date: Thu, 22 Jan 2009 17:48:31 +0100
From: Rasmus Villemoes <burner+usenet@imf.au.dk>
Subject: Re: matching [0-127]
Message-Id: <u0l3afbffs0.fsf@orc02.imf.au.dk>
Tux Tango <tux@nospam.ciuc.deu> writes:
> This is probably not the best way to match ip addresses but I need a
> quick and dirty fix. I am trying to match ip addresses like this:
>
> xxx.xx.[0-127].*
>
> if ($ip =~ /^xxx\.xx\.(0)\.\d+$/ )
> {
> print "yes\n!"
> }
>
> I am not sure how the capture the third byte
> it cannot be 128-255.
>
> any idea? thanks.
You are probably right it is not the best way, but this seems to work
sub test {
my $ip = shift;
if ($ip =~ /^xxx\.xx\.(\d+)\.\d+$/ && 0 <= $1 && $1 <= 127) {
print "$ip ok\n";
}
else {
print "$ip bad\n"
}
}
test("xxx.xx.120.15");
test("xxx.xx.020.193");
test("xxx.xx.255.123");
You may want to replace + with something like {1,3}.
--
Rasmus Villemoes
<http://rasmusvillemoes.dk/>
------------------------------
Date: Thu, 22 Jan 2009 17:48:23 +0100
From: Noway <name@champ.com>
Subject: Re: matching [0-127]
Message-Id: <gla80q$3jn$1@ss408.t-com.hr>
Tux Tango wrote:
> This is probably not the best way to match ip addresses but I need a
> quick and dirty fix. I am trying to match ip addresses like this:
>
> xxx.xx.[0-127].*
>
> if ($ip =~ /^xxx\.xx\.(0)\.\d+$/ )
capturing and testing third octet,
if ($ip =~ /^\d+ \. \d+ \. (\d+) \. \d+$/x and $1 < 128) ...
if this is what you want to do.
------------------------------
Date: Thu, 22 Jan 2009 11:47:58 -0600
From: Tux Tango <tux@nospam.ciuc.deu>
Subject: Re: matching [0-127]
Message-Id: <glabge$5ri$1@news.acm.uiuc.edu>
Noway wrote:
> Tux Tango wrote:
>> This is probably not the best way to match ip addresses but I need a
>> quick and dirty fix. I am trying to match ip addresses like this:
>>
>> xxx.xx.[0-127].*
>>
>> if ($ip =~ /^xxx\.xx\.(0)\.\d+$/ )
>
> capturing and testing third octet,
>
> if ($ip =~ /^\d+ \. \d+ \. (\d+) \. \d+$/x and $1 < 128) ...
>
> if this is what you want to do.
Thanks! that worked!
--s
------------------------------
Date: Thu, 22 Jan 2009 13:54:53 -0700
From: Steve Roscio <Steve.Roscio@hp.com>
Subject: Re: matching [0-127]
Message-Id: <glamev$ou1$1@usenet01.boi.hp.com>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
Howdy -
The work has already been done for you:
use Regexp::Common qw /net/;
if ($ip =~ m/$RE{net}{IPv4}/) {
# whatever...
}
Look at the Regexp::Common modules, there's a ton of common expressions
already done & tested for you.
- - Steve
-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkl43REACgkQcbma8MS2xFdVjQCfU1nbkOzmkRhFqvn/9wAfFQgE
MbIAn1oXAmrEAT6zuWAv/aFrVxx8umRU
=Pize
-----END PGP SIGNATURE-----
------------------------------
Date: Thu, 22 Jan 2009 12:35:22 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: on looking for work
Message-Id: <x7prif452d.fsf@mail.sysarch.com>
>>>>> "c" == cartercc <cartercc@gmail.com> writes:
i have some knowledge in the perl jobs field so i will try to help out here.
c> As for myself, I have a decent job and while I'm always looking, it's
c> only because I'm looking for a better opportunity, not because I need
c> work. I'm just wondering in general.
c> (1) How is it that a person with good skills has trouble finding
c> work?
there are more issues to getting a job than just skills. location, work
environment, pay rates, onsite vs telecommute, etc.
c> (2) Why do employers often seem to pass over people with good
c> skills?
because they have criteria that aren't met. most often these days it is
on-site vs telecommute. most candidates can't move (stuck with a
mortgage, can't uproot the family) and too many companies insist on
employees being on site.
c> (3) What about self-employment or contract work for skilled
c> professionals?
those require marketing skills and perserverence. not all perl hackers
have those skills. i have been self-employed for over 15 years and it
can be very tough in spots.
c> (4) How does one position himself to minimize the necessity of looking
c> for work?
hit the lottery? be lucky and be part of an IPO company? there is no
particular thing you can do for this. if there were, everyone would do
it and it would become useless.
c> My take on this, from very limited exposure to the problem, is not
c> lack of work in general, but a disconnect between the consumers of
c> skilled labor and the producers of skilled labor. I've seen more often
c> than not (in the situations that I know personally) that the hirer,
c> which mostly is not the person who needs to hire, looks at the wrong
c> things, for example, a requisition that specifies C# may hire a person
c> with limited C# skill and pass over a person with extensive OO skills
c> in a number of other languages. Or a requisition that specifies MySQL
c> and PHP may hire a person with very limited experience in this area
c> while passing over a person with good Oracle and MSSQL experience
c> coupled with JSP and ASP.
that is more of the disconnect between HR people who are not technical
so they rely on buzzwords and the technically oriented candidates and
hiring managers.
c> I know this is OT and not specifically related to Perl, so please
c> excuse this if you think this is posted to the wrong group.
a better place to discuss this is the perl jobs discuss list (look for
it at jobs.perl.org). it isn't off topic to discuss job skills here but
it is off topic to discuss specific jobs or to offer them.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
------------------------------
Date: Thu, 22 Jan 2009 15:25:57 -0500
From: Charlton Wilbur <cwilbur@chromatico.net>
Subject: Re: on looking for work
Message-Id: <86eiyvytnu.fsf@mithril.chromatico.net>
>>>>> "cc" == cartercc <cartercc@gmail.com> writes:
cc> (1) How is it that a person with good skills has trouble finding
cc> work?
It's like a great big dance. You have good companies to work for, and
bad companies to work for. Over time, the good companies accumulate all
the good employees they need. The bad companies hire people and lose
the good people, increasing their badness.
Eventually a person with good skills determines that he will only work
for good companies, and finds himself in a position where he is waiting
for a good company to have an opening.
cc> (2) Why do employers often seem to pass over people with
cc> good skills?
Because the employer wants objectively demonstrated skills. Many
programmers can't show a portfolio or code samples, and it's very
difficult for soft-skilled HR types to tell the difference between a
competent programmer and a competent scam artist. When in doubt, the
employer errs on the side of caution.
Because the employer wants a personality type that fits with the manager
of the open position. A brilliant programmer who's abrasive won't get
hired to work in a group where the manager is promoting a more collegial
atmosphere.
Because the employer may also want other skills: really good software
engineers often get paid more because they can explain the problem in
English and then deliver a solution to meet a deadline rather than
because they understand all the ramifications of closures.
cc> (3) What about self-employment or contract work for skilled
cc> professionals?
Self-employment requires a different skillset. If you have marketing
and accounting skills, and are very good at networking, you might have a
shot at it.
cc> (4) How does one position himself to minimize the necessity of
cc> looking for work?
Win the lottery or own the company.
Charlton
--
Charlton Wilbur
cwilbur@chromatico.net
------------------------------
Date: Thu, 22 Jan 2009 22:57:23 +0100
From: Hans Mulder <hansmu@xs4all.nl>
Subject: Re: unable to open file
Message-Id: <4978ecf6$0$189$e4fe514c@news.xs4all.nl>
Jürgen Exner wrote:
> "Tintin@teranews.com" <Tintin@teranews.com> wrote:
>> Forgot to mention that the standard Perl FindBin module is useful for
>> working out working directories.
>
> How so? At least the version I am looking at states
>
> FindBin - Locate directory of original perl script
>
> It doesn't mention any function related to the CWD.
The documentation doesn't mention it, but FindBin uses Cwd internally.
So, after you load FindBin, you can call Cwd::getcwd().
Of course, you can save a few keystrokes by using Cwd yourself.
-- HansM
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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.
#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 V11 Issue 2149
***************************************