[29090] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 334 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 14 06:10:12 2007

Date: Sat, 14 Apr 2007 03:09:22 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 14 Apr 2007     Volume: 11 Number: 334

Today's topics:
    Re: How to transparently download multiple files? <foobarbazqux@hotmail.com>
    Re: Illegal seek <uri@stemsystems.com>
    Re: Illegal seek <uri@stemsystems.com>
        new CPAN modules on Sat Apr 14 2007 (Randal Schwartz)
    Re: perl DB (pgsql)I: problems searching text strings w <hjp-usenet2@hjp.at>
    Re: Setting LD_LIBRARY_PATH env variable for child proc <hjp-usenet2@hjp.at>
        shoppingkicks.com Shop nike air jordan air force 1 dunk www.shoppingkicks.com800@gmail.com
    Re: Top Turds of comp.lang.perl.misc (2007) <purlgurl@purlgurl.net>
    Re: Top Turds of comp.lang.perl.misc (2007) <edMbj@aes-intl.com>
    Re: Top Turds of comp.lang.perl.misc (2007) <jurgenex@hotmail.com>
    Re: Where did cgi-bin go? <noreply@gunnar.cc>
    Re: Where did cgi-bin go? <jurgenex@hotmail.com>
    Re: Where did cgi-bin go? Milagro
    Re: Where did cgi-bin go? <jurgenex@hotmail.com>
        Which is the best FREE forum? qoo1009@toqm.com
    Re: Why No Famous Open Source Projects From Britain/Ire <abigail@abigail.be>
    Re: Win32::API cannot load any DLL? <u8526505@gmail.com>
    Re: Win32::API cannot load any DLL? <sisyphus1@nomail.afraid.org>
        XML::Parse dies hard maxwells@gmail.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 14 Apr 2007 02:04:58 -0700
From: "foo bar baz qux" <foobarbazqux@hotmail.com>
Subject: Re: How to transparently download multiple files?
Message-Id: <1176541498.105609.268190@l77g2000hsb.googlegroups.com>

On Apr 7, 9:35 pm, Ed Jay <e...@aes-intl.com> wrote:

Normally I don't see stuff posted by trolls. This time someone failed
to ignore a troll and so the trolls writings became visible in Ed's
posting. People unfamiliar with Kiralynne Schilitubi (AKA purlgurl AKA
godzilla AKA callgirl) might like to use Google Groups to research
PG's posting history.

A small example:
"You of the Perl Community, have successfully given the
Perl Community a reputation of being populated by
mentally disturbed people who are psychotically driven
to harass all peoples, children, women, men, the elderly,
all people, about whom you know nothing. "
- Purl Gurl, Jun 27 2004

And another:
"you will not be made privy to illegal real world actions
we may have or may not have taken. However, I will comment
he suddenly fled his place of residence and never returned
as a result of some events in his life."
- Purl Gurl, Jun 29 2004

PGs grasp on reality often seems tenuous.


> Purl Gurl scribed:
>> Ed Jay wrote:
>>
>>> I have 'n' files, sequentially numbered, on my server. I wish to
>>> download the files without operator intervention to a local folder
>>> of my choice.
>>
>> Use the LWP module for this operation.
>> Stein's CGI.pm is not your best choice for this operation.

PG has an irrational loathing of CGI.pm. Don't pay too much attention
to PG's advice. I'm no great fan of CGI.pm but it does help those new
to Perl and/or to HTML to produce reasonable HTML.


>>> Issue first is that it asks me whether to open/save. I want the
>>> script to automatically either save or open without asking.
>>
>> This is a result of the content type you are using in your script.
>>
>>> Issue second is that while the below script indeed downloads all
>>> the files, it downloads them as a single file with the identity of
>>> filename0. IOW, all three files are contained within filename0.
>>
>> This is expected. You are opening and printing three files. Upon
>> flushing your print via CGI, all three files are printed as one. You
>> cannot print three separate files to a single browser instance,
>> even if a download print.
>>
>> You are also printing your content type, three times.
>>
>> A lack of "binmode" for your open and your print _might_ create
>> issues even if you only open and print a single file.
>>
>>> my $imgCnt = 3;
>>
>> You never use this variable.
>>
>> What you are trying to perform is simply impossible. You cannot
>> send three "downloads" to a browser in a single httpd transaction.
>> What you are doing is sending three files, combined as one. Even if
>> you download and save, this file will be corrupted and impossible to
>> open for viewing.
>>
>> Research and learn about the LWP module. This LWP will perform
>> precisely your task, with no intervention needed on your part.
>> You only need to invoke your script through a browser, print some
>> message to yourself, then LWP will fetch files and store files for
>> you, in the background.
>>
>> You can also invoke your LWP script from a command line; no
>> browser is needed for this task of yours. If you do not have
>> command line access, maybe your site is hosted on a server,
>> then use a browser
>> to access and invoke your cgi based script.
>>
>> http://www.perlmonks.org/?node_id=18565
>>
>> http://search.cpan.org/dist/libwww-perl/bin/lwp-download
>>
>> http://perl.active-venture.com/lib/LWP/Simple.html
>>
>> The "Image-Grab" module might prove even better for your task.
>> This module is dedicated specifically to your task,
>>
>> http://mah.everybody.org/hacks/perl/Image-Grab/
>>

Up to this point PGs advice isn't particularly bad and is above PG's
norm, though PG seems to be overselling the marvels of LWP.


>> ----
>>
>> Here is a simple example cgi script which will allow you to download
>> your images and look at your images, in one shot. You only need
>> to decide if to use LWP, LWP::Simple or Image-Grab, maybe some
>> other technique you learn about during your research.
>>
>> #!perl
>>
>> # here you invoke a module, LWP, Image-Grab, whatever
>> # coding examples are all over the web for you to use
>> # you can add a "success" print to your html output
>>
>> print "Content-type: text/html\n\n";
>> print "<HTML>";

PG makes no attempt to write standards compliant HTML or XHTML. The
quality of the resultant HTML is pretty poor.

>>
>> # change $imgPath to your server location:
>>
>> $imgPath = "http://localhost/~test/";
>> $imgCode = 'Threeimages040407';

PG makes no attempt to correct the misuse of double quotes.

>>
>> for (my $i = 0; $i < 3; $i++)

PG doesn't suggest the more readable
   for my $i (0..3)

>>  {
>>   $imgName = $imgPath.$imgCode.$i.'.jpg';
>>   print "<img src = \"$imgName\"><BR>";

Since PG has done away with the second use of $imgName it would be
better to do away with it and combine the statements.

>>  }
>>
>># if download by a module is successful you
>># could print a "success" message here
>>
>> if ($return eq "success")
>>  { print "<BR><H2> Download Successful </H2>"; }
>> else
>>  { print "<BR><H2> FUBAR! </H2>"; }

Note the useless use of double quotes.

This is one place where I would introduce an extra variable in order
to avoid repetition of HTML.

  print "<BR><H2>$result</H2>";

But I'd write proper standards conformant XHTML - there's no reason
not to.

Using header tags for emphasis is plain wrong. Use header tags for
things that are a heading for some following matter.

>>
>> print "</HTML>";

>
> Thank you very much.
> --
> Ed Jay

You're too polite. PG writes code worse than I did in the Perl4 days.



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

Date: Fri, 13 Apr 2007 21:49:13 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Illegal seek
Message-Id: <x7vefzg1ye.fsf@mail.sysarch.com>

>>>>> "E" == Eric  <ecarlson@vmware.com> writes:

  E> On Apr 13, 3:31 pm, Sherm Pendley <spamt...@dot-app.org> wrote:
  >> 
  >> So like Uri said, the value returned by `` is not a reliable means
  >> of error detection. You need to check $@ to detect errors with ``.

  E> Thank you both for your responses. I tried this, but got the same
  E> error message.

and with what code? we can't debug /dev/null scripts. as for your
changing the command as it isn't touch, that is not fair to us either. 

if you want help you first have to show some real code with a real
problem. touch isn't real and your use of backticks is very wrong as you
have shown it.

uri

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


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

Date: Fri, 13 Apr 2007 21:50:57 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Illegal seek
Message-Id: <x7r6qng1vi.fsf@mail.sysarch.com>

>>>>> "JWK" == John W Krahn <someone@example.com> writes:

  JWK> Uri Guttman wrote:
  >>>>>>> "E" == Eric  <ecarlson@vmware.com> writes:
  >> 
  E> my $run = "touch abc";
  E> `$run` || print STDERR "Command '$run' failed: $! \n";
  >> 
  >> why are you using backticks when you don't want the output? the return
  >> value of `` IS NOT an error message.
  >> 
  E> The error message I get is:
  >> 
  E> Command 'touch abc' failed: Illegal seek
  >> 
  >> you are likely getting some other error message left in $! as the
  >> backticks always worked. any error touch makes would not be return in
  >> the backticks but in $@.

  JWK> I think you mean $? instead of $@.

probably. i always confuse those and either rtfm or find other code
where i used the right one. :) in general i don't use backticks too
often anyway. i know what perl has builtin and i use backticks for
their output, not success/failure results.

uri

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


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

Date: Sat, 14 Apr 2007 04:42:13 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sat Apr 14 2007
Message-Id: <JGH12D.yGw@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

Asynapse-1.10_01
http://search.cpan.org/~gugod/Asynapse-1.10_01/
[One line description of module's purpose here]
----
Bio-DOOP-DOOP-0.16
http://search.cpan.org/~tibi/Bio-DOOP-DOOP-0.16/
DOOP API main module
----
CORBA-Python-0.36
http://search.cpan.org/~perrad/CORBA-Python-0.36/
----
Catalyst-Controller-Rose-0.02
http://search.cpan.org/~karman/Catalyst-Controller-Rose-0.02/
RDBO and RHTMLO base classes for Catalyst
----
Catalyst-Model-RDBO-0.02
http://search.cpan.org/~karman/Catalyst-Model-RDBO-0.02/
base class for Rose::DB::Object model
----
Class-C3-0.15_01
http://search.cpan.org/~blblack/Class-C3-0.15_01/
A pragma to use the C3 method resolution order algortihm
----
Continuity-0.92
http://search.cpan.org/~awwaiid/Continuity-0.92/
Abstract away statelessness of HTTP using continuations, for stateful Web applications
----
Data-Faker-JapaneseFemaleName-0.02
http://search.cpan.org/~bokutin/Data-Faker-JapaneseFemaleName-0.02/
Data::Faker plugin
----
Event-ExecFlow-0.63
http://search.cpan.org/~jred/Event-ExecFlow-0.63/
High level API for event-based execution flow control
----
File-NCopy-0.35
http://search.cpan.org/~chorny/File-NCopy-0.35/
Deprecated module. Use File::Copy::Recursive instead. Copy file, file. Copy file[s] | dir[s], dir
----
Gaim-Log-Parser-0.06
http://search.cpan.org/~mschilli/Gaim-Log-Parser-0.06/
Parse Gaim's Log Files
----
HTML-Tidy-1.08
http://search.cpan.org/~petdance/HTML-Tidy-1.08/
(X)HTML validation in a Perl object
----
Lemonldap-Config-Parameters-3.2.0
http://search.cpan.org/~egerman/Lemonldap-Config-Parameters-3.2.0/
Backend of configuration for lemonldap SSO system
----
MARC-XML-0.85
http://search.cpan.org/~kados/MARC-XML-0.85/
----
Math-0.511
http://search.cpan.org/~hooo/Math-0.511/
constants and functions
----
Math-0.514
http://search.cpan.org/~hooo/Math-0.514/
constants and functions
----
Modwheel-0.01
http://search.cpan.org/~asksh/Modwheel-0.01/
Very extensible publishing-system
----
Modwheel-Apache2-0.01
http://search.cpan.org/~asksh/Modwheel-Apache2-0.01/
Use Modwheel with mod_perl2
----
Net-Pavatar-0.691
http://search.cpan.org/~karjala/Net-Pavatar-0.691/
Pavatar client
----
Net-Pavatar-0.692
http://search.cpan.org/~karjala/Net-Pavatar-0.692/
Pavatar client
----
Net-Whois-Raw-1.21
http://search.cpan.org/~despair/Net-Whois-Raw-1.21/
Get Whois information for domains
----
Perl-Folder-0.10
http://search.cpan.org/~ingy/Perl-Folder-0.10/
Fold and Unfold Blocks in Perl Code
----
Perl6-Perldoc-v0.0.3
http://search.cpan.org/~dconway/Perl6-Perldoc-v0.0.3/
Use Perl 6 documentation in a Perl 5 program
----
Rose-HTMLx-Form-Field-Autocomplete-0.02
http://search.cpan.org/~karman/Rose-HTMLx-Form-Field-Autocomplete-0.02/
Ajax autocompletion for text fields
----
Sys-Statistics-Linux-0.09_13
http://search.cpan.org/~bloonix/Sys-Statistics-Linux-0.09_13/
Front-end module to collect system statistics
----
Sys-Statistics-Linux-0.09_14
http://search.cpan.org/~bloonix/Sys-Statistics-Linux-0.09_14/
Front-end module to collect system statistics
----
WWW-Live365-0.1
http://search.cpan.org/~hex/WWW-Live365-0.1/
get Live365.com audio stream URLs
----
WWW-Live365-0.11
http://search.cpan.org/~hex/WWW-Live365-0.11/
get Live365.com audio stream URLs
----
WWW-Mechanize-Shell-0.41
http://search.cpan.org/~corion/WWW-Mechanize-Shell-0.41/
An interactive shell for WWW::Mechanize
----
WWW-Monitor-0.21
http://search.cpan.org/~yaron/WWW-Monitor-0.21/
Monitor websites for updates and changes
----
dotReader-v0.11.1
http://search.cpan.org/~ewilhelm/dotReader-v0.11.1/
----
dvdrip-0.98.5
http://search.cpan.org/~jred/dvdrip-0.98.5/
----
mc_units-20070413
http://search.cpan.org/~hmbrand/mc_units-20070413/
----
version-0.72
http://search.cpan.org/~jpeacock/version-0.72/
Perl extension for Version Objects


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

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/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Sat, 14 Apr 2007 11:02:44 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: perl DB (pgsql)I: problems searching text strings with ' symbol (es d'ambrose)
Message-Id: <slrnf2165k.9o4.hjp-usenet2@zeno.hjp.at>

On 2007-04-08 01:36, Sherm Pendley <spamtrap@dot-app.org> wrote:
> "Filippo" <filippo2991@virgilio.it> writes:
>> if I try to SQL SELECT LIKE for a string containing single quote:
>>
>> my $name = $dbh->quote(qq/d'ambr%/);
>> SELECT name FROM mytable WHERE name LIKE $name
>
> Don't use string interpolation - use placeholders instead. Not only
> will that automatically handle escaping the value of $name as needed,
> it will also guard against "code injection" security attacks.

$dbh->quote() does that, too. But it is easy to forget to call quote
(especially if it "isn't needed") and for many databases placeholders
are also faster (especially when used with prepare/execute).

	hp


-- 
   _  | Peter J. Holzer    | I know I'd be respectful of a pirate 
|_|_) | Sysadmin WSR       | with an emu on his shoulder.
| |   | hjp@hjp.at         |
__/   | http://www.hjp.at/ |	-- Sam in "Freefall"


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

Date: Sat, 14 Apr 2007 09:27:45 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Setting LD_LIBRARY_PATH env variable for child process
Message-Id: <slrnf210jh.9k4.hjp-usenet2@zeno.hjp.at>

On 2007-04-06 19:48, Lax <lax_reddy@hotmail.com> wrote:
> In my Perl rewrite, I'm doing,
>
> $ENV{CLASSPATH}="NewClassPath" ;
> $ENV{LD_LIBRARY_PATH}="NewLibPath";
> system("$java JavaClass");
>
> The CLASSPATH part works fine, but the new setting for LIB_PATH
> doesn't seem to be working.

Should work. Are you sure that the LD_LIBRARY_PATH isn't exported and
not that it is ignored by $java? 

For example, on Linux systems LD_LIBRARY_PATH is ignored if the
effective and real uid don't match.

> I also tried,
>
> system("export LD_LIBRARY_PATH;$java -cp $ENV{CLASSPATH} JavaClass");

You aren't actually setting LD_LIBRARY_PATH here, so I wouldn't expect
that to have any effect.

	hp


-- 
   _  | Peter J. Holzer    | I know I'd be respectful of a pirate 
|_|_) | Sysadmin WSR       | with an emu on his shoulder.
| |   | hjp@hjp.at         |
__/   | http://www.hjp.at/ |	-- Sam in "Freefall"


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

Date: 13 Apr 2007 23:42:04 -0700
From: www.shoppingkicks.com800@gmail.com
Subject: shoppingkicks.com Shop nike air jordan air force 1 dunk sb bape sta shoes
Message-Id: <1176532923.981223.304730@w1g2000hsg.googlegroups.com>

<img src=http://img663.photo.163.com/11161261/72416889/2017840548.jpg
width=230 height=110 border=220 alt=shoppingkicks.com>



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

Date: Fri, 13 Apr 2007 18:17:38 -0700
From: Purl Gurl <purlgurl@purlgurl.net>
Subject: Re: Top Turds of comp.lang.perl.misc (2007)
Message-Id: <VtGdnQ3mpJQntr3bnZ2dnUVZ_vShnZ2d@giganews.com>

cartercc wrote:

> Tad McClellan wrote:

>> The decline in traffic is due to greater overall efficiency!

> Actually, it's because Perl is dying.

> People are using other languages, Java, PHP, and in my area, Python.
> We still use a good amount of Perl, in fact, I'm engaged in a fairly
> large database automation program which will probably use about 15 or
> so Perl scripts. But serious developers will use Java, or even VB
> (yes, even VB) rather than Perl, at least in my community.

There is a measured degree of truth to your notion.

Perl has become bloatware much like Stein's CGI module.
Years back, Perl was relatively fast and easy to maintain.
When the Perl 5.x version series came out, Perl began
slowing down and began becoming bloatware. Version 5.8.x
"broke" a lot of current scripts. Version 6.x I am told
breaks almost all prior scripts. I am also told the newer
6.x version is exceptionally huge and very cumbersome.

Perl 4.x series is, by far, the best. Introduction of modules
is truly what began Perl's long downhill slide. Perl 4.x did
quite fine with require and include syntax; there was never
really any need for 5.x variety modules, and modules, in their
own right, are huge and cumbersome; bloatware.

For reasons which do not make a lick of sense, Perl porters
elected to add as many whistles and bells to Perl as possible.
Almost all those whistles and bells are not needed. These types
of toys should be the job of modules, not perl core.

An excellent example and an icon of poor logic on the part of
Perl porters, is the addition of an "our" declaration within
perl core. This our declaration is completely useless and
serves only to fix the broken strict module. Perl porters
decided perl core should be designed around modules, which
is completely ass backwards. I cannot rationalize why Perl
porters are writing perl core _around_ a broken module. This
inherently renders perl core broken.

Here we are today and Perl is slower than ever, more resource
wasteful than ever and certainly classic bloatware.

This direction Perl porters have taken Perl makes not a lick
of sense. Today, demand is for high speed access and ease of
use. My high speed access reference is not just the internet
and the web. Regardless of end user need, people today are
impatient and expect all things to be quick and easy.

Perl porters have taken Perl in the opposite direction, have
turned Perl into a slow and cumbersome monster. Perl has lost
market appeal. Quite sensible sleeker and faster languages
are replacing Perl in mainstream usage.

Yes, Perl is dying and the reason for this is Perl porters
have destroyed Perl with all their childish boy toys, whistles,
bells and flashing lights. This once "Swiss Army Knife" is
now a massive Sherman tank dragging along trailer loads of
useless junk followed by ten brigades of fat slow modules.

Perl is good as dead, thanks to Perl porters.

As to this discussion group, this falling off of participation,
which is quickly reaching zero participation save for the regulars
here who troll each other, this death of this group I contribute
directly these self-proclaimed gods of Perl around here who simply
delight in abusing, insulting and humiliating anyone and everyone
who drops in here to visit. This is a very childish discussion
group and a very hateful discussion group.

Were you around for the "Alaskan Electrician" incident or the
"purl gurl net" incident? Nothing has changed. Quite the opposite,
regulars here are more abusive, more hateful and are in greater
numbers than ever before.

This is a Good Ol' Boys club. Another year or so, the only left
here will be these good ol' boys who will fall to bickering
amongst themselves having no new participants dropping in,
or rarely dropping in.

Over the years I have watched literally hundreds and hundreds
of people drop in to visit only to be insulted and humiliated.
They leave and do not return. Word spreads around, more and
more people avoid this group. Heck, there are a couple of boys
here who have been stalking and harassing me, oh gosh, I think
since 2002 year or so, a good four or five years, and those boys
stalk and harass me even when I am not here for months and months.

This is a sick group and this group is dying. Responsibility for
the death of this group rests solely upon the shoulders of those
who have been regulars here for years.

Purl Gurl



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

Date: Sat, 14 Apr 2007 00:34:28 -0700
From: Ed Jay <edMbj@aes-intl.com>
Subject: Re: Top Turds of comp.lang.perl.misc (2007)
Message-Id: <5ot023li2tmjtc6psal0odnm15oikrc146@4ax.com>

cartercc@gmail.com scribed:

>On Apr 12, 8:45 pm, Tad McClellan <t...@augustmail.com> wrote:
>> The decline in traffic is due to greater overall efficiency!
>
>Actually, it's because Perl is dying.
>
>People are using other languages, Java, PHP, and in my area, Python.
>We still use a good amount of Perl, in fact, I'm engaged in a fairly
>large database automation program which will probably use about 15 or
>so Perl scripts. But serious developers will use Java, or even VB
>(yes, even VB) rather than Perl, at least in my community.
>
>If you want to get laughed at, use Perl. It's so ... 80's.
>
As a struggling Perl newbie, I derive little encouragement to pursue my
education from your statements. Perhaps it's time for me to go down a
different programming path while I'm still embryonic. 

I'm even less encouraged when I read:

On 16 Mar, "The Count" wrote:
>Im a BSc4 Maths/Computer Science student and would like to find out
>the best way to learn programming in perl.Perl is not offered in my
>course but I find that it is a very popular language.I can program in
>Pascal,Delphi and C++...

Perl isn't offered in the BSc/CS curriculum? That speaks loudly to me. I
tried to take a course in Perl at my local junior college, but it's not
offered. 

Which brings me back on-topic. Many of the people who come to
comp.lang.perl.misc are people, like myself and 'The Count,' who are forced
to learn on our own. This newsgroup is chartered to be among our Internet
resources. I'm therefore struck with amazement when I read a group veteran's
response to a newbie's technical question and obvious Usenet-newbie request
that the answer be sent to him by email:

>How profoundly rude of you!
>The reason this newsgroup exists is to help fellow programmers.
>They will not be helped if you hoard the answer.

How profoundly rude, indeed! Having lurked here for a couple of months, the
offensive response was expected from the NG regular. As are set of similar
comments, by many of the people in the OP's list. Look at the blatant
hypocrisy in the above. Does anyone really think that this type of response
provides assistance or fosters a desire to further participate in this
forum? Or, to learn and perpetuate this programming language? 

Or, does it matter?
-- 
Ed Jay (remove 'M' to respond by email)


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

Date: Sat, 14 Apr 2007 07:49:54 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Top Turds of comp.lang.perl.misc (2007)
Message-Id: <CI%Th.74$Ln5.24@trndny06>

Ed Jay wrote:
> On 16 Mar, "The Count" wrote:
>> Im a BSc4 Maths/Computer Science student and would like to find out
>> the best way to learn programming in perl.Perl is not offered in my
>> course but I find that it is a very popular language.I can program in
>> Pascal,Delphi and C++...
>
> Perl isn't offered in the BSc/CS curriculum? That speaks loudly to
> me. I tried to take a course in Perl at my local junior college, but
> it's not offered.

You are offered courses in specific programming languages? What a concept is 
that?

Learning algorithms is part of the curriculum, learning data structures is 
part of the curriculum, learning fundamentals of programming language design 
may be part of the curriculum. But not learning a specific language.

When I was at university we had to deliver our solutions in whatever 
language the professor prescribed, but we had to learn those languages on 
your own. If it was an unusual language then the professor might condescent 
to present the language in one two-hour lecture or maybe offer a one 
afternoon addon tutorial. But after that you were on your own.

jue 




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

Date: Sat, 14 Apr 2007 03:17:28 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Where did cgi-bin go?
Message-Id: <58aohgF2fkvr4U1@mid.individual.net>

Milagro wrote:
> But there must still be some out there using Perl for dynamic sites. 
> Even looking at perl.com I don't see cgi-bin in any paths.  What simple 
> thing am I missing here -- where did cgi-bin go?

You don't always see at the URL which programming language that is used. 
For instance, I have sites with URLs like:

	http://www.example.com/internal/?members

The program behind the scenes is Perl, run as plain CGI, and the Perl 
script files are located in the cgi-bin.

I think you need to learn about the difference between URLs and physical 
locations on the server. There are various ways to make them not match.

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


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

Date: Sat, 14 Apr 2007 02:35:39 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Where did cgi-bin go?
Message-Id: <%5XTh.29$F32.21@trndny02>

Milagro wrote:
> Hi All,
>
> This might be a trivial question but I'm really wondering about this.
> While looking through the web years ago, you would always see dynamic
> sites URL's have cgi-bin in the URLs.  Nowadays you hardly ever see
> it.

Probably developers and site architects realized that adding cgi-bin to a 
URL doesn't add any value whatsoever and therefore removed it.

> I realize many developers use php, which of course doesn't not need
> cgi-bin in it's path.  There's also  ASP and sites using java servlet
> files.

Which of course has nothing to do with URLs.

> But there must still be some out there using Perl for dynamic sites.
> Even looking at perl.com I don't see cgi-bin in any paths.

So what? A URL doesn't tell you anything about how the HTTP response to that 
URL is generated. It might be a file, it might be a CGI-script in whatever 
language, it might be something totally different.

> What
> simple thing am I missing here -- where did cgi-bin go?

You are missing that a web server is performing a mapping between URLs and 
HTTP results and that it doesn't need some magic "cgi-bin" or ".pl" to 
determine the source of the HTTP result.

Of course this has nothing to do with Perl in the first place.

jue 




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

Date: Fri, 13 Apr 2007 22:46:50 -0400
From: Milagro
Subject: Re: Where did cgi-bin go?
Message-Id: <2007041322465075249-@news.giganews.com>

> 
> You are missing that a web server is performing a mapping between URLs 
> and HTTP results and that it doesn't need some magic "cgi-bin" or ".pl" 
> to determine the source of the HTTP result.

Yes, I do realize that cgi-bin was not magic. I'm just curious as to 
why we don't see it anymore in URLs. This is indeed NOT a perl question 
and I apologize. I'm also posting to an apache newsgroup.

> 
> Of course this has nothing to do with Perl in the first place.

Your correct, it doesn't really have all that much to do with perl. The 
reason I chose this newsgroup to post to is because Perl seems to be 
the most common language that is run from the cgi-bin directory.

Now that I think more about it, I realize also that the server admin 
can just rename the cgi-bin directory altogether, which I guess is 
exactly what they do.

Sorry for the simplicity of my question. Thanks for your response.

> 




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

Date: Sat, 14 Apr 2007 03:06:50 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Where did cgi-bin go?
Message-Id: <ezXTh.33$Yh.22@trndny03>

Milagro wrote:
> Now that I think more about it, I realize also that the server admin
> can just rename the cgi-bin directory altogether, which I guess is
> exactly what they do.

Another thought: increased security.
If the URL contains the substring cgi-bin then it gives hackers a hint as to 
what the underlying technology of that website might be and they can use 
more targeted approaches to attempt to crack the site.
It is standard security practise to not volunteer any unnecessary 
information to potential hackers, no matter how minute they might be.

jue 




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

Date: 13 Apr 2007 22:37:45 -0700
From: qoo1009@toqm.com
Subject: Which is the best FREE forum?
Message-Id: <1176529065.623829.255320@n76g2000hsh.googlegroups.com>

http://support.forumgogo.com     More powerful than the phpbb
This is a great site that is completely free, and can make some cool
forums, here's an example of one, you can make your own topic, polls,
and replies etc, and you can have an accout for every member. This
next link is an example of a forum made from invisionfree.
http://support.forumgogo.com



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

Date: 14 Apr 2007 08:36:21 GMT
From: Abigail <abigail@abigail.be>
Subject: Re: Why No Famous Open Source Projects From Britain/Ireland?
Message-Id: <slrnf214jo.gh.abigail@alexandra.abigail.be>

Justin C (justin.0704@purestblue.com) wrote on MMMMCMLXXIII September
MCMXCIII in <URL:news:justin.0704-37606C.23590913042007@stigmata>:
__  In article <slrnf1vkgl.84s.hjp-usenet2@zeno.hjp.at>,
__   "Peter J. Holzer" <hjp-usenet2@hjp.at> wrote:
__  
__ > On 2007-04-10 11:15, Abigail <abigail@abigail.be> wrote:
__ > > Robert (callingrw@yahoo.com) wrote on MMMMCMLXIX September MCMXCIII in
__ > ><URL:news:1176152621.806250.287130@n76g2000hsh.googlegroups.com>:
__ > > --  Hey.
__ > > --  How come there are no famous and widely-used open source products that
__ > > --  were founded and (more or less) developed from the United Kingdom or
__ > > --  Ireland? I find that odd.
__ > >
__ > >
__ > > Well, there's that web thingy you hear a lot about lately that was 
__ > > started by a fellow from Oxford.
__ > 
__ > But at the time he was in Geneva, so that adds Switzerland to the map.
__  
__  I missed the origin of this thread, but I claim Alan Cox for the UK.
__  
__  Though I can't think of (or don't know of) any projects originating here 
__  (Jeez, how much of a geek do you think I am?), I know that AC makes up 
__  for almost anything the rest of the world can lay claim too.


Didn't Alan Cox create one of the first MUDs? Abermud?



Abigail
-- 
END   {print "Hacker\n"}
BEGIN {print "Just "   }
INIT  {print "Perl "   }
CHECK {print "another "}


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

Date: 13 Apr 2007 18:12:08 -0700
From: "cyl" <u8526505@gmail.com>
Subject: Re: Win32::API cannot load any DLL?
Message-Id: <1176513128.071486.301220@y5g2000hsa.googlegroups.com>

On 4=A4=EB11=A4=E9, =A4U=A4=C82=AE=C920=A4=C0, "Sisyphus" <sisyph...@nomail=
 .afraid.org> wrote:
>
> For me, running 'perl msdll.dll' prints out 144 (as expected).
>

It does not work me. I can compile the dll correctly but Win32::API
just failed to load it. I've decided to try SWIG as my solution. Many
thanks for the help. IMO, there should be room for the implementation
of this dll loading stuff because I can use other script language such
as Ruby to load my dll without any problem. Just wondering if there's
any difficulty for Perl to support such capability (loading cdecl
declared function)?



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

Date: Sat, 14 Apr 2007 16:02:09 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: Win32::API cannot load any DLL?
Message-Id: <46206e4b$0$27221$afc38c87@news.optusnet.com.au>


"cyl" <u8526505@gmail.com> wrote in message 
news:1176513128.071486.301220@y5g2000hsa.googlegroups.com...
On 4¤ë11¤é, ¤U¤È2®É20¤À, "Sisyphus" <sisyph...@nomail.afraid.org> wrote:
>>
>> For me, running 'perl msdll.dll' prints out 144 (as expected).
>>

> It does not work me. I can compile the dll correctly but Win32::API
> just failed to load it. I've decided to try SWIG as my solution. Many
> thanks for the help. IMO, there should be room for the implementation
> of this dll loading stuff because I can use other script language such
> as Ruby to load my dll without any problem. Just wondering if there's
> any difficulty for Perl to support such capability (loading cdecl
> declared function)?

I hope you tried to run the script as 'perl msdll.pl' not 'perl msdll.dll' 
(as I wrote :-)

I don't know why you're having trouble with the formulation I provided - it 
should work fine.
Is the dll in the the path ? (I think it needs to be  - unless you provide 
the fully qualified name.)

Did you build the dll using VC 6 ? (Safest to use the compiler that was used 
to build perl - which is VC 6 , if you're using ActiveState perl.) I find 
that I get failures, too, if I try to mix compilers (VC 6 and VC 7 in my 
case).

Do you get any warnings or error messages with any of the failures ?

Perl has absolutely no difficulty with loading dll's (irrespective of the 
calling convention used) - it's only the CPAN version of Win32::API that has 
trouble with cdecl.

As an alternative to accessing the demo dll (that I provided with my last 
post) using Win32::API, it's quite trivial to  access that dll function 
using Inline::C:

--inline.pl--
use warnings;
use Inline C => Config =>
      BUILD_NOISY => 1,
      LIBS => '-LC:/path/to/import_lib -lmsdll'; # link to the import lib 
(msdll.lib)

use Inline C => <<'EOC';

int wrap_dll(int x) {
     return dll_int_square(c);
}

EOC

my $num = 12;
print wrap_dll($num);

-- end Inline.pl --

That will work just as well, even if the dll was not built using stdcall. 
(Again, you may strike trouble if you mix compilers.)

Or you can achieve the same using XS directly.

Or you can use swig :-)

Cheers,
Rob 



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

Date: 14 Apr 2007 02:04:25 -0700
From: maxwells@gmail.com
Subject: XML::Parse dies hard
Message-Id: <1176541465.825353.224500@w1g2000hsg.googlegroups.com>

Can anybody tell me why the following does not work as I expect it? It
is supposed to call the die function, because of the incorrect XML it
is parsing:

#!/usr/bin/perl
use XML::Parser;
$p1 = new XML::Parser;
if($p1->parse('<foo id="me">Hello World/foo>')){print 'xml is ok';}
else {die 'Error found - please check your xml';}

Instead it gives:

no element found at line 1, column 29, byte 29 at /usr/lib/perl5/
vendor_perl/5.8.8/i386-linux/XML/Parser.pm line 187

If I correct the xml by inserting a "<" after Hello World it prints
out 'xml is ok'.

Any help would be appreciated!

max



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

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


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