[28463] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 9827 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 10 06:05:54 2006

Date: Tue, 10 Oct 2006 03:05:07 -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           Tue, 10 Oct 2006     Volume: 10 Number: 9827

Today's topics:
    Re: about matching in a list context sharma__r@hotmail.com
    Re: AJAX blocking selecting dropdown value with WWW::Me <thedifferenz@gmail.com>
    Re: FAQ 4.22 How do I expand function calls in a string <benmorrow@tiscali.co.uk>
    Re: Firefox Won't Execute My Perl Script robic0
    Re: Firefox Won't Execute My Perl Script <benmorrow@tiscali.co.uk>
    Re: Firefox Won't Execute My Perl Script <bol@adv.magwien.gv.at>
        Kate Plugin for Perl? <news12@8439.e4ward.com>
    Re: Kate Plugin for Perl? (reading news)
        new CPAN modules on Tue Oct 10 2006 (Randal Schwartz)
        Option Values with Spaces using GetOpt::Long himanshu.garg@gmail.com
    Re: Option Values with Spaces using GetOpt::Long <rvtol+news@isolution.nl>
    Re: Output of Concise <bol@adv.magwien.gv.at>
        perl support for 64 bit processing <jack_posemsky@yahoo.com>
    Re: perl support for 64 bit processing <benmorrow@tiscali.co.uk>
    Re: perl support for 64 bit processing <bol@adv.magwien.gv.at>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 9 Oct 2006 21:38:48 -0700
From: sharma__r@hotmail.com
Subject: Re: about matching in a list context
Message-Id: <1160455128.672177.196010@b28g2000cwb.googlegroups.com>


sharma__r@hotmail.com wrote:
> Hello,
>
> I don't understand this behavior of perl:
>
>
> perl -lne 'print for /^(\d+\.\d+E-\d+)$/;' << EOF
> ***********
> 4.62972E-13
> 4.63098E-13
> 4.62983E-13
> ***********
> EOF
>
> returns corrrectly --->
>
> 4.62972E-13
> 4.63098E-13
> 4.62983E-13
>
>
> Whereas if I do this :
>
> perl -lne 'print for /^\d+\.\d+E-\d+$/;'
>
> I get (from the exact same input as above) :
> 1
> 1
> 1


Thank you all for explaining this to me. Really appreciate all you guys
quick help.

Regards,
Rakesh



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

Date: 9 Oct 2006 21:08:42 -0700
From: "thedifferenZ" <thedifferenz@gmail.com>
Subject: Re: AJAX blocking selecting dropdown value with WWW::Mechanize
Message-Id: <1160453322.010268.256710@k70g2000cwa.googlegroups.com>

Again hi all..

http://search.cpan.org/~rjbs/HTML-Form-ForceValue-0.005/lib/HTML/Form/ForceValue.pm

Solved my problem

thanks
Vijoy~


thedifferenZ wrote:
> Hi,
>
> I am trying to click a button on a form with two drop downs.
>
> 1st Drop down State_Select, this drop down contains two letter
> abbreviation of all states, with default 'Select a State'.
>
> 2nd Drop down County_Select's value is dynamically loaded by AJAX when
> a state is selected in 1st drop down.
>
>
> All I want to do is, select 'CA' in first drop down, and Los Angeles in
> second dropdown and click.
>
> ======================
> $mech->select('State_Select','CA');
> $mech->select('County_Select','Los Angeles');
> $mech->click('search');
> ======================
>
> I am getting this error when I execute the code
> ==========
> Illegal value 'Los Angeles' for field 'County_Select' at
> ..site/lib/WWW/Mechanize.pm line 1199
> ==========
>
>
> Question:
> Is there any way to tell Mechanize not to check if the dropdown value
> is valid or not?
> 
> thanks in advance,
> Vijoy~



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

Date: Tue, 10 Oct 2006 05:01:40 +0100
From: Ben Morrow <benmorrow@tiscali.co.uk>
Subject: Re: FAQ 4.22 How do I expand function calls in a string?
Message-Id: <4iirv3-gs1.ln1@osiris.mauzo.dyndns.org>


Quoth PerlFAQ Server <brian@stonehenge.com>:
> This is an excerpt from the latest version perlfaq4.pod, which
> comes with the standard Perl distribution. These postings aim to 
> reduce the number of repeated questions as well as allow the community
> to review and update the answers. The latest version of the complete
> perlfaq is at http://faq.perl.org .
> 
> --------------------------------------------------------------------
> 
> 4.22: How do I expand function calls in a string?
> 
>     (contributed by brian d foy)
> 
>     This is documented in perlref, and although it's not the easiest thing
>     to read, it does work. In each of these examples, we call the function
>     inside the braces used to dereference a reference. If we have more than
>     one return value, we can construct and dereference an anonymous array.
>     In this case, we call the function in list context.
> 
>             print "The time values are @{ [localtime] }.\n";
> 
>     If we want to call the function in scalar context, we have to do a bit
>     more work. We can really have any code we like inside the braces, so we
>     simply have to end with the scalar reference, although how you do that
>     is up to you, and you can use code inside the braces.
> 
>             print "The time is ${\(scalar localtime)}.\n"
> 
>             print "The time is ${ my $x = localtime; \$x }.\n";

Is it worth the FAQ pointing out that

    print "Foo is: ${\( foo )}.\n";

still calls foo in *list* context? It's not entirely obvious that that
would be the case.

Ben

-- 
"Awww, I'm going to miss her."
"Don't you hate her?"
"Yes, with a fiery vengeance."
                                                  [benmorrow@tiscali.co.uk]


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

Date: Mon, 09 Oct 2006 21:10:48 -0700
From: robic0
Subject: Re: Firefox Won't Execute My Perl Script
Message-Id: <367mi2p4dl2nvgc4cenk16d7j3pv7puuev@4ax.com>

On Tue, 10 Oct 2006 03:25:04 GMT, "Jürgen Exner" <jurgenex@hotmail.com> wrote:

>steve.ziring@gmail.com wrote:
>> I have a perl script that executes successfully in MSIE,
>
>I highly doubt that unless you are talking about Perlscript, a language that 
>is _VERY_ rarely used.
>
>jue 
>
Hey Jew there must be something that is Perl used heavily in page production.
Jeez what could it be. Oh well, it must be a fuckin secret........

robic0



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

Date: Tue, 10 Oct 2006 05:04:18 +0100
From: Ben Morrow <benmorrow@tiscali.co.uk>
Subject: Re: Firefox Won't Execute My Perl Script
Message-Id: <2nirv3-gs1.ln1@osiris.mauzo.dyndns.org>


Quoth "Matt Garrish" <mgarrish@gmail.com>:
> 
> steve.ziring@gmail.com wrote:
> 
> > I have a perl script that executes successfully in MSIE, but Firefox
> > prompts me to open or save the same file.  I can not get the Perl file
> > to execute in Firefox.
> >
> > I've seen a lot of posts with the same problem except I haven't anybody
> > that can get the script to execute in one browser but not the other.
> >
> 
> Your terminology is a bit off. Browsers don't execute scripts.

ObPedant: so is yours. Browsers can and frequently do execute scripts,
though they're not usually written in Perl. Browsers, with the exception
of Lynx, don't execute *CGI* scripts.

:) HTH HAND

Ben

-- 
It will be seen that the Erwhonians are a meek and long-suffering people,
easily led by the nose, and quick to offer up common sense at the shrine of
logic, when a philosopher convinces them that their institutions are not based 
on the strictest morality. [Samuel Butler, paraphrased] benmorrow@tiscali.co.uk


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

Date: Tue, 10 Oct 2006 11:19:27 +0200
From: "Ferry Bolhar" <bol@adv.magwien.gv.at>
Subject: Re: Firefox Won't Execute My Perl Script
Message-Id: <1160471968.784919@proxy.dienste.wien.at>

Matt Garrish:

> Your terminology is a bit off. Browsers don't execute scripts.

How about Java_Script_ and VB_Script_?

SCNR :-)

Ferry

-- 
Ing Ferry Bolhar
Magistrat der Stadt Wien - MA 14
A-1010 Wien
E-Mail: bol@adv.magwien.gv.at




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

Date: Tue, 10 Oct 2006 00:43:58 -0400
From: Michael Goerz <news12@8439.e4ward.com>
Subject: Kate Plugin for Perl?
Message-Id: <4p0mnkFgn6q7U1@uni-berlin.de>

Hi,

is there a plugin available for the KDE text editor Kate that allows to
navigate perl code a little bit easier?

Thanks,
Michael Goerz


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

Date: Tue, 10 Oct 2006 06:24:44 GMT
From: "Mumia W. (reading news)" <paduille.4059.mumia.w@earthlink.net>
Subject: Re: Kate Plugin for Perl?
Message-Id: <M0HWg.12199$UG4.9836@newsread2.news.pas.earthlink.net>

On 10/09/2006 11:43 PM, Michael Goerz wrote:
> Hi,
> 
> is there a plugin available for the KDE text editor Kate that allows to
> navigate perl code a little bit easier?
> 
> Thanks,
> Michael Goerz

Ask in comp.editors or comp.windows.x.kde



-- 
Mumia W.
paduille.4059.mumia.w@earthlink.net
This is a temporary e-mail to help me catch some s-p*á/m.



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

Date: Tue, 10 Oct 2006 04:42:08 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Tue Oct 10 2006
Message-Id: <J6wL28.1rKG@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.

Acme-MetaSyntactic-0.95
http://search.cpan.org/~book/Acme-MetaSyntactic-0.95/
Themed metasyntactic variables names
----
BSD-Sysctl-0.05
http://search.cpan.org/~dland/BSD-Sysctl-0.05/
Manipulate kernel sysctl variables on BSD-like systems
----
CLASS-1.00
http://search.cpan.org/~mschwern/CLASS-1.00/
Alias for __PACKAGE__
----
CPAN-1.88_53
http://search.cpan.org/~andk/CPAN-1.88_53/
query, download and build perl modules from CPAN sites
----
Carp-Clan-5.8
http://search.cpan.org/~jjore/Carp-Clan-5.8/
Report errors from perspective of caller of a "clan" of modules
----
Devel-EnforceEncapsulation-0.01
http://search.cpan.org/~clotho/Devel-EnforceEncapsulation-0.01/
Find access violations to blessed objects
----
Encode-RAD50-0.003
http://search.cpan.org/~wyant/Encode-RAD50-0.003/
Convert to and from the Rad50 character set.
----
ExtUtils-MakeMaker-6.31
http://search.cpan.org/~mschwern/ExtUtils-MakeMaker-6.31/
Create a module Makefile
----
File-Comments-0.07
http://search.cpan.org/~mschilli/File-Comments-0.07/
Recognizes file formats and extracts format-specific comments
----
File-Copy-Reliable-0.30
http://search.cpan.org/~lbrocard/File-Copy-Reliable-0.30/
file copying and moving with extra checking
----
Geo-Point-0.03
http://search.cpan.org/~markov/Geo-Point-0.03/
a point on the globe
----
HTML-ReportWriter-1.4.1
http://search.cpan.org/~opiate/HTML-ReportWriter-1.4.1/
Simple OO interface to generate pageable, sortable HTML tabular reports
----
LibA2-0.06
http://search.cpan.org/~cjm/LibA2-0.06/
----
MIME-Charset-0.03
http://search.cpan.org/~nezumi/MIME-Charset-0.03/
Charset Informations for MIME
----
Math-Random-MT-Auto-5.04
http://search.cpan.org/~jdhedden/Math-Random-MT-Auto-5.04/
Auto-seeded Mersenne Twister PRNGs
----
Module-Build-Convert-0.39
http://search.cpan.org/~schubiger/Module-Build-Convert-0.39/
Makefile.PL to Build.PL converter
----
Moose-0.14
http://search.cpan.org/~stevan/Moose-0.14/
A complete modern object system for Perl 5
----
Net-Domain-ExpireDate-0.39
http://search.cpan.org/~despair/Net-Domain-ExpireDate-0.39/
obtain expiration date of domain names
----
Net-IPMessenger-0.05
http://search.cpan.org/~masanorih/Net-IPMessenger-0.05/
Interface to the IP Messenger Protocol
----
Object-InsideOut-2.06
http://search.cpan.org/~jdhedden/Object-InsideOut-2.06/
Comprehensive inside-out object support module
----
Plagger-0.7.13
http://search.cpan.org/~miyagawa/Plagger-0.7.13/
Pluggable RSS/Atom Aggregator
----
Sys-SigAction-0.07
http://search.cpan.org/~lbaxter/Sys-SigAction-0.07/
Perl extension for Consistent Signal Handling
----
Test-Class-0.18
http://search.cpan.org/~adie/Test-Class-0.18/
Easily create test classes in an xUnit/JUnit style
----
Test-HasVersion-0.012
http://search.cpan.org/~ferreira/Test-HasVersion-0.012/
Check Perl modules have version numbers
----
WWW-AA-0.05
http://search.cpan.org/~aruteido/WWW-AA-0.05/
The function to undergo plastic operation on the character string displayed in a browser is possessed though it is a MS P Gothic font of 12 points
----
XML-OPML-LibXML-0.01
http://search.cpan.org/~miyagawa/XML-OPML-LibXML-0.01/
Parse OPML document with LibXML parser
----
XML-OPML-LibXML-0.02
http://search.cpan.org/~miyagawa/XML-OPML-LibXML-0.02/
Parse OPML document with LibXML parser
----
XML-OPML-LibXML-0.03
http://search.cpan.org/~miyagawa/XML-OPML-LibXML-0.03/
Parse OPML document with LibXML parser
----
okbiff-0.04
http://search.cpan.org/~mschwern/okbiff-0.04/
check if you have mail on OkCupid.com


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: 9 Oct 2006 23:30:05 -0700
From: himanshu.garg@gmail.com
Subject: Option Values with Spaces using GetOpt::Long
Message-Id: <1160461805.115480.210270@e3g2000cwe.googlegroups.com>

Hi,

    I am using GetOpt::Long for parsing Command Line Options. However
for options having value a string containing spaces only the first word
is passed as the option value.

    e.g.:-

cli.pl
# The soap server
my $server = '';

# The method that is called
my $method = '';

# These are the parameters that are sent to the module
my %params;

GetOptions('server=s' => \$server,
	   'method=s' => \$method,
	   'param=s%' => \%params);

Called as:-
perl cli.pl --server=server.example.com --param username=himanshu
--param  --param dep_type='Double E' --param resource_group='FIRST
Resource Group'  --param emaild=ehgarg@example.com

      Am I missing something or I should look for other modules to
parse space separated strings.

Thank You,
Himanshu.



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

Date: Tue, 10 Oct 2006 10:51:49 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Option Values with Spaces using GetOpt::Long
Message-Id: <egfu70.jc.1@news.isolution.nl>

himanshu.garg@gmail.com schreef:

>     I am using GetOpt::Long for parsing Command Line Options. However
> for options having value a string containing spaces only the first
> word is passed as the option value.
>
>     e.g.:-
>
> cli.pl
> # The soap server
> my $server = '';
>
> # The method that is called
> my $method = '';
>
> # These are the parameters that are sent to the module
> my %params;
>
> GetOptions('server=s' => \$server,
>    'method=s' => \$method,
>    'param=s%' => \%params);
>
> Called as:-
> perl cli.pl --server=server.example.com --param username=himanshu
> --param  --param dep_type='Double E' --param resource_group='FIRST
> Resource Group'  --param emaild=ehgarg@example.com
>
>       Am I missing something or I should look for other modules to
> parse space separated strings.

Is this on Windows? If so, use dquotes. I guess like one of these:

  perl cli.pl dep_type="Double E"
  perl cli.pl -dep_type="Double E"
  perl cli.pl --param "dep_type='Double E'"

-- 
Affijn, Ruud

"Gewoon is een tijger."




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

Date: Tue, 10 Oct 2006 11:07:23 +0200
From: "Ferry Bolhar" <bol@adv.magwien.gv.at>
Subject: Re: Output of Concise
Message-Id: <1160471244.605269@proxy.dienste.wien.at>

Ben Morrow:

> Most ops have a target. This is a SV allocated in the lexical pad for
> that op, and, unless the op has the OPf_STACKED flag, it is used to
> avoid allocating a new SV for the op's return value. Instead, the TARG
> is filled in with the required value, and a pointer to it pushed onto
> the stack.
>
> The [t4] in the output of B::Concise says that this op has op_targ = 4,
> which means that the TARG of this op is the fifth entry in the current
> sub's lexical pad.

Many thanks for your help. Especially the last phrase was the one
I missed because it explains _what_ a target actually is - an entry
in a lexical (scratch) pad.

> Now *please* start making an effort to work these things out for
> yourself, instead of expecting us to hand-feed you.

My apologies - it wasn't my intention to borrow you (and others).
And to be true - I can't understand the problem in answering to
questions like mine. Whenever someone comes to me and ask me
somewhat, I'll help him/her - I will not say "Look at the docs for
this or ask someone other!". If I can help, I will help. And until now,
I thought this is the principle of c.l.p.m as well and that everyone
who read and post here is willing to help and to answer to questions
if he is able to do so. Even if a question looks stupid. It may look
stupid to _you_ but not to the _one_ who asked.

Reading almost completely uncommented source code is easy
for one person only - the one who wrotes the code. Look at the
Perl source - the only kind of documentation found therein is the
documentation for perldocs, describing some parts of perlguts,
perlapi and perlintern. That's all. There are very often 30 or more
lines of code without _any_ comment. You have to find out
yourself what the code does without knowing whether you're
right or wrong at some point inside the code. This is very hard,
because you must make assumptions and these assumptions
may be wrong, resulting in incorrect code interpretation and
therefore assuming false behaviour.

Again, sorry for my intrusion. It's up to you to refuse to answer
to my questions. But like I do help if I can, I hope that others
here are willing to do so as well. And there is no other way to
get this information - there are no books about this kind of Perl
guts. There are books about the Perl API, about SVs, AVs and
so on, but no book describe the compilation process in detail,
describe how OPs are generated, which flags are set under
which circumstances, and what will happen at runtime when
they are set or cleared. So I have to ask about these things
here - hoping that someone can help. If you know a better place
to ask about things like this, I'd appreciate if you could tell me.

BTW: would it have been so hard for the author of B::Concise
to add your explantation to the modules docs? Sometimes I
think that many questions here in this group are the result of too
short, inaccurately or missing documentation. If the author would
mentioned this topic in his docs, I wouldn't ask for it here.

Greetings, Ferry

-- 
Ing Ferry Bolhar
Magistrat der Stadt Wien - MA 14
A-1010 Wien
E-Mail: bol@adv.magwien.gv.at




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

Date: 9 Oct 2006 22:06:45 -0700
From: "Jack" <jack_posemsky@yahoo.com>
Subject: perl support for 64 bit processing
Message-Id: <1160456805.357996.38740@i3g2000cwc.googlegroups.com>

Hello I wanted to know if perl can leverage the memory situation in 64
bit systems, no longer being constrained by the 2GB addressable limit ?

If anyone know please confirm

Thanks,

Jack



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

Date: Tue, 10 Oct 2006 08:53:42 +0100
From: Ben Morrow <benmorrow@tiscali.co.uk>
Subject: Re: perl support for 64 bit processing
Message-Id: <650sv3-0mf.ln1@osiris.mauzo.dyndns.org>


Quoth "Jack" <jack_posemsky@yahoo.com>:
> Hello I wanted to know if perl can leverage the memory situation in 64
> bit systems, no longer being constrained by the 2GB addressable limit ?
> 
> If anyone know please confirm

Yes. Perl can be built with a 64-bit compiler. (This is a different
question from building perl with 64-bit ints on a 32-bit compiler, so
don't be misled by the passages in the INSTALL file which explain how to
do that.)

Ben

-- 
Like all men in Babylon I have been a proconsul; like all, a slave ... During
one lunar year, I have been declared invisible; I shrieked and was not heard,
I stole my bread and was not decapitated.
~ benmorrow@tiscali.co.uk ~            Jorge Luis Borges, 'The Babylon Lottery'


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

Date: Tue, 10 Oct 2006 11:16:50 +0200
From: "Ferry Bolhar" <bol@adv.magwien.gv.at>
Subject: Re: perl support for 64 bit processing
Message-Id: <1160471810.551624@proxy.dienste.wien.at>

Jack:

> Hello I wanted to know if perl can leverage the memory situation in 64
> bit systems, no longer being constrained by the 2GB addressable limit ?

We're running Perl 5.8.6 on several systems with 8 and 16 GB memory
without problems. And we have running Perl for years on DEC (now HP)
Alpha Systems which always used 64 bit addresses, supporting memory
sizes up to 64 GB.

I think it's up to the C compiler you're using on that systems to support
memory sizes greather than 4 GB (this is the addressable limit with 32 bit).
If the code the C compiler generates will be able to handle 64 bit
addresses,
Perl will be able to do so as well.

Greetings, Ferry

-- 
Ing Ferry Bolhar
Magistrat der Stadt Wien - MA 14
A-1010 Wien
E-Mail: bol@adv.magwien.gv.at




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

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


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