[17027] in Perl-Users-Digest
Perl-Users Digest, Issue: 4439 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 26 21:10:29 2000
Date: Tue, 26 Sep 2000 18:10:14 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <970017014-v9-i4439@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 26 Sep 2000 Volume: 9 Number: 4439
Today's topics:
perl newbie question <rbilyea@csac.com>
Re: perl newbie question <newsposter@cthulhu.demon.nl>
Perl on Windows <cyberdog@nycap.rr.com>
Re: Perl on Windows <jeff@vpservices.com>
Recursion in Perl <anants@rpi.edu>
Re: Recursion in Perl (Abigail)
Re: Recursion in Perl <tim@ipac.caltech.edu>
REGEX problem <flsq@home.com>
Re: Salary Range for Perl Programmers <spragg@cs.ucdavis.edu>
Re: Salary Range for Perl Programmers (Tim)
Re: Salary Range for Perl Programmers <glynFOOdwr@FSCKdeleteEmeD.co.uk>
Re: Thnaks to the Gurus! (Arthur Darren Dunham)
Re: Thnaks to the Gurus! (Randal L. Schwartz)
Re: Unrecognized character \327 (Ilya Zakharevich)
Re: West Chester, PA 19380 Perl Users Group? <nospam@david-steuber.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 26 Sep 2000 17:42:49 -0500
From: "Richard Bilyea" <rbilyea@csac.com>
Subject: perl newbie question
Message-Id: <A0BE1F23FD310DFE.4B40163F7CFBB85F.F78D8E6E30A1C301@lp.airnews.net>
I've been called onto a task to help with a problem with perl connecting to
a database via Netscape server and browser. The perl code written works
when called via a telnet session but fails when accessed via browser through
a Netscape server. The code fails on the line that attempts to get the
database handle:
$dbh = DBI->connect("dbi:Oracle:DBTEST", "xxx", "xxx",
{ RaiseError=>0, AutoCommit=>0 });
The error:
Software Error
Can't call method prepare without a package or object reference
These are the use declarations:
use DBI;
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
Any help would be greatlly appreciated
------------------------------
Date: 26 Sep 2000 22:48:40 GMT
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: perl newbie question
Message-Id: <8qr948$kr9$1@internal-news.uu.net>
Richard Bilyea <rbilyea@csac.com> wrote:
> I've been called onto a task to help with a problem with perl connecting to
> a database via Netscape server and browser. The perl code written works
> when called via a telnet session but fails when accessed via browser through
> a Netscape server. The code fails on the line that attempts to get the
> database handle:
> $dbh = DBI->connect("dbi:Oracle:DBTEST", "xxx", "xxx",
> { RaiseError=>0, AutoCommit=>0 });
> The error:
> Software Error
> Can't call method prepare without a package or object reference
> These are the use declarations:
> use DBI;
> use CGI qw(:standard);
> use CGI::Carp qw(fatalsToBrowser);
> Any help would be greatlly appreciated
Read DBD::Oracle's documentation. Especially the 'CONNECTING TO ORACLE'
part.
Erik
------------------------------
Date: Wed, 27 Sep 2000 00:30:05 -0000
From: Cyber Dog <cyberdog@nycap.rr.com>
Subject: Perl on Windows
Message-Id: <st2fsdod4st85b@corp.supernews.com>
I'm writing perl scripts in my Windows 98 environment using ActiveState's
ActivePerl. The scripts execute fine when I run them, but as soon as the
execution is finished the MS-DOS window they run in automatically closes.
How can I keep it open so I can view the final output?
--
Posted via CNET Help.com
http://www.help.com/
------------------------------
Date: Tue, 26 Sep 2000 17:43:20 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Perl on Windows
Message-Id: <39D142A8.3BC0880B@vpservices.com>
Cyber Dog wrote:
>
> I'm writing perl scripts in my Windows 98 environment using ActiveState's
> ActivePerl. The scripts execute fine when I run them, but as soon as the
> execution is finished the MS-DOS window they run in automatically closes.
> How can I keep it open so I can view the final output?
Open a DOS console window and run your script in that window with, for
example
c:\> perl scriptname.pl arg1 arg2 arg3
--
Jeff
------------------------------
Date: Tue, 26 Sep 2000 17:17:55 -0400
From: Swamy Ananthanarayan <anants@rpi.edu>
Subject: Recursion in Perl
Message-Id: <39D11283.3FC0370B@rpi.edu>
Greetings,
Is there any way to perform recursion in perl? I would like a function
to call itself everytime it hits a directory. So for example:
sub find {
$current_dir = $_0;
@a = <current_dir/*>;
foreach $line (@a)
{
if (chdir $line)
{
find($current_dir);
}
}
}
But this doesn't work. It stops after the first directory it hits. Any
suggestions?
Thanks for all the help and if possible please email me as well as the
group.
Swamy Ananthanarayan
anants@rpi.edu
------------------------------
Date: 26 Sep 2000 23:25:56 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Recursion in Perl
Message-Id: <slrn8t2c1n.lo9.abigail@alexandra.foad.org>
Swamy Ananthanarayan (anants@rpi.edu) wrote on MMDLXXXIII September
MCMXCIII in <URL:news:39D11283.3FC0370B@rpi.edu>:
<> Greetings,
<>
<> Is there any way to perform recursion in perl?
Yes.
<> I would like a function
<> to call itself everytime it hits a directory. So for example:
<>
<> sub find {
<>
<> $current_dir = $_0;
<>
<> @a = <current_dir/*>;
<>
<> foreach $line (@a)
<> {
<> if (chdir $line)
<> {
<> find($current_dir);
<> }
<> }
<> }
<>
<> But this doesn't work. It stops after the first directory it hits. Any
<> suggestions?
Well, I can tell you that recursion isn't the problem. It would be easy
to find out why it's failing, but since you're not checking returns values
or $!, you prefer a guessing game. You're welcome to it, but I doubt you
find many players here.
Of course, why you want to implement your own find() instead of File::Find
is beyond me. (Well, I could imagine why, and I prefer not to use File::Find
myself, but given the find() above, you're much better off using File::Find).
Abigail
--
perl -wle'print"Κυστ αξοτθες Πεςμ Θαγλες"^"\x80"x24'
# A kingfisher above
# the Emperor's palace.
# Master Po. Joshu.
------------------------------
Date: Tue, 26 Sep 2000 16:26:32 -0700
From: Tim Conrow <tim@ipac.caltech.edu>
Subject: Re: Recursion in Perl
Message-Id: <39D130A8.5B9E56D1@ipac.caltech.edu>
Swamy Ananthanarayan wrote:
> Is there any way to perform recursion in perl? I would like a function
> to call itself everytime it hits a directory. So for example:
>
> sub find {
> $current_dir = $_0;
You mean 'my $current_dir = $_[0]' there. Stick to lexicals, especially if
you're recursing.
> @a = <current_dir/*>;
You mean 'my @a = glob("$current_dir/*")' there.
> foreach $line (@a)
You mean 'foreach my $line (@a)' there.
> {
> if (chdir $line)
Terrible way to do this. You mean something more like
if(-d $line) {
chdir $line or die "Can't chdir to $line; $!";
> {
> find($current_dir);
> }
> }
> }
>
> But this doesn't work. It stops after the first directory it hits. Any
> suggestions?
You mean suggestions other than "fix all the bugs?" No.
:-)
--
-- Tim Conrow tim@ipac.caltech.edu |
------------------------------
Date: Wed, 27 Sep 2000 00:34:49 GMT
From: Shawn and Francine <flsq@home.com>
Subject: REGEX problem
Message-Id: <39D13FBE.4A042D59@home.com>
I need to search a string and replace all instances of "." with a
space.
ie. "." becomes " ", "...." becomes " ".
the code I have listed below seems to work to a point but if the "."
lands at the end of a string it
isn't replaced.
Could some one please help me.
Thanks in advance.
foreach $cycle (@contents)
{
$cycle =~ s/(\.+)/ /;
}
------------------------------
Date: 26 Sep 2000 22:13:43 GMT
From: Adam Trace Spragg <spragg@cs.ucdavis.edu>
Subject: Re: Salary Range for Perl Programmers
Message-Id: <8qr72n$ihl$3@mark.ucdavis.edu>
steveko@home.com wrote:
: I have a performance review Thursday 9/28/00 and my supervisor asked me
: to come up with a suggested raise. I'm highly valued at my company and
: have been involved with many of the key projects here. He pretty much
: said something along the lines of he'll try to get me whatever I ask
: for, but of course I'd like to come up with a fair and realistic figure.
: I'm located in San Diego. I started at 50,000 and have just completed
: my first year there. Any suggestions on how much I should ask for?
Hard to say. Going at face value, and assuming that your boss and you agree
that you're highly valued so forth, then I think a standard raise of somewhere
between 5 and 15% would be about right.
It's a little weird, 'cause in the same post you mention that you're a value
to your company, but also admit to being sloppy and wanting help with your
skills. This indicates to me that you aren't an expert (which is normal...
you've got a year of experience), and it seems that $50K sounds more or less
about right.
To make you feel better, I have a friend who started somewhere for $38K, and
I have two years experience and make a little over $50K... it varies, but
you're doing fine.
And if you don't buy any of that, start with 75K and work down. :)
Good luck! :)
------------------------------
Date: Tue, 26 Sep 2000 22:39:27 GMT
From: SPAM+indigo@dimensional.com (Tim)
Subject: Re: Salary Range for Perl Programmers
Message-Id: <8FBBAC056indigodimcom@166.93.207.145>
stepheneko@my-deja.com wrote in <8qqo8a$61i$1@nnrp1.deja.com>:
>I have a performance review Thursday 9/28/00 and
>my supervisor asked me to come up with a
>suggested raise. I'm highly valued at my company
>and have been involved with many of the key
>projects here. He pretty much said something
>along the lines of he'll try to get me whatever I
>ask for, but of course I'd like to come up with a
>fair and realistic figure.
>
>I'm located in San Diego. I started at 50,000 and
>have just completed my first year there. Any
>suggestions on how much I should ask for?
Tough question. First, make sure you are evaluating
yourself properly. My first job, I though I was
highly valued and was in fact involved in many key
projects. Part of that was because I was motivated
and had good skills, part was because I was a dumb
kid who would work ridiculous hours, did whatever I
was told, and was a hell of a lot cheaper than the
contractors. Make sure you know which is which.
Second, understand that in corporate terms, 10% is
supposed to be a real super good merit raise, 3-7%
being more likely. So try to find out what your pay
scale is like, and ask for a raise *and* a promotion.
That is one of the few ways to get a hefty increase...
the other being the threat of leaving...
Finally, realize that it is difficult to get market
value for your skills without switching jobs. The
sad reality is companies would rather let you walk
than upset the balance of their delicate salary
structures, even if it costs more to replace you. I
was in a situation like yours, they told my to expect
5% and a promotion maybe in a year or two. Two hours
later, I had an offer for 45% from another company. It
is sad, but if you stay where you are at, you are locked
into that 3-7% raise structure, and even if they do right
by you this year, you'll have to fight every year to get
what you are worth.
-T
------------------------------
Date: Wed, 27 Sep 2000 00:04:22 +0100
From: "Glyndwr" <glynFOOdwr@FSCKdeleteEmeD.co.uk>
Subject: Re: Salary Range for Perl Programmers
Message-Id: <XV9A5.2956$Vg4.41357@news2-win.server.ntlworld.com>
"Russ Jones" <russ_jones@rac.ray.com> wrote in message
news:39D10FE8.CD734129@rac.ray.com...
> ...concentrate on programming and ignore a bit of arcane trivia that has
> no practical value...
> {snippage}
> Quae narravi, nullo modo negabo. - Catullus
Hmmmm.
--
-=G=-
print join " ",reverse split /\s+/,'hacker. Perl another Just',"\n";
Web: http://www.fscked.co.uk ICQ: 66545073
------------------------------
Date: 26 Sep 2000 22:34:17 GMT
From: add@netcom.com (Arthur Darren Dunham)
Subject: Re: Thnaks to the Gurus!
Message-Id: <8qr899$apl$1@nntp9.atl.mindspring.net>
In article <39D0FBF9.DD55CF33@rac.ray.com>,
Russ Jones <russ_jones@rac.ray.com> wrote:
>Craig Berry wrote:
>>
>> Uri Guttman (uri@sysarch.com) wrote:
>> : from memory (too lazy to reach over and look):
>> :
>> : loop: see loop.
>>
>> CS 101 professor: "In order to discuss recursion, we must first discuss
>> recursion." You could spot the students who were going to ace the class;
>> they laughed. :)
>>
>
>That was actually in one release of an IBM terms and acronyms
>dictionary.
>
>recursion: see recursion.
>
>It was changed to something that wasn't nearly as entertaining in the
>next release.
Just like Perl.
The "See loop" portion of the glossary definition is no longer present
in the 3rd edition of the camel.
--
Darren Dunham ddunham@taos.com
Unix System Administrator Taos - The SysAdmin Company
Got some Dr Pepper? San Francisco Bay Area
< Please move on, ...nothing to see here, please disperse >
------------------------------
Date: 26 Sep 2000 16:50:56 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Thnaks to the Gurus!
Message-Id: <m1snqmemqn.fsf@halfdome.holdit.com>
>>>>> "Arthur" == Arthur Darren Dunham <add@netcom.com> writes:
Arthur> Just like Perl.
Arthur> The "See loop" portion of the glossary definition is no longer
Arthur> present in the 3rd edition of the camel.
Yeah, a lot of the humor was excised from the third Camel. It now
reads rather dry and lifeless. At least they still have the first
humorous entry I wrote, regarding "Regular Expression: /Oh s.*t./".
Some of me lives in that book, still, in spite of the new authorship
status.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: 26 Sep 2000 22:37:30 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Unrecognized character \327
Message-Id: <8qr8fa$oin$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to udoline
<udo.kuehne@inatec.com>],
who wrote in article <8qmuuq$g1k6f$1@ID-25523.news.cis.dfn.de>:
> in *.xs file
>
> !!!!!!!!!!!!!!!!!!!!!! f u c k i n g "strncpy"
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
>
> my output buffer was not filled
>
> nothing in perlstream create this message: Unrecognized character \327
>
> it's better to use "memcpy"
??? What is a "perlstream"?
perl -wle 'eval "\327;1" or die'
Unrecognized character \327 at (eval 1) line 1.
...propagated at -e line 1.
Exit 255
Hope this helps,
Ilya
------------------------------
Date: Wed, 27 Sep 2000 00:15:55 GMT
From: David Steuber <nospam@david-steuber.com>
Subject: Re: West Chester, PA 19380 Perl Users Group?
Message-Id: <m3itrig05i.fsf@solo.david-steuber.com>
logan@cs.utexas.edu (Logan Shaw) writes:
' Check http://www.pm.org/ .
Thanks!
--
David Steuber | Perl apprentice, Apache/mod_perl user, and
NRA Member | general Internet web wannabe.
ICQ# 91465842 (Using Micq 0.4.6 under Linux)
It's time to be free: http://www.harrybrowne2000.org
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 4439
**************************************