[30050] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1293 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Feb 20 11:09:46 2008

Date: Wed, 20 Feb 2008 08:09:09 -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           Wed, 20 Feb 2008     Volume: 11 Number: 1293

Today's topics:
        Book: Applied Perl - sourcecode required <>
    Re: How do I add headers using WWW::Mechanize? <phillip.s.powell@gmail.com>
    Re: How do I add headers using WWW::Mechanize? <joost@zeekat.nl>
    Re: How do I add headers using WWW::Mechanize? <phillip.s.powell@gmail.com>
    Re: How do you track down the way to POST a form ? <tzz@lifelogs.com>
    Re: How to save a webpage contents to a file ( with LWP <1usa@llenroc.ude.invalid>
    Re: How to save a webpage contents to a file ( with LWP <jack_posemsky@yahoo.com>
    Re: How to save a webpage contents to a file ( with LWP <1usa@llenroc.ude.invalid>
    Re: How to save a webpage contents to a file ( with LWP <noreply@gunnar.cc>
    Re: Number of days since 1/1/2000 <smallpond@juno.com>
    Re: Number of days since 1/1/2000 <noreply@gunnar.cc>
        perl, xpath and dtd <marco.strullato@gmail.com>
    Re: PerlCtrl and arrays of arrays <m@rtij.nl.invlalid>
    Re: Regular Expression to Replace UPPER Case Text with  <tadmc@seesig.invalid>
    Re: Regular Expression to Replace UPPER Case Text with  <m@rtij.nl.invlalid>
    Re: Regular Expression to Replace UPPER Case Text with  <cartercc@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 20 Feb 2008 23:21:48 +0800
From: "mydaj [ROR]" <>
Subject: Book: Applied Perl - sourcecode required
Message-Id: <e8hor35mgdnn5879en7kefvtec0fu7in27@4ax.com>

Hi,

Title: Applied Perl
Authors: Peter Williams
Publisher: M&T books
ISBN: 0764547836

I bought the above book, I unable to download the source code, as
the site www.peterwilliams.net is no longer online. Could anyone point
me to another download link.
Thanks in advance.

LC


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

Date: Wed, 20 Feb 2008 06:17:37 -0800 (PST)
From: Phil Powell <phillip.s.powell@gmail.com>
Subject: Re: How do I add headers using WWW::Mechanize?
Message-Id: <ab44a96c-a5d6-406a-8d6c-253ed0f276f3@z70g2000hsb.googlegroups.com>

On Feb 19, 4:14=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> Phil Powell <phillip.s.pow...@gmail.com> writes:
>
> You're adding header to the request, but you're printing response
> headers. The server may or may not use those headers in the response,
> but if it's a web server it probably won't.
>
> By the way, those look like LDAP fields. What are you trying to do?

Ultimately what I am trying to do is to go to a particular website,
say

1) https://www.example.com/main/index.html

But you cannot go to that site unless you are authenticated via

2) https://www.example.com/registration/login.html
3) https://www.example.com/registration/login_2.html
4) [Siteminder] https://www.example.com/login/login.fcc

If not authenticated when you get to 1) you are automatically
redirected to 2).  You fill out a form with username and password to
get to 3) which consists of a form with hidden values of your username
and password which automatically submit to 4), which does the
authentication and then once authenticated your username is passed as
a header value all the way back to 1).

>
> --
> Joost Diepenmaat | blog:http://joost.zeekat.nl/| work:http://zeekat.nl/



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

Date: Wed, 20 Feb 2008 15:24:17 +0100
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: How do I add headers using WWW::Mechanize?
Message-Id: <878x1fg0z2.fsf@zeekat.nl>

Phil Powell <phillip.s.powell@gmail.com> writes:
> Ultimately what I am trying to do is to go to a particular website,
> say
>
> 1) https://www.example.com/main/index.html
>
> But you cannot go to that site unless you are authenticated via
>
> 2) https://www.example.com/registration/login.html
> 3) https://www.example.com/registration/login_2.html
> 4) [Siteminder] https://www.example.com/login/login.fcc
>
> If not authenticated when you get to 1) you are automatically
> redirected to 2).  You fill out a form with username and password to
> get to 3) which consists of a form with hidden values of your username
> and password which automatically submit to 4), which does the
> authentication and then once authenticated your username is passed as
> a header value all the way back to 1).

Ok, but none of the headers in your original post are standard HTTP
headers, which means:

1. they'll probably be ignored

2. they appear to have nothing to do with the problem you posted above.

For the problem above, you should probably use the WWW::Mechanize form
filling and posting methods. If the page works with a standard browser
(without plugins or javscript) There's generally no need to mess with
the headers. Of course, the siteminder fcc thing may do *something*
non-standard, but if it does, don't expect any other web server / page
to act like it.

-- 
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/


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

Date: Wed, 20 Feb 2008 06:30:50 -0800 (PST)
From: Phil Powell <phillip.s.powell@gmail.com>
Subject: Re: How do I add headers using WWW::Mechanize?
Message-Id: <bb209ab7-3f78-4391-8ed6-2169fef40715@n77g2000hse.googlegroups.com>

On Feb 20, 9:24=A0am, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> Phil Powell <phillip.s.pow...@gmail.com> writes:
> > Ultimately what I am trying to do is to go to a particular website,
> > say
>
> > 1)https://www.example.com/main/index.html
>
> > But you cannot go to that site unless you are authenticated via
>
> > 2)https://www.example.com/registration/login.html
> > 3)https://www.example.com/registration/login_2.html
> > 4) [Siteminder]https://www.example.com/login/login.fcc
>
> > If not authenticated when you get to 1) you are automatically
> > redirected to 2). =A0You fill out a form with username and password to
> > get to 3) which consists of a form with hidden values of your username
> > and password which automatically submit to 4), which does the
> > authentication and then once authenticated your username is passed as
> > a header value all the way back to 1).
>
> Ok, but none of the headers in your original post are standard HTTP
> headers, which means:
>
> 1. they'll probably be ignored
>
> 2. they appear to have nothing to do with the problem you posted above.
>
> For the problem above, you should probably use the WWW::Mechanize form
> filling and posting methods. If the page works with a standard browser
> (without plugins or javscript) There's generally no need to mess with
> the headers. Of course, the siteminder fcc thing may do *something*
> non-standard, but if it does, don't expect any other web server / page
> to act like it.

Actually I am using the WWW::Mechanize form filling and posting
methods, you have to to get username and password to the
Siteminder .fcc page for authentication.  There is Javascript all
throughout the pages as well, which I heard WWW::Mechanize cannot work
with and will subsequently ignore, which ultimately should not matter
as most of it is client-side authentication scripting anyway.  All
that the Siteminder fcc page does is authenticate and then return the
username as part of the HTTP response headers, which, again, you don't
see when you list the headers.

>
> --
> Joost Diepenmaat | blog:http://joost.zeekat.nl/| work:http://zeekat.nl/- H=
ide quoted text -
>
> - Show quoted text -



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

Date: Wed, 20 Feb 2008 09:37:59 -0600
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: How do you track down the way to POST a form ?
Message-Id: <86skzn1vvs.fsf@lifelogs.com>

On Tue, 19 Feb 2008 15:29:00 -0800 (PST) Telemach <telemach@go2.pl> wrote: 

T> I'm wondering if there is a some kind of a tool or a way to easily
T> detect the forms and all needed data to later submit using LWP. For
T> example there is this page :

T> http://www.ivosoftware.com/ivonaonline.php

T> Firefox says there is a form but hidden, I can get some data but still
T> no luck in submitting.
T> Is it necessary to know all the details ? maybe there is a module that
T> I can instruct to find a second textarea form, fill with content and
T> then press a button.

Get the Firebug and Web Developer Toolbar extensions for Firefox.  They
will let you track everything you need, both the POST content and the
visual layout of the page (including hidden elements and form fields).

T> BTW: After you click 'Read Now' a page is responding with mp3 file so
T> is it possible to get this downloaded via Perl ? or do I have to parse
T> in search for mp3 link and then wget ?

You can do it either way.  With LWP you just need to save the content
(but check the return code to make sure you're not saving an error page).

Ted


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

Date: Wed, 20 Feb 2008 13:49:21 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: How to save a webpage contents to a file ( with LWP )
Message-Id: <Xns9A4A59B887AACasu1cornelledu@127.0.0.1>

Jack <jack_posemsky@yahoo.com> wrote in news:412be207-d043-4b9d-bd96-25294294d50e@u72g2000hsf.googlegroups.com:

> Hi there, does anyone skilled in the art of LWP (or other perl module)
> and screen scraping know how to do the equivalent of a "file", "save
> as" html content ?

http://search.cpan.org/~gaas/libwww-perl-5.808/lib/LWP/Simple.pm

getstore($url, $file)

http://search.cpan.org/~gaas/libwww-perl-5.808/lib/LWP.pm#The_Response_Object

http://search.cpan.org/~gaas/libwww-perl-5.808/lib/HTTP/Response.pm

$r->content( $content )

    This is used to get/set the raw content 

$r->decoded_content( %options )

    This will return the content after any Content-Encoding and charsets
    has been decoded.

> Also, if there is a drop down + button to select content BUT in the
> HTML source no "submit" entry at all, how does one remote control a
> user selection without this post handle ?

If the page uses Javascript to dynamically post form contents, you will
have to figure out what the Javascript does and replicate it.

Sinan


-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.rehabitation.com/clpmisc.shtml>



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

Date: Wed, 20 Feb 2008 07:41:13 -0800 (PST)
From: Jack <jack_posemsky@yahoo.com>
Subject: Re: How to save a webpage contents to a file ( with LWP )
Message-Id: <14c9e85d-9e1d-43ca-ae55-423ce6256df2@q78g2000hsh.googlegroups.com>

On Feb 20, 5:49=A0am, "A. Sinan Unur" <1...@llenroc.ude.invalid> wrote:
> Jack <jack_posem...@yahoo.com> wrote innews:412be207-d043-4b9d-bd96-252942=
94d50e@u72g2000hsf.googlegroups.com:
>
> > Hi there, does anyone skilled in the art of LWP (or other perl module)
> > and screen scraping know how to do the equivalent of a "file", "save
> > as" html content ?
>
> http://search.cpan.org/~gaas/libwww-perl-5.808/lib/LWP/Simple.pm
>
> getstore($url, $file)
>
> http://search.cpan.org/~gaas/libwww-perl-5.808/lib/LWP.pm#The_Respons...
>
> http://search.cpan.org/~gaas/libwww-perl-5.808/lib/HTTP/Response.pm
>
> $r->content( $content )
>
> =A0 =A0 This is used to get/set the raw content
>
> $r->decoded_content( %options )
>
> =A0 =A0 This will return the content after any Content-Encoding and charse=
ts
> =A0 =A0 has been decoded.
>
> > Also, if there is a drop down + button to select content BUT in the
> > HTML source no "submit" entry at all, how does one remote control a
> > user selection without this post handle ?
>
> If the page uses Javascript to dynamically post form contents, you will
> have to figure out what the Javascript does and replicate it.
>
> Sinan
>
> --
> A. Sinan Unur <1...@llenroc.ude.invalid>
> (remove .invalid and reverse each component for email address)
> clpmisc guidelines: <URL:http://www.rehabitation.com/clpmisc.shtml>

Hi Sinan the site uses ASP, no JS files.. this is all there is in the
html
  <!--<SCRIPT>
   //
  </SCRIPT>-->
  <FRAMESET ROWS=3D"70,*" FRAMESPACING=3D0>
	<FRAME NAME=3D"header" SRC=3D"./header_default.asp?
NoCache=3D2%2F20%2F2008+7%3A35%3A47+AM" SCROLLING=3D"no" MARGINWIDTH=3D"2"
MARGINHEIGHT=3D"0">

   <FRAME NAME=3D"bodyx" SRC=3D
body.asp?centerin=3DGGCC
   SCROLLING=3D"auto" MARGINWIDTH=3D"2" MARGINHEIGHT=3D"2">


</FRAMESET>

</HTML>


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

Date: Wed, 20 Feb 2008 15:51:54 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: How to save a webpage contents to a file ( with LWP )
Message-Id: <Xns9A4A6E8031D82asu1cornelledu@127.0.0.1>

Jack <jack_posemsky@yahoo.com> wrote in
news:14c9e85d-9e1d-43ca-ae55-423ce6256df2@q78g2000hsh.googlegroups.com: 

> On Feb 20, 5:49 am, "A. Sinan Unur" <1...@llenroc.ude.invalid> wrote:
>> Jack <jack_posem...@yahoo.com> wrote
>> innews:412be207-d043-4b9d-bd96-252942 
> 94d50e@u72g2000hsf.googlegroups.com:
>>
>> > Hi there, does anyone skilled in the art of LWP (or other perl
>> > module) and screen scraping know how to do the equivalent of a
>> > "file", "save as" html content ?
>>
>> http://search.cpan.org/~gaas/libwww-perl-5.808/lib/LWP/Simple.pm
>>
>> getstore($url, $file)
>>
>> http://search.cpan.org/~gaas/libwww-perl-
5.808/lib/LWP.pm#The_Respons.
>> .. 
>>
>> http://search.cpan.org/~gaas/libwww-perl-5.808/lib/HTTP/Response.pm
>>
>> $r->content( $content )
>>
>>     This is used to get/set the raw content
>>
>> $r->decoded_content( %options )
>>
>>     This will return the content after any Content-Encoding and
>> charse 
> ts
>>     has been decoded.
>>
>> > Also, if there is a drop down + button to select content BUT in the
>> > HTML source no "submit" entry at all, how does one remote control a
>> > user selection without this post handle ?
>>
>> If the page uses Javascript to dynamically post form contents, you
>> will have to figure out what the Javascript does and replicate it.
>>
>> Sinan
>>
>> --
>> A. Sinan Unur <1...@llenroc.ude.invalid>

Do *not* quote sigs.

> Hi Sinan the site uses ASP, no JS files.. this is all there is in the
> html
>   <!--<SCRIPT>
>    //
>   </SCRIPT>-->
>   <FRAMESET ROWS="70,*" FRAMESPACING=0>
>      <FRAME NAME="header" SRC="./header_default.asp?
> NoCache=2%2F20%2F2008+7%3A35%3A47+AM" SCROLLING="no" MARGINWIDTH="2"
> MARGINHEIGHT="0">
> 
>    <FRAME NAME="bodyx" SRCbody.asp?centerin=GGCC

I am assuming you retyped the source rather than copied & pasting. 
Please don't retype code. 

>    SCROLLING="auto" MARGINWIDTH="2" MARGINHEIGHT="2">

Oh, but there is more. How about them frames?

Anyway, this forum is for help with the Perl aspect of things. If you 
need to learn html, there is a group for that as well.

Sinan
-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.rehabitation.com/clpmisc.shtml>



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

Date: Wed, 20 Feb 2008 17:08:12 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: How to save a webpage contents to a file ( with LWP )
Message-Id: <6231frF21r8kbU1@mid.individual.net>

Jack wrote:
> this is all there is in the html
>   <!--<SCRIPT>
>    //
>   </SCRIPT>-->
>   <FRAMESET ROWS="70,*" FRAMESPACING=0>
> 	<FRAME NAME="header" SRC="./header_default.asp?
> NoCache=2%2F20%2F2008+7%3A35%3A47+AM" SCROLLING="no" MARGINWIDTH="2"
> MARGINHEIGHT="0">
> 
>    <FRAME NAME="bodyx" SRC=
> body.asp?centerin=GGCC
>    SCROLLING="auto" MARGINWIDTH="2" MARGINHEIGHT="2">
> 
> 
> </FRAMESET>
> 
> </HTML>

Then get the bodyx frame, not the frameset.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Wed, 20 Feb 2008 06:46:32 -0800 (PST)
From: smallpond <smallpond@juno.com>
Subject: Re: Number of days since 1/1/2000
Message-Id: <a4e00809-a703-4c19-9a8e-36e6e71d41e1@d5g2000hsc.googlegroups.com>

On Feb 19, 11:55 pm, Gunnar Hjalmarsson <nore...@gunnar.cc> wrote:
> smallpond wrote:
> > On Feb 19, 10:13 pm, Gunnar Hjalmarsson <nore...@gunnar.cc> wrote:
> >> smallpond wrote:
> >>> On Feb 19, 8:28 pm, Gunnar Hjalmarsson <nore...@gunnar.cc> wrote:
> >>>> The point I'm trying to make is that my code take DST into account,
> >>>> while your code doesn't. It would be very difficult to properly deal
> >>>> with DST without using any module.
>
> >>> in most applications the number of
> >>> elapsed days over a given time interval should not change
> >>> depending on the timezone of the person running the code
>
> >> How would you avoid that when you count whole days between dates in the
> >> local time zone, and not some specific zone such as UTC? Are you
> >> claiming that "most applications" ignore the daylight savings issue?
>
> > Who says the problem was "counting whole days between dates in
> > the local time zone"?
>
> Both you and I do. You do it implicitly with your code. ;-)
>
> http://groups.google.com/group/comp.lang.perl.misc/msg/fd52bb54b4d3be81
>
> --
> Gunnar Hjalmarsson
> Email:http://www.gunnar.cc/cgi-bin/contact.pl


As I said, it is not worth arguing.   My code
counts 24-hour periods as defined by the Unix clock.  It will give
the same result regardless of TZ setting.  Counting dates using
local time zone leads to odd behavior at DST boundaries but is
certainly the correct way to count calendar days.

--S


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

Date: Wed, 20 Feb 2008 16:41:30 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Number of days since 1/1/2000
Message-Id: <622vtqF21daifU1@mid.individual.net>

smallpond wrote:
> As I said, it is not worth arguing.

I disagree.

This sub-thread started when you said: "Just set it as a constant in 
your program and you don't need any modules." I found, and still find, 
it be bad advice to try to tackle this kind of problem without using any 
modules.

> My code counts 24-hour periods as defined by the Unix clock.  It will 
> give the same result regardless of TZ setting.

Wouldn't it be a good idea to admit that your statement about no modules 
was over-hasty?

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Wed, 20 Feb 2008 02:13:28 -0800 (PST)
From: Marco <marco.strullato@gmail.com>
Subject: perl, xpath and dtd
Message-Id: <a89f47da-e4bb-4349-baf7-16f0b8bd4841@q78g2000hsh.googlegroups.com>

Hi all,
first of all I'm non a perl-expert: I just code in perl some times...

I'm coding a tool to analyze the xml created by the websphere
performance servlet but I'm having problems with dtd documents...

This is my code:

use XML::XPath;
use XML::XPath::XMLParser;
use LWP::UserAgent;
use HTTP::Request;

my $ua = LWP::UserAgent->new;
my $url ="http://address";
my $jdbc_driver = "DB2 Universal JDBC Driver Provider";

my $req = HTTP::Request->new(GET => $url);
my $response = $ua->request($req);
my $content = $response->content();

my $xpath="/PerformanceMonitor/Node/Server/Stat/Stat/CountStatistic/
\@count";

if ($response->is_success) {
        $xp = XML::XPath->new(ioref => $content );
        my $nodeset = $xp->findnodes($xpath);
        foreach my $node ($nodeset->get_nodelist){
                print XML::XPath::XMLParser::as_string($node);
        }
}


I get this output



[mstrullato@vm01 ~]$ perl ./query_was.pl
404 File `/wasPerfTool/dtd/performancemonitor.dtd' does not exist
file:///wasPerfTool/dtd/performancemonitor.dtd
Handler couldn't resolve external entity at line 8, column 160, byte
703
error in processing external entity reference at line 8, column 160,
byte 703:
<!--    not published or otherwise divested of its trade secrets,
irrespective  -->
<!--    of what has been deposited with the U.S. Copyright
Office.              -->
<!--
****************************************************************************--
><!DOCTYPE PerformanceMonitor SYSTEM "/wasPerfTool/dtd/
performancemonitor.dtd">
===============================================================================================================================================================^

<PerformanceMonitor responseStatus="success" version="6.1.0.13">
 at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/XML/
Parser.pm line 187



I can see that the problem is the dtd document that is not found: the
code is looking to the dtd into filesystem and not from the correct
location...


Could you help me?
Hou should I change my code?


Thanks


Marco


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

Date: Wed, 20 Feb 2008 09:15:51 +0100
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: PerlCtrl and arrays of arrays
Message-Id: <pan.2008.02.20.08.15.49@rtij.nl.invlalid>

On Wed, 20 Feb 2008 08:32:31 +0100, Dr.Ruud wrote:

> axtens schreef:
> 
>> How would I return an array of arrays from perl, eg
>>     my @r = [1, 2, [3,4]];
>> such that VB/VBScript would think the data to be
>>     r = array(1,2,array(3,4))
>> 
>> This is PerlCtrl specific I know, and yes I should take it to the
>> ActiveState list, but I thought I'd ask here anyway, just in case.
> 
> Maybe you are looking for
> 
>      my @r = (
>          1,
>          2,
>          [ 3, 4 ],
>      );

or my $r = [1, 2, [3, 4]];

M4


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

Date: Tue, 19 Feb 2008 18:10:40 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Regular Expression to Replace UPPER Case Text with lower case  text
Message-Id: <slrnfrms00.lga.tadmc@tadmc30.sbcglobal.net>

ccc31807 <cartercc@gmail.com> wrote:
> On Feb 18, 5:31 pm, Tad J McClellan
>> > Ditch CF and use Perl.
>>
>> What, and get laughed at?


> Using Perl for web apps is controversial to say the least, and I can
> sympathize with your little joke.


Errr, it was _your_ little joke.


   http://groups.google.com/group/comp.lang.perl.misc/msg/a4e4eb0867618bee


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Wed, 20 Feb 2008 09:10:38 +0100
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Regular Expression to Replace UPPER Case Text with lower case  text
Message-Id: <pan.2008.02.20.08.10.38@rtij.nl.invlalid>

On Tue, 19 Feb 2008 18:08:40 +0000, Jürgen Exner wrote:

>>The key point here is the tr/// transliteration operator.
> 
> How does A-Z or the tr/// expression for that matter handle non-English
> letters?
> What about upper case letters that don't have a corresponding lower case
> letter? I don't know if such a letter exists. It does for the other
> direction, e.g. the Geman sharp s (ß) which is capitalized as double
> "SS". Example: Straße ==> STRASSE
> 
> Similar examples exist in other languages
> 
> I cannot imagine that this tr/// expression will handle these correctly.

In fact, perldoc perlop warns for this and tells you to use lc.

M4


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

Date: Wed, 20 Feb 2008 05:25:04 -0800 (PST)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: Regular Expression to Replace UPPER Case Text with lower case  text
Message-Id: <08e97068-60e3-4f57-b14c-e618c9b8ece9@d21g2000prf.googlegroups.com>

On Feb 19, 7:10 pm, Tad J McClellan <ta...@seesig.invalid> wrote:

> >> What, and get laughed at?
> > Using Perl for web apps is controversial to say the least, and I can
> > sympathize with your little joke.
>
> Errr, it was _your_ little joke.

You're right, I had forgotten I said that. But like all jokes, it
contains a grain of truth. My city has three big IT concentrattions,
in banking, insurance, and the military. In the first two, the
developers are divided into the Java and .NET camps. I occasionally
attend one of the various user group meetings that these people
frequent, and on occassion participate in the discussion. I remember
at least once when discussing the conversion of a bank's records (that
were presented as CSV files) I suggested that Perl might do well at
the conversion, which was met (litteraly) by guffaws. "You're simply
joking, everybody knows that Perl can't take a file, change a few
things, and write it out to another file, you've got to use a serious
language for that kind of job, like Java or Visual Basic."

I have found by experience that journeyman programmers, at least in my
city, regard Perl as a joke, unable to do anything serious. Of course,
they don't know the language, and typically they have the philosophy
that you should know only one language and know it well, otherwise you
will merely be confused. Some project managers have told me, using
these words, that they wouldn't hire any programmer that knew more
than one language. And this is at a company that yesterday had a share
price of $62.65 on a volume of 2,329,871. Managers have asked me
several different times, "Why use Perl when you can use ColdFusion?"
as if to say, "Why use an axe when you have a chainsaw handy?" The
perception here is that ColdFusion is a capable technology while Perl
is not.

In Paul Graham's essay 'Beating the Average' he claims that his
success was due to his choice of technology. I think that he is wrong,
but believe that the choice of a technology can be one very important
factor of success (others might be a growing market, customer service,
lots of hard work, and a bit of luck.)

I recently did an analysis of the employment postings for nine
different languages. Here are some raw numbers:
Java     ~15,400 - 20,400
 .NET     ~10,000 - 15,000
C/C++    ~ 8,000 - 12,000
Perl     ~ 6,000 -  8,000

By contrast, CF was around 300 and Lisp was around zero. I know that
the numbers of open positions doesn't mean much, but it's at least a
rough gauge of visibility of different languages among employers. In
my area, the only two players are Java and .NET (except the military,
actually the largest single employer, and they advertise for Ada, C/C+
+, and (yes) Perl programmers.) Also, there's quite a bit of COBOL
still left and one of the area colleges has a COBOL certificate
program.

For the reasons I have stated elsewhere, I am making a non-trivial
effort to learning Lisp. I expect that people will laugh at me for
this, as well.

CC


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

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 1293
***************************************


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