[28147] in Perl-Users-Digest
Perl-Users Digest, Issue: 9511 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jul 22 06:05:53 2006
Date: Sat, 22 Jul 2006 03:05:05 -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, 22 Jul 2006 Volume: 10 Number: 9511
Today's topics:
"bad interpreter" error linziheng@gmail.com
Re: "bad interpreter" error <someone@example.com>
Re: Can anybody help me get a job or work <mark.clementsREMOVETHIS@wanadoo.fr>
Re: CGI-Timeout causing "internal server error"???? <ced@blv-sam-01.ca.boeing.com>
Re: Idiot Q: How to find index number of HASH match? <jgibson@mail.arc.nasa.gov>
Re: Idiot Q: How to find index number of HASH match? <eric-amick@comcast.net>
Re: Idiot Q: How to find index number of HASH match? <emschwar@pobox.com>
Re: Idiot Q: How to find index number of HASH match? <jurgenex@hotmail.com>
Re: Lingua::Han::PinYin and utf8 problem <corff@zedat.fu-berlin.de>
Re: Lingua::Han::PinYin and utf8 problem <corff@zedat.fu-berlin.de>
need perl dev in santa monica CA 100k+ f/t <bootiack@yahoo.com>
Re: need perl dev in santa monica CA 100k+ f/t usenet@DavidFilmer.com
new CPAN modules on Sat Jul 22 2006 (Randal Schwartz)
Re: numeric sort on string like a123-3 <filippo2991@virgilio.it>
Re: numeric sort on string like a123-3 <filippo2991@virgilio.it>
Re: numeric sort on string like a123-3 <noreply@gunnar.cc>
Re: perl + regex bug? <klaus03@gmail.com>
Re: subroutine usenet@DavidFilmer.com
Re: Trouble with parsing text file and grabbing values <nobull67@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 21 Jul 2006 22:52:41 -0700
From: linziheng@gmail.com
Subject: "bad interpreter" error
Message-Id: <1153547561.459519.71200@h48g2000cwc.googlegroups.com>
Hi all,
I use vim to create a perl file, change its permission to executable,
and then type "./myfile.pl" to run it, but i got the following error
: bad interpreter: No such file or directoryl
The first line of the file is pointing correctly to my perl. And when i
run "perl myfile.pl", it runs happily. I dont know what's going wrong.
Is it something wrong with my vim?
Thank you!
------------------------------
Date: Sat, 22 Jul 2006 06:16:56 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: "bad interpreter" error
Message-Id: <spjwg.147267$S61.52910@edtnps90>
linziheng@gmail.com wrote:
>
> I use vim to create a perl file, change its permission to executable,
> and then type "./myfile.pl" to run it, but i got the following error
>
> : bad interpreter: No such file or directoryl
>
> The first line of the file is pointing correctly to my perl. And when i
> run "perl myfile.pl", it runs happily. I dont know what's going wrong.
> Is it something wrong with my vim?
The first two bytes of the file have to be '#!' followed by the absolute path
to perl so that the OS can find it, for example:
#!/usr/bin/perl
John
--
use Perl;
program
fulfillment
------------------------------
Date: Sat, 22 Jul 2006 00:50:22 +0200
From: Mark Clements <mark.clementsREMOVETHIS@wanadoo.fr>
Subject: Re: Can anybody help me get a job or work
Message-Id: <44c15a27$0$850$ba4acef3@news.orange.fr>
Uri Guttman wrote:
>>>>>> "r" == robic0 <robic0> writes:
>
> r> On Thu, 20 Jul 2006 22:42:59 -0700, robic0 wrote:
> >> I'm almost on skid row now. I have a gun and I'm thinking of ending it all.
> >> My family is almost starving and I have no prospects for work.
> >>
> >> Please help!
> >> robic0
>
> r> A joke. This is all balogny, none of this is true.
>
> damn, i was looking forward to your last moments here.
>
> <not a joke>
>
> uri
>
You really think he'd have been able to find the business end of a rifle
unaided, let alone load it and operate the "on" switch? *I* was looking
forward to providing instructions.
Mark
------------------------------
Date: Sat, 22 Jul 2006 00:07:55 GMT
From: Charles DeRykus <ced@blv-sam-01.ca.boeing.com>
Subject: Re: CGI-Timeout causing "internal server error"????
Message-Id: <J2s31s.M4E@news.boeing.com>
Paul Lalli wrote:
> Carl Lafferty wrote:
>>> Put this at the top of your program:
>>> CGI::Carp qw {carpout fatalsToBrowser warningsToBrowser };
>> I tried this and I get some weird messages back from the web server.
>> this one in particular
>> newbooks.cgi: Can't locate object method "new" via package "CGI" at
>> ./newbooks.cgi line 153.
>>
>
> David goofed. It should have been:
> use CGI::Carp qw/carpout fatalsToBrowswer warningsToBrowser/;
> ^^^^
>
Often overlooked, the warningsToBrowser call must be invoked too or
the buffer won't be flushed, eg,
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
print header();
warningsToBrowser(1);
--
Charles DeRykus
------------------------------
Date: Fri, 21 Jul 2006 16:42:06 -0700
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: Idiot Q: How to find index number of HASH match?
Message-Id: <210720061642064632%jgibson@mail.arc.nasa.gov>
In article <e9r5gj$gtk$03$1@news.t-online.com>, Franzl Wisseworst
<franzl.wisseworst@mailinator.net> wrote:
> I wonder how to find the reference to the HASH position based on a matching
> 'page-name'. My page-name is always known in the $current::page
Sorry, but I don't really understand your question. Hashes don't have
'positions'. They have 'elements' or 'entries', each with a key and a
value. In Perl, the entries are in no particular order.
>
> $current::page;
>
> Here are two hash tables, with 3 links each:
Hashes don't have 'links' (see above).
>
> %location_en = ('page1.html' => 'page one',
> 'bla.html' => 'blabla',
> 'something.html' => 'Something');
>
> %location_de = ('seite1.html' => 'Seite eins',
> 'blau.html' => 'Blau',
> 'ding.html' => 'Ding');
>
> The script also knows the user is on the 'en' domain in order to search for
> a match in %location_en, so knowing this, how could it crawl through the
> %location_en hash to return the index number of that array in order to
> generate a link to the same position in %location_de, i.e. blau.html?
Hashes do not have index numbers and they don't have arrays. The order
is arbitray, random, and determined by the hash algorithm. You have (at
least) two choices for keeping your hash keys in order:
1. Use a module that implements ordered hashes, such as Tie::IxHash.
See www.cpan.org.
2. Keep the hash keys in one or more arrays, that _can_ be kept in
order. For example, here is an array of arrays where the elements of
the inner arrays are matched pairs of keys:
my @keys = (
[ 'page1.html', 'seite1.html' ],
[ 'bla.html', 'blau.html' ],
[ 'something.html', 'ding.html' ]
);
You can then iterate over this array, pick out the paired keys, and
look up the matching values in %location_en and %location_de.
>
> No doub't many ways exist, while in this case the simplest would be the
> best, and without performance limitations (eg. use of RE's). Its simply an
> html pre-processing procedure that runs once in a blue moon on a localhost
> to generate static pages that are later sent up on a server in plain html.
>
Then efficiency is probably not a consideration. Scalability might be a
factor, if you have more than two hashes.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
------------------------------
Date: Fri, 21 Jul 2006 19:48:09 -0400
From: Eric Amick <eric-amick@comcast.net>
Subject: Re: Idiot Q: How to find index number of HASH match?
Message-Id: <mcp2c210cl783t3efl9f8odtmhus73ton5@4ax.com>
On Fri, 21 Jul 2006 19:58:46 +0200, Franzl Wisseworst
<franzl.wisseworst@mailinator.net> wrote:
>I wonder how to find the reference to the HASH position based on a matching
>'page-name'. My page-name is always known in the $current::page
>
>$current::page;
>
>Here are two hash tables, with 3 links each:
>
>%location_en = ('page1.html' => 'page one',
> 'bla.html' => 'blabla',
> 'something.html' => 'Something');
>
>%location_de = ('seite1.html' => 'Seite eins',
> 'blau.html' => 'Blau',
> 'ding.html' => 'Ding');
>
>The script also knows the user is on the 'en' domain in order to search for
>a match in %location_en, so knowing this, how could it crawl through the
>%location_en hash to return the index number of that array in order to
>generate a link to the same position in %location_de, i.e. blau.html?
Hashes don't work that way. There's no guarantee the keys will remain in
the order you specified them when you added them to the hash, and
expecting any similar correspondence between two hashes is hopeless. If
you want a translation, one possibility would be to have arrays for hash
values such as this:
%location_en = ('page1.html' =>['page one', 'Seite eins'],
'bla.html' => ['blabla', 'Blau'],
'something.html' => ['Something', 'Ding']);
The English value would be accessed as, for example,
$location_en{'page1.html'}[0], and its German equivalent as
$location_en{'page1.html'}[1].
--
Eric Amick
Columbia, MD
------------------------------
Date: 21 Jul 2006 12:36:04 -0600
From: Eric Schwartz <emschwar@pobox.com>
Subject: Re: Idiot Q: How to find index number of HASH match?
Message-Id: <87k666erfv.fsf@localhost.localdomain>
Franzl Wisseworst <franzl.wisseworst@mailinator.net> writes:
> Here are two hash tables, with 3 links each:
>
> %location_en = ('page1.html' => 'page one',
> 'bla.html' => 'blabla',
> 'something.html' => 'Something');
>
> %location_de = ('seite1.html' => 'Seite eins',
> 'blau.html' => 'Blau',
> 'ding.html' => 'Ding');
>
> The script also knows the user is on the 'en' domain in order to search for
> a match in %location_en, so knowing this, how could it crawl through the
> %location_en hash to return the index number of that array in order to
> generate a link to the same position in %location_de, i.e. blau.html?
When you use a hash, the concept of "index number" is completely
meaningless. Hashes are indexed by strings, not numbers. Once you
put a key/value pair into a hash, you have no control over where it
ends up.[0] I think you want a multilevel hash, instead:
%location = ( page1 => { en => { name => "page one",
url => "page1.html" },
de => { name => "Seite eins",
url => "seite1.html" }
},
blah => { en => { name => "blabla",
url => "bla.html" },
de => { name => "Blau",
url => "blau.html" }
}
# .... and so on
);
You can get at any page by saying:
my $url = $location{page1}{en}{url};
Read perlreftut for more on how I created this, if you're not already
familiar with references.
-=Eric
[0] You can use Tie::IxHash, but that's missing the point.
------------------------------
Date: Sat, 22 Jul 2006 03:37:35 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Idiot Q: How to find index number of HASH match?
Message-Id: <34hwg.142$6G3.21@trnddc05>
Franzl Wisseworst wrote:
> I wonder how to find the reference to the HASH position based on a
> matching 'page-name'.
That 'page-name' _is_ the position in the hash. If you are looking for
something like a sequence or a next or previous then use an array instead.
That's what arrays are for.
> My page-name is always known in the
> $current::page
>
> $current::page;
>
> Here are two hash tables, with 3 links each:
>
> %location_en = ('page1.html' => 'page one',
> 'bla.html' => 'blabla',
> 'something.html' => 'Something');
>
> %location_de = ('seite1.html' => 'Seite eins',
> 'blau.html' => 'Blau',
> 'ding.html' => 'Ding');
I have been working in software localization for about 8 years.
From experience I can tell you that it is _far_ easier not to localize any
file names. You are asking for unnecessary difficulties if you do
Just put the English files into a subtree 'en' and mirror that subtree using
the German files under a folder 'de'. Makes life a lot easier.
If you want to map file names, then you need another table to do exactly
that:
%map-en-de = ('page1.html' => 'seite1.html',
'bla.html' => 'blau.thml',
.....
jue
jue
------------------------------
Date: 22 Jul 2006 09:26:19 GMT
From: <corff@zedat.fu-berlin.de>
Subject: Re: Lingua::Han::PinYin and utf8 problem
Message-Id: <4ie99rF3e7ieU2@uni-berlin.de>
Hi all,
I have a minimal script:
#!/usr/bin/perl
use strict;
use warnings;
# use utf8;
binmode STDOUT,":utf8";
use Lingua::Han::PinYin;
my $h2p = new Lingua::Han::PinYin(format => 'utf8');
my $name=chr(0x4e00); # utf CJK, first character, "yi"
print "$name, long: ",length $name,"\n"; # Diagnostics
#print $h2p->han2pinyin("�"),"\n";
#print $h2p->han2pinyin(chr(0x4e00)),"\n";
#print $h2p->han2pinyin("$name"),"\n";
Uncomment the first print statement, and it prints "yi" as last line,
as expected.
Uncommenting any of the other lines produces this error message:
Cannot decode string with wide characters at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/Encode.pm line 164.
How can I treat han2pinyin() my stuff in a scalar instead of as a literal?
Thank you for all hints
Oliver.
--
Dr. Oliver Corff e-mail: corff@zedat.fu-berlin.de
------------------------------
Date: 22 Jul 2006 09:28:08 GMT
From: <corff@zedat.fu-berlin.de>
Subject: Re: Lingua::Han::PinYin and utf8 problem
Message-Id: <4ie9d8F3e7ieU3@uni-berlin.de>
corff@zedat.fu-berlin.de wrote:
: Hi all,
: I have a minimal script:
: #print $h2p->han2pinyin("�"),"\n";# the character U+4e00 in utf8
: #print $h2p->han2pinyin(chr(0x4e00)),"\n";
: #print $h2p->han2pinyin("$name"),"\n";
Uncomment the first print statement, and it prints "yi" as last line,
as expected, provided the literal utf8 character U+4e00 doesn't get
mangled.
Thanks,
Oliver.
--
Dr. Oliver Corff e-mail: corff@zedat.fu-berlin.de
------------------------------
Date: 21 Jul 2006 17:26:07 -0700
From: "gavino" <bootiack@yahoo.com>
Subject: need perl dev in santa monica CA 100k+ f/t
Message-Id: <1153527967.621375.272910@p79g2000cwp.googlegroups.com>
We need a perl developer in santa monica CA 100k+
email
gschuette@teampcs.com
------------------------------
Date: 22 Jul 2006 01:45:43 -0700
From: usenet@DavidFilmer.com
Subject: Re: need perl dev in santa monica CA 100k+ f/t
Message-Id: <1153557942.952303.77030@s13g2000cwa.googlegroups.com>
gavino wrote:
> We need a perl developer in santa monica CA 100k+
You have this usegroup confused with http://jobs.perl.org.
I'm sure David Alder will be around shortly to further remind you...
--
David Filmer (http://DavidFilmer.com)
------------------------------
Date: Sat, 22 Jul 2006 04:42:15 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sat Jul 22 2006
Message-Id: <J2sFqF.5EJ@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.
Bundle-CPAN-1.852
http://search.cpan.org/~andk/Bundle-CPAN-1.852/
Bundle to optmize the behaviour of CPAN.pm
----
CGI-Ex-2.06
http://search.cpan.org/~rhandom/CGI-Ex-2.06/
CGI utility suite - makes powerful application writing fun and easy
----
CPAN-1.87_52
http://search.cpan.org/~andk/CPAN-1.87_52/
query, download and build perl modules from CPAN sites
----
Catalyst-Plugin-Authentication-Credential-HTTP-0.05
http://search.cpan.org/~esskar/Catalyst-Plugin-Authentication-Credential-HTTP-0.05/
HTTP Basic and Digest authentication for Catlayst.
----
Catalyst-Plugin-Authorization-ACL-0.08
http://search.cpan.org/~nuffin/Catalyst-Plugin-Authorization-ACL-0.08/
ACL support for Catalyst applications.
----
Catalyst-Plugin-Session-Store-File-0.08
http://search.cpan.org/~esskar/Catalyst-Plugin-Session-Store-File-0.08/
File storage backend for session data.
----
Catalyst-Plugin-Session-Store-File-0.09
http://search.cpan.org/~esskar/Catalyst-Plugin-Session-Store-File-0.09/
File storage backend for session data.
----
Catalyst-Plugin-XSendFile-0.01
http://search.cpan.org/~typester/Catalyst-Plugin-XSendFile-0.01/
Catalyst plugin for lighttpd's X-Sendfile.
----
Catalyst-Plugin-XSendFile-0.02
http://search.cpan.org/~typester/Catalyst-Plugin-XSendFile-0.02/
Catalyst plugin for lighttpd's X-Sendfile.
----
Catalyst-View-HTML-Template-Compiled-0.10
http://search.cpan.org/~esskar/Catalyst-View-HTML-Template-Compiled-0.10/
HTML::Template::Compiled View Class
----
Catalyst-View-HTML-Template-Compiled-0.11
http://search.cpan.org/~esskar/Catalyst-View-HTML-Template-Compiled-0.11/
HTML::Template::Compiled View Class
----
Chest-0.082
http://search.cpan.org/~sknpp/Chest-0.082/
Class to store procedures in a hash
----
Class-AlzaboWrapper-0.13
http://search.cpan.org/~drolsky/Class-AlzaboWrapper-0.13/
Higher level wrapper around Alzabo Row and Table objects
----
Devel-PPPort-3.09_01
http://search.cpan.org/~mhx/Devel-PPPort-3.09_01/
Perl/Pollution/Portability
----
Devel-Pler-0.10
http://search.cpan.org/~adamk/Devel-Pler-0.10/
----
Devel-Pler-0.11
http://search.cpan.org/~adamk/Devel-Pler-0.11/
----
Email-Abstract-2.10
http://search.cpan.org/~rjbs/Email-Abstract-2.10/
unified interface to mail representations
----
Email-Address-1.86
http://search.cpan.org/~rjbs/Email-Address-1.86/
RFC 2822 Address Parsing and Creation
----
Email-Date-1.10
http://search.cpan.org/~rjbs/Email-Date-1.10/
Find and Format Date Headers
----
Email-Filter-1.03
http://search.cpan.org/~rjbs/Email-Filter-1.03/
Library for creating easy email filters
----
Email-LocalDelivery-0.21
http://search.cpan.org/~rjbs/Email-LocalDelivery-0.21/
Deliver a piece of email - simply
----
Email-Send-2.15
http://search.cpan.org/~rjbs/Email-Send-2.15/
Simply Sending Email
----
Email-Simple-1.95
http://search.cpan.org/~rjbs/Email-Simple-1.95/
Simple parsing of RFC2822 message format and headers
----
Email-Thread-0.71
http://search.cpan.org/~rjbs/Email-Thread-0.71/
Use JWZ's mail threading algorithm with Email::Simple objects
----
Expect-1.20
http://search.cpan.org/~rgiersig/Expect-1.20/
----
Frivolity-0.6.3
http://search.cpan.org/~jmac/Frivolity-0.6.3/
A Perl implementation of the Volity game platform
----
HTML-WikiConverter-0.61
http://search.cpan.org/~diberri/HTML-WikiConverter-0.61/
Convert HTML to wiki markup
----
JavaScript-MochiKit-0.04
http://search.cpan.org/~esskar/JavaScript-MochiKit-0.04/
JavaScript::MochiKit makes Perl suck less
----
Lingua-EN-NamedEntity-1.7
http://search.cpan.org/~ambs/Lingua-EN-NamedEntity-1.7/
Basic Named Entity Extraction algorithm
----
Log-Log4perl-1.06
http://search.cpan.org/~mschilli/Log-Log4perl-1.06/
Log4j implementation for Perl
----
Mail-Audit-2.202
http://search.cpan.org/~rjbs/Mail-Audit-2.202/
Library for creating easy mail filters
----
Mail-Audit-2.203
http://search.cpan.org/~rjbs/Mail-Audit-2.203/
Library for creating easy mail filters
----
Make-Cache-1.041
http://search.cpan.org/~wsnyder/Make-Cache-1.041/
Caching of object and test run information
----
MasonX-Interp-WithCallbacks-1.16
http://search.cpan.org/~dwheeler/MasonX-Interp-WithCallbacks-1.16/
Mason callback support via Params::CallbackRequest.
----
Math-Polygon-0.004
http://search.cpan.org/~markov/Math-Polygon-0.004/
Class for maintaining polygon data
----
Math-Random-OO-0.19
http://search.cpan.org/~dagolden/Math-Random-OO-0.19/
Consistent object-oriented interface for generating random numbers
----
Object-Declare-0.10
http://search.cpan.org/~audreyt/Object-Declare-0.10/
Declarative object constructor
----
Object-Declare-0.11
http://search.cpan.org/~audreyt/Object-Declare-0.11/
Declarative object constructor
----
Object-Declare-0.12
http://search.cpan.org/~audreyt/Object-Declare-0.12/
Declarative object constructor
----
Object-Declare-0.13
http://search.cpan.org/~audreyt/Object-Declare-0.13/
Declarative object constructor
----
PAR-Dist-0.11
http://search.cpan.org/~smueller/PAR-Dist-0.11/
Create and manipulate PAR distributions
----
PAR-Dist-0.12
http://search.cpan.org/~smueller/PAR-Dist-0.12/
Create and manipulate PAR distributions
----
PAR-Dist-FromCPAN-0.03
http://search.cpan.org/~smueller/PAR-Dist-FromCPAN-0.03/
Create PAR distributions from CPAN
----
Perl-Tidy-20060719
http://search.cpan.org/~shancock/Perl-Tidy-20060719/
Parses and beautifies perl source
----
RDF-Query-1.040
http://search.cpan.org/~gwilliams/RDF-Query-1.040/
An RDF query implementation of SPARQL/RDQL in Perl for use with RDF::Redland and RDF::Core.
----
Rose-DB-0.722
http://search.cpan.org/~jsiracusa/Rose-DB-0.722/
A DBI wrapper and abstraction layer.
----
Rose-DB-Object-0.742
http://search.cpan.org/~jsiracusa/Rose-DB-Object-0.742/
Extensible, high performance RDBMS-OO mapper.
----
SVN-Mirror-0.69_1
http://search.cpan.org/~clkao/SVN-Mirror-0.69_1/
Mirror remote repository to local Subversion repository
----
Scalar-Defer-0.07
http://search.cpan.org/~audreyt/Scalar-Defer-0.07/
Calculate values on demand
----
Simulation-Sensitivity-0.11
http://search.cpan.org/~dagolden/Simulation-Sensitivity-0.11/
A general-purpose sensitivity analysis tool for user-supplied calculations and parameters
----
Sub-Install-0.922
http://search.cpan.org/~rjbs/Sub-Install-0.922/
install subroutines into packages easily
----
Task-Smoke-0.14
http://search.cpan.org/~gaal/Task-Smoke-0.14/
Install modules required for Pugs-like smoke system
----
Test-Chimps-0.03
http://search.cpan.org/~zev/Test-Chimps-0.03/
Collaborative Heterogeneous Infinite Monkey Perfectionification Service
----
Test-Chimps-0.04
http://search.cpan.org/~zev/Test-Chimps-0.04/
Collaborative Heterogeneous Infinite Monkey Perfectionification Service
----
Test-Chimps-Anna-0.03
http://search.cpan.org/~zev/Test-Chimps-Anna-0.03/
An IRQ bot that announces test failures (and unexpected passes)
----
Test-Chimps-Client-0.03
http://search.cpan.org/~zev/Test-Chimps-Client-0.03/
Send smoke test results to a server
----
Tie-Handle-ToMemory-0.14
http://search.cpan.org/~dagolden/Tie-Handle-ToMemory-0.14/
Print to or read from a scalar in memory
----
XML-Atom-0.21_03
http://search.cpan.org/~miyagawa/XML-Atom-0.21_03/
Atom feed and API implementation
----
XML-Literal-0.01
http://search.cpan.org/~audreyt/XML-Literal-0.01/
Syntax suppor for XML literals
----
threads-1.37
http://search.cpan.org/~jdhedden/threads-1.37/
Perl interpreter-based threads
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: 22 Jul 2006 01:05:58 -0700
From: "filippo" <filippo2991@virgilio.it>
Subject: Re: numeric sort on string like a123-3
Message-Id: <1153555558.626404.169120@i3g2000cwc.googlegroups.com>
Gunnar Hjalmarsson ha scritto:
> BS. Use the docs (perldoc -f sort) and make an attempt.
I did, I keep trying.
------------------------------
Date: 22 Jul 2006 01:09:44 -0700
From: "filippo" <filippo2991@virgilio.it>
Subject: Re: numeric sort on string like a123-3
Message-Id: <1153555784.849392.145270@75g2000cwc.googlegroups.com>
Tad McClellan ha scritto:
> my @sorted = map { $_->[0] }
> sort { $a->[1] cmp $b->[1] or
> $a->[2] <=> $b->[2] or
> $a->[3] <=> $b->[3]
> }
> map { [$_, /^([a-z])(\d+)-?(\d*)/ ] } @strings;
thanks Tad,
my problem is a lot of warnings like these
Use of uninitialized value in string comparison (cmp) at C:\work\cs.pl
line 5291.
Argument "" isn't numeric in numeric comparison (<=>) at C:\work\cs.pl
line 5291.
I forgot to mention that I have also strings
bungalow 1
bungalow2
a12-1
a12
etc
Thanks,
Filippo
------------------------------
Date: Sat, 22 Jul 2006 10:36:49 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: numeric sort on string like a123-3
Message-Id: <4ie6aeF3cdaaU1@individual.net>
filippo wrote:
> Gunnar Hjalmarsson ha scritto:
>> filippo wrote:
>>> thanks for the opportunity to develope my brain but I confess
>>> that I could not succeed :-)
>>
>> BS. Use the docs (perldoc -f sort) and make an attempt.
>
> I did, I keep trying.
You haven't showed us anything. Please study and follow the posting
guidelines for this group:
http://www.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
Methods to solve your type of problem are clearly stated in the section
of the docs I pointed you to, as well as in this FAQ entry:
perldoc -q "sort an array"
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 22 Jul 2006 02:26:33 -0700
From: "Klaus" <klaus03@gmail.com>
Subject: Re: perl + regex bug?
Message-Id: <1153560393.945779.291440@m73g2000cwd.googlegroups.com>
nitroamos@gmail.com wrote:
> hello -- i've been spending quite a bit of time trying to figure out
> this issue, and now that i've found a workaround, i'm wondering if the
> problem was a bug. basically, i have some code that looks like this:
>
> $orbitals[$i] =~ /\s+(\d)\s+Orbital Energy/;
> $index = $1;
> $index--; $index++;
>
> if($element =~ /_${index}_/ or $element =~ m/_$index$/){
> print "$element matches $& with index = $index\n";
I suspect that something might be wrong with $index not being numeric
(although from your regex /...(\d).../ that seems impossible, or do you
have some unexpected locale settings / character encoding / UTF-8 /
UTF-16, etc... that have numeric characters other than '0'...'9' ? )
Anyway, try printing the content of "$index" in hex before and after
the "$index--; $index++;", like so...
print "before: \$index = x'", unpack('H*', $index), "'\n";
$index--; $index++;
print "after : \$index = x'", unpack('H*', $index), "'\n";
...and tell us what you get.
------------------------------
Date: 22 Jul 2006 02:46:33 -0700
From: usenet@DavidFilmer.com
Subject: Re: subroutine
Message-Id: <1153561593.232398.317870@i42g2000cwa.googlegroups.com>
Tad McClellan wrote:
> [a reply to weberw@adelphia.net]
Gee, Tad, how is it that the OP is in Sinan's killfile but not yours?
I heard you need an Oracle server to host your killfile :^)
--
David Filmer (http://DavidFilmer.com)
------------------------------
Date: 22 Jul 2006 02:55:30 -0700
From: "Brian McCauley" <nobull67@gmail.com>
Subject: Re: Trouble with parsing text file and grabbing values needed
Message-Id: <1153562130.092204.318790@m79g2000cwm.googlegroups.com>
xhoster@gmail.com wrote:
> $record =~ /^.*\n.*\n.*\n\s*(.*?)\s+PZY:/ or die;
> my $name=$1;
I prefer to see that written.
my ($name)=$record =~ /^.*\n.*\n.*\n\s*(.*?)\s+PZY:/ or die;
------------------------------
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 9511
***************************************