[22139] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 4360 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jan 7 18:10:49 2003

Date: Tue, 7 Jan 2003 15:10:13 -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           Tue, 7 Jan 2003     Volume: 10 Number: 4360

Today's topics:
    Re: Reg Expression help <kasp@epatra.com>
    Re: Reg Expression help (Tad McClellan)
    Re: Reg Expression help <usenet@dwall.fastmail.fm>
    Re: Reg Expression help <uri@stemsystems.com>
        Sharing Global Variables within Program AND in Modules. <hal@thresholddigital.com>
    Re: Sharing Global Variables within Program AND in Modu (Tad McClellan)
    Re: Sharing Global Variables within Program AND in Modu <hal@thresholddigital.com>
    Re: These are discouraging stats to Perlistas & Pythoni <Oschler@earthlink.net>
    Re: These are discouraging stats to Perlistas & Pythoni <peter@engcorp.com>
    Re: These are discouraging stats to Perlistas & Pythoni <dsavitsk@ecpsoftware.com>
    Re: These are discouraging stats to Perlistas & Pythoni <mwm@mired.org>
    Re: These are discouraging stats to Perlistas & Pythoni <warren.postma@adaptivenetworks.on.ca>
    Re: These are discouraging stats to Perlistas & Pythoni <imbosol@vt.edu>
    Re: These are discouraging stats to Perlistas & Pythoni (Malcolm Dew-Jones)
    Re: These are discouraging stats to Perlistas & Pythoni <ericm-NOSPAM@vertical.com>
    Re: These are discouraging stats to Perlistas & Pythoni <peter@engcorp.com>
    Re: These are discouraging stats to Perlistas & Pythoni <simon.12.ghum@spamgourmet.com>
    Re: These are discouraging stats to Perlistas & Pythoni <llewelly.at@xmission.dot.com>
    Re: These are discouraging stats to Perlistas & Pythoni (Jacob Hallen)
        win32::ole ppt objtype 7 counting col <lance@augustmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 7 Jan 2003 22:06:03 +0530
From: "Kasp" <kasp@epatra.com>
Subject: Re: Reg Expression help
Message-Id: <avevmn$uhc$1@newsreader.mailgate.org>

"Steven Coutts" <scoutts.work@btinternet.com> wrote in message
news:3e1ade4c$1@nntp.onyx.net...
> Tried   /\+\+S/
[snipped]

Steven, you haven't read sufficiently. Read a book or perldocs.
Regular Expressions are tricky...but this one is simple and totally messed
up.

For sustitution you use:
    s/origional/new/optionalParameters;
Also remember that + has a special meaning and you have to escape it ..like
this \+ in your regular expression.
--
Perl is designed to give you several ways to do anything, so
consider picking the most readable one.
             -- Larry Wall




------------------------------

Date: Tue, 7 Jan 2003 12:37:28 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Reg Expression help
Message-Id: <slrnb1m7j8.h15.tadmc@magna.augustmail.com>

Steven Coutts <scoutts.work@btinternet.com> wrote:

> Just a quickie, been puzzling over this I'm not too hot on regular
> expressions, how would I write a reg exp to replace '+' signs with spaces?


You would not write a regex for that task.

You would use tr///


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Tue, 07 Jan 2003 21:50:37 -0000
From: "David K. Wall" <usenet@dwall.fastmail.fm>
Subject: Re: Reg Expression help
Message-Id: <Xns92FCAB57E7539dkwwashere@216.168.3.30>

Tad McClellan <tadmc@augustmail.com> wrote on 07 Jan 2003:

> Steven Coutts <scoutts.work@btinternet.com> wrote:
> 
>> Just a quickie, been puzzling over this I'm not too hot on
>> regular expressions, how would I write a reg exp to replace '+'
>> signs with spaces? 
> 
> 
> You would not write a regex for that task.
> 
> You would use tr///

Why say

$str =~ tr/+/ /;

when you can say 

$position = 0;
while ($position < length $str) {
    $position = index $str, '+', $position;
    last unless $position >= 0;
    substr($str, $position, 1) = ' ';
}
print "Content-Type: text/html\n\n";
print "$str\n";


:-)

-- 
David K. Wall - usenet@dwall.fastmail.fm
"Oook."


------------------------------

Date: Tue, 07 Jan 2003 21:52:43 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Reg Expression help
Message-Id: <x7lm1wsk44.fsf@mail.sysarch.com>

>>>>> "DKW" == David K Wall <usenet@dwall.fastmail.fm> writes:

  DKW> $position = 0;
  DKW> while ($position < length $str) {
  DKW>     $position = index $str, '+', $position;
  DKW>     last unless $position >= 0;
  DKW>     substr($str, $position, 1) = ' ';

dummy! use 4 arg substr!!

  DKW> }
  DKW> print "Content-Type: text/html\n\n";
  DKW> print "$str\n";

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org
Damian Conway Perl Classes - January 2003 -- http://www.stemsystems.com/class


------------------------------

Date: Tue, 07 Jan 2003 16:58:00 GMT
From: Hal Vaughan <hal@thresholddigital.com>
Subject: Sharing Global Variables within Program AND in Modules...
Message-Id: <sGDS9.670991$NH2.47038@sccrnsc01>

My background is Apple //e assembler and, until recently, have not been 
programming for over a decade, so some things, like local and global 
variables (in this case) are not exactly new, but different from what I 
used to use.

I've been reading about the difference in declaring a variable with "my" and 
"our".  I know I can declare a variable at the start of a program with 
"our" and it will be global to all the routines in the program (unless one 
routine specifically creates a private variable within itself with "my").  
I tried to share these "our" variables with routines within modules.  It 
did not work.

I have one perl module used by 5 or six programs.  This module contains a 
function for writing status to a log -- of course each of the programs uses 
a different filename for the log.  I want to be able to set this filename 
at the start of the program with "our", like:

$date = "030112"; #Actually string to show today's date from time();
our $logname = "logfile-print-".$date;

And I want $logname to have the same value in the functions in the module I 
call.  How can I do this without having to include it as a parameter each 
time I call a function in the module?

(I know this is just one variable and easy to include as a parameter, but I 
want to make 3-5 variables global and it would be A LOT easier if their 
value remained consistant, even in functions within modules.)

Thanks for any info on this!

Hal


------------------------------

Date: Tue, 7 Jan 2003 12:42:11 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Sharing Global Variables within Program AND in Modules...
Message-Id: <slrnb1m7s3.h15.tadmc@magna.augustmail.com>

Hal Vaughan <hal@thresholddigital.com> wrote:

> I've been reading about the difference in declaring a variable with "my" and 
> "our".


Have you seen this one?

   
   "Coping with Scoping":

      http://perl.plover.com/FAQs/Namespaces.html


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Tue, 07 Jan 2003 19:04:07 GMT
From: Hal Vaughan <hal@thresholddigital.com>
Subject: Re: Sharing Global Variables within Program AND in Modules...
Message-Id: <HwFS9.480654$GR5.181796@rwcrnsc51.ops.asp.att.net>

Tad McClellan wrote:

> Hal Vaughan <hal@thresholddigital.com> wrote:
> 
>> I've been reading about the difference in declaring a variable with "my"
>> and "our".
> 
> 
> Have you seen this one?
> 
>    
>    "Coping with Scoping":
> 
>       http://perl.plover.com/FAQs/Namespaces.html
> 

I hadn't even heard of the site.  It was a HUGE help -- only had to read 1 
or 2 screens before I found a few things that really helped me with this 
and variables overall.

Thanks!

Hal 



------------------------------

Date: Tue, 07 Jan 2003 16:29:41 GMT
From: "Robert Oschler" <Oschler@earthlink.net>
Subject: Re: These are discouraging stats to Perlistas & Pythonistas...
Message-Id: <VfDS9.4230$Fj2.2514015@news2.news.adelphia.net>


"Sara" <genericax@hotmail.com> wrote in message
news:776e0325.0301070721.7405a312@posting.google.com...
> Looks like Bill is successfully creating his "clone army".
>
<snip>
>
> Recent DICE survey resuts:
>
> >Number of Job Listings by Programming Language (January 3, 2003)
> >
> >               monster.com dice.com %
> >
> >  SQL          5000        2486     24.06%
> >
> >  ASP          2156        2480     14.90%
> >
> >  Java         2664        1862     14.55%
> >
> >  C++          2046        1480     11.33%
> >
> >  Visual Basic 2037        1095     10.07%
> >
> >  Perl         925         548      4.73%
> >
> >  Javascript   914         489      4.51%
> >
> >  Cobol        595         532      3.62%
> >
> >  SAS          805         269      3.45%
> >
> >  C#           284         179      1.49%
> >
> >  Ada          377         65       1.42%
> >
> >  RPG          248         163      1.32%
> >
> >  PowerBuilder 155         106      0.84%
> >
> >  PHP          189         30       0.70%
> >
> >  Delphi       157         55       0.68%
> >
> >  Fortran      121         49       0.55%
> >
> >  LabVIEW      108         27       0.43%
> >
> >  Tcl          73          33       0.34%
> >
> >  Python       55          32       0.28%
> >
> >  Smalltalk    41          30       0.23%
> >
> >  Rexx         33          25       0.19%
> >
> >  Pascal       28          17       0.14%
> >
> >  Lisp         12          9        0.07%
> >
> >  SML          7           6        0.04%
> >
> >  Haskell      6           6        0.04%
> >
> >  Caml         0           0        0.00%
> >


I can't look at dice.com anymore, too depressing.  Some appx stats:

Date    C++ jobs    Java jobs

3/2000    42000    31000
10/2003    2200    2800

That's right, almost a 20 to 1 loss of job reqs in C++, and 10 to 1 in Java.
Also note, Java is now in the lead over C++

I hate the dot-bust.

thx




------------------------------

Date: Tue, 07 Jan 2003 11:50:24 -0500
From: Peter Hansen <peter@engcorp.com>
Subject: Re: These are discouraging stats to Perlistas & Pythonistas...
Message-Id: <3E1B0550.4A06B801@engcorp.com>

Robert Oschler wrote:
> 
> I can't look at dice.com anymore, too depressing.  Some appx stats:
> 
> Date    C++ jobs    Java jobs
> 
> 3/2000    42000    31000
> 10/2003    2200    2800
> 
> That's right, almost a 20 to 1 loss of job reqs in C++, and 10 to 1 in Java.
> Also note, Java is now in the lead over C++
> 
> I hate the dot-bust.

Maybe these stats say more about dice.com itself than about the 
state of the economy.  Are the numbers reflected in other sites?
Or is dice.com *the* place to go, so we can take it as representative?

-Peter


------------------------------

Date: Tue, 07 Jan 2003 19:43:46 GMT
From: dsavitsk <dsavitsk@ecpsoftware.com>
Subject: Re: These are discouraging stats to Perlistas & Pythonistas...
Message-Id: <S5GS9.5881$qU5.4697503@newssrv26.news.prodigy.com>

Sara wrote:

> Recent DICE survey resuts:
> 
> 
>>Number of Job Listings by Programming Language (January 3, 2003)
>>

>>
>> Visual Basic 2037        1095     10.07%
>>
>> Python       55          32       0.28%

This says nothing, of course. If the ratio of VB people to Python people 
is 2037 to 54 or greater, then you shouldn't be too worried.  I have no 
idea what the real numbers are, but I would not be surprised if the 
disparity was this large.

-d



------------------------------

Date: Tue, 07 Jan 2003 18:50:39 GMT
From: Mike Meyer <mwm@mired.org>
Subject: Re: These are discouraging stats to Perlistas & Pythonistas...
Message-Id: <x7heckyeti.fsf@guru.mired.org>

"Robert Oschler" <Oschler@earthlink.net> writes:

> I can't look at dice.com anymore, too depressing.  Some appx stats:
> 
> Date    C++ jobs    Java jobs
> 3/2000    42000    31000
> 10/2003    2200    2800

Ok, where did you get the numbers for October 2003? Or is that 1/2003
or 10/2002?

        Thanks,
        <mike
        -- 
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.


------------------------------

Date: Tue, 07 Jan 2003 13:56:18 -0500
From: Warren Postma <warren.postma@adaptivenetworks.on.ca>
Subject: Re: These are discouraging stats to Perlistas & Pythonistas...
Message-Id: <WoFS9.5368$Af2.577313@news20.bellglobal.com>


These stats confirm what we already knew, which is that there are more 
VB idiots and Cobol old-timers out there than you can possibly count. 
And Java? It's the new cobol.

Warren



------------------------------

Date: Tue, 07 Jan 2003 19:33:30 GMT
From: Carl Banks <imbosol@vt.edu>
Subject: Re: These are discouraging stats to Perlistas & Pythonistas...
Message-Id: <eYFS9.18484$xb.14542@nwrddc02.gnilink.net>

Robert Oschler wrote:
> I can't look at dice.com anymore, too depressing.  Some appx stats:
> 
> Date    C++ jobs    Java jobs
> 
> 3/2000    42000    31000
> 10/2003    2200    2800
> 
> That's right, almost a 20 to 1 loss of job reqs in C++, and 10 to 1 in Java.
> Also note, Java is now in the lead over C++
> 
> I hate the dot-bust.


I don't know if I trust a website that believes C and C++ are the same
langauge, which this site appears to do.


-- 
CARL BANKS


------------------------------

Date: 7 Jan 2003 11:30:09 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: These are discouraging stats to Perlistas & Pythonistas...
Message-Id: <3e1b2ac1@news.victoria.tc.ca>

Sara (genericax@hotmail.com) wrote:
: Looks like Bill is successfully creating his "clone army". 

: At least we're way above PHP, which barely beat Fortran! Lords of
: Light it's amazing anyone who isn't one of Bill's or Sun's drones is
: employed.... It looks like a Perl programmer has about an equal chance
: of being employed in his skill as a COBOL programmer, and probably for
: a lot less $$ since COBOL programmers have to be scarce as hens teeth.

: This is discouraging.... I guess next year at OSCON we should replace
: the Python talks with "Labview" and "PowerBuilder" to attract more
: attendees? I'd be a parking attendant  before I'd learn ASP. You may
: be taking over the world Bill but you ain't getting ME!

:  -------------------------------------------------------------------------


: Recent DICE survey resuts:

: >Number of Job Listings by Programming Language (January 3, 2003)
: >
: >               monster.com dice.com %
: >
: >  SQL          5000        2486     24.06%
: >
: >  ASP          2156        2480     14.90%
: >
: >  Java         2664        1862     14.55%
: >
: >  C++          2046        1480     11.33%
: >
: >  Visual Basic 2037        1095     10.07%
: >
: >  Perl         925         548      4.73%
: >
: >  Javascript   914         489      4.51%
: >
: >  Cobol        595         532      3.62%
: >
: >  SAS          805         269      3.45%
: >
: >  C#           284         179      1.49%
: >
: >  Ada          377         65       1.42%
: >
: >  RPG          248         163      1.32%
: >
: >  PowerBuilder 155         106      0.84%
: >
: >  PHP          189         30       0.70%
: >
: >  Delphi       157         55       0.68%
: >
: >  Fortran      121         49       0.55%
: >
: >  LabVIEW      108         27       0.43%
: >
: >  Tcl          73          33       0.34%
: >
: >  Python       55          32       0.28%
: >
: >  Smalltalk    41          30       0.23%
: >
: >  Rexx         33          25       0.19%
: >
: >  Pascal       28          17       0.14%
: >
: >  Lisp         12          9        0.07%
: >
: >  SML          7           6        0.04%
: >
: >  Haskell      6           6        0.04%
: >
: >  Caml         0           0        0.00%
: >


Job listings also measure the *turnover* of employees, not just the number
of jobs. 

Perhaps the perl programmers are happy, so the existing jobs don't lead to
job listings.

Perhaps the perl programmers are efficient, so existing work doesn't lead
to more jobs.



------------------------------

Date: Tue, 07 Jan 2003 20:21:57 GMT
From: Eric McDaniel <ericm-NOSPAM@vertical.com>
Subject: Re: These are discouraging stats to Perlistas & Pythonistas...
Message-Id: <Xns92FC7DE6999C1ooheehoohahah@207.225.159.6>


Hey, you think that's depressing? Try being an Intercal programmer.


Carl Banks <imbosol@vt.edu> wrote in
news:eYFS9.18484$xb.14542@nwrddc02.gnilink.net: 

> Robert Oschler wrote:
>> I can't look at dice.com anymore, too depressing.  Some appx stats:
>> 
>> Date    C++ jobs    Java jobs
>> 
>> 3/2000    42000    31000
>> 10/2003    2200    2800
>> 


------------------------------

Date: Tue, 07 Jan 2003 15:24:15 -0500
From: Peter Hansen <peter@engcorp.com>
Subject: Re: These are discouraging stats to Perlistas & Pythonistas...
Message-Id: <3E1B376F.DCEF3A7D@engcorp.com>

Eric McDaniel wrote:
> 
> > Robert Oschler wrote:
> >> I can't look at dice.com anymore, too depressing.  Some appx stats:
> >>
> >> Date    C++ jobs    Java jobs
> >>
> >> 3/2000    42000    31000
> >> 10/2003    2200    2800

> Hey, you think that's depressing? Try being an Intercal programmer.

So where do Intercal programmers COME FROM?

-Peter

;-)


------------------------------

Date: Tue, 7 Jan 2003 21:31:39 +0100
From: Harald <simon.12.ghum@spamgourmet.com>
Subject: Re: These are discouraging stats to Perlistas & Pythonistas...
Message-Id: <Xns92FCDBB3E682Esimon12ghumspamgourm@62.153.159.134>

I think, these numbers go TO FAR:
>>  ASP          2156        2480     14.90%
>>  Java         2664        1862     14.55%
>>  Python       55          32       0.28%

Yes, I know, Python is much more productive then ASP or Java.

But 48 times (2664:55) more efficient then Java or even 77 times (2480:32) 
more productive then ASP ... ASP can't be that bad.



------------------------------

Date: 07 Jan 2003 15:39:09 -0700
From: llewelly <llewelly.at@xmission.dot.com>
Subject: Re: These are discouraging stats to Perlistas & Pythonistas...
Message-Id: <86of6sshyq.fsf@Zorthluthik.foo>

Peter Hansen <peter@engcorp.com> writes:

> Robert Oschler wrote:
> > 
> > I can't look at dice.com anymore, too depressing.  Some appx stats:
> > 
> > Date    C++ jobs    Java jobs
> > 
> > 3/2000    42000    31000
> > 10/2003    2200    2800
> > 
> > That's right, almost a 20 to 1 loss of job reqs in C++, and 10 to 1 in Java.
> > Also note, Java is now in the lead over C++
> > 
> > I hate the dot-bust.
> 
> Maybe these stats say more about dice.com itself than about the 
> state of the economy.  Are the numbers reflected in other sites?
> Or is dice.com *the* place to go, so we can take it as representative?
*shrug*

Of all the software development jobs I've had, *none* appeared on
    dice.com.

And I've used perl at every software development job I've had, though
    none of them listed perl as a requirement, or even as a desirable
    skill.



------------------------------

Date: 7 Jan 2003 22:36:41 GMT
From: jacob@cd.chalmers.se (Jacob Hallen)
Subject: Re: These are discouraging stats to Perlistas & Pythonistas...
Message-Id: <avfkpp$a7n$1@nyheter.chalmers.se>

In article <S5GS9.5881$qU5.4697503@newssrv26.news.prodigy.com>,
dsavitsk  <dsavitsk@ecpsoftware.com> wrote:
>Sara wrote:
>
>> Recent DICE survey resuts:
>> 
>> 
>>>Number of Job Listings by Programming Language (January 3, 2003)
>>>
>
>>>
>>> Visual Basic 2037        1095     10.07%
>>>
>>> Python       55          32       0.28%
>
>This says nothing, of course. If the ratio of VB people to Python people 
>is 2037 to 54 or greater, then you shouldn't be too worried.  I have no 
>idea what the real numbers are, but I would not be surprised if the 
>disparity was this large.

An interesting thought is wether the 55 Python programmers will produce
more useful applications than the 2037 VB programmers.

Jacob Hallén

-- 


------------------------------

Date: Tue, 07 Jan 2003 13:36:31 -0600
From: Lance Hoffmeyer <lance@augustmail.com>
Subject: win32::ole ppt objtype 7 counting col
Message-Id: <Xns92FC8A719C9C5lanceaugustmailcom@216.166.71.236>

I am trying to find the last column with data in it so I can insert data
into the next column (the first column without data).  I am trying the
following:

my $ccount = $shape->OLEFormat->Object->Application->DataSheet->Columns()->
Count;

but get a Type mismatch error.  What is incorrect with this code or what
would be a better method to find the first empty column?

Lance


------------------------------

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.  

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 V10 Issue 4360
***************************************


home help back first fref pref prev next nref lref last post