[29070] in Perl-Users-Digest
Perl-Users Digest, Issue: 314 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 7 06:09:51 2007
Date: Sat, 7 Apr 2007 03:09:03 -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, 7 Apr 2007 Volume: 11 Number: 314
Today's topics:
Re: Cant run index.pl <hackeras@gmail.com>
Re: Creating Word Documents with Perl <no@email.com>
Re: Creating Word Documents with Perl <perl4hire@softouch.on.ca>
Re: Creating Word Documents with Perl <paduille.4061.mumia.w+nospam@earthlink.net>
Re: HTML::template Module in perl <glex_no-spam@qwest-spam-no.invalid>
Re: HTML::template Module in perl <nitindutt2005@gmail.com>
more robust way to handle missing modules? <ppc@cheapbooks.com>
new CPAN modules on Sat Apr 7 2007 (Randal Schwartz)
Re: read path from a file <glex_no-spam@qwest-spam-no.invalid>
Re: removing intermediate elements from an array, keepi <mritty@gmail.com>
Setting LD_LIBRARY_PATH env variable for child process <lax_reddy@hotmail.com>
Re: Setting LD_LIBRARY_PATH env variable for child proc <No_4@dsl.pipex.com>
Re: Traversing a hash with array refs as keys? <darkon.tdo@gmail.com>
Re: Traversing a hash with array refs as keys? <paduille.4061.mumia.w+nospam@earthlink.net>
Re: Traversing a hash with array refs as keys? <rvtol+news@isolution.nl>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 7 Apr 2007 02:13:42 -0700
From: "=?windows-1253?B?zd/q7/I=?=" <hackeras@gmail.com>
Subject: Re: Cant run index.pl
Message-Id: <1175937222.815936.95270@e65g2000hsc.googlegroups.com>
=CF/=C7 Keith Keller =DD=E3=F1=E1=F8=E5:
> Since you give almost no helpful information at all, it'll be hard for
> anybody to tell you, but my gut tells me it is a web server
> configuration problem, and is therefore likely not on-topic for this
> newsgroup. Post a decent problem description to an appropriate forum
> for your particular web server.
You wree ritgh it was a bug in MySQL v5.2 Alpha Falcon and not an
error in my script or Apache. Not even in mysql tables, but a problem
in mysql itself.
------------------------------
Date: Fri, 06 Apr 2007 22:00:53 +0100
From: Brian Wakem <no@email.com>
Subject: Re: Creating Word Documents with Perl
Message-Id: <57nqo5F2ej923U1@mid.individual.net>
amerar@iwc.net wrote:
> On Apr 6, 10:32 am, Michele Dondi <bik.m...@tiscalinet.it> wrote:
>> On 6 Apr 2007 07:49:51 -0700, "ame...@iwc.net" <ame...@iwc.net> wrote:
>>
>> >I need to create a Microsoft Word document on Perl. This will be on
>> >a Linux Box.
>>
>> >The actual process is, I need the script to query a MySQL database and
>> >get the data for the Word document, create the document, and email it.
>>
>> >The first and last steps are easy. I am lost on how to create the
>> >Word document. And, as I mentioned, this is on a Linux box, not a
>> >Windows box.....
>>
>> I believe that there are ways to do this, with Windows-specific
>> modules. Unfortunately this path won't work from Linux, unless by
>> means of some arcane trickery, but I doubt that. However is there any
>> compelling reason why the documents *must* be in M$ Word? Are they
>> meant to be edited? If not, you may consider e.g. nicely typeset
>> pdf's...
>>
>> Michele
>> --
>> {$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
>> (($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
>> .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
>> 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
>
> Basically what need is to prepare a nicely formatted document that
> will be emailed. So, I'll need to create a document that will be an
> email attachment, and, it needs to have different size fonts and
> such. I can do this with an HTML document........
If you rename somefile.html to somefile.doc, it will open in Word
automatically[1] and user wont even know it is HTML.
[1] assuming Word is installed and is the default for opening files with
the .doc extension.
--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png
------------------------------
Date: Fri, 06 Apr 2007 21:18:36 -0400
From: Amer Neely <perl4hire@softouch.on.ca>
Subject: Re: Creating Word Documents with Perl
Message-Id: <OhCRh.2541$uv.1915@read1.cgocable.net>
amerar@iwc.net wrote:
> On Apr 6, 10:32 am, Michele Dondi <bik.m...@tiscalinet.it> wrote:
>> On 6 Apr 2007 07:49:51 -0700, "ame...@iwc.net" <ame...@iwc.net> wrote:
>>
>>> I need to create a Microsoft Word document on Perl. This will be on
>>> a Linux Box.
>>> The actual process is, I need the script to query a MySQL database and
>>> get the data for the Word document, create the document, and email it.
>>> The first and last steps are easy. I am lost on how to create the
>>> Word document. And, as I mentioned, this is on a Linux box, not a
>>> Windows box.....
>> I believe that there are ways to do this, with Windows-specific
>> modules. Unfortunately this path won't work from Linux, unless by
>> means of some arcane trickery, but I doubt that. However is there any
>> compelling reason why the documents *must* be in M$ Word? Are they
>> meant to be edited? If not, you may consider e.g. nicely typeset
>> pdf's...
>>
>> Michele
>> --
>> {$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
>> (($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
>> .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
>> 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
>
> Basically what need is to prepare a nicely formatted document that
> will be emailed. So, I'll need to create a document that will be an
> email attachment, and, it needs to have different size fonts and
> such. I can do this with an HTML document........
Have you looked at the 'format' command in perl? I've done some pretty
nifty emails using it, and you don't need to attach anything - it's all
inline.
--
Amer Neely
w: www.softouch.on.ca/
Perl | MySQL programming for all data entry forms.
"We make web sites work!"
------------------------------
Date: Sat, 07 Apr 2007 01:29:04 GMT
From: "Mumia W." <paduille.4061.mumia.w+nospam@earthlink.net>
Subject: Re: Creating Word Documents with Perl
Message-Id: <AtCRh.20235$tD2.11066@newsread1.news.pas.earthlink.net>
On 04/06/2007 11:21 AM, amerar@iwc.net wrote:
>
> Basically what need is to prepare a nicely formatted document that
> will be emailed. So, I'll need to create a document that will be an
> email attachment, and, it needs to have different size fonts and
> such. I can do this with an HTML document........
>
> Perhaps that is the way to do it? Maybe create an HTML document, and
> have them open it in IE or Firefox and print it???
>
>
I believe that modern versions of MS Word are supposed to import HTML
documents easily, so that seems like the best option for you.
------------------------------
Date: Fri, 06 Apr 2007 13:35:37 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: HTML::template Module in perl
Message-Id: <461692f9$0$500$815e3792@news.qwest.net>
Xicheng Jia wrote:
> On Apr 6, 4:26 am, "andy" <nitindutt2...@gmail.com> wrote:
>> I have a html file named test.tmpl and containing the below lines.
>> =====================================================================
[...]
>> <tr height="20" style="font-size: 95%;"><td align="left"
>> valign="middle"><a href="TMPL_VAR NAME=SOME_DATA">NITIN</a></td></tr>
>
> change to:
>
> <a href="<TMPL_VAR NAME=SOME_DATA>">NITIN</a>
>> my $template = HTML::Template->new(filename
=>"//usr//local//apache2/templates//test.tmpl");
And, why the double '/' in the path?
------------------------------
Date: 6 Apr 2007 19:31:29 -0700
From: "andy" <nitindutt2005@gmail.com>
Subject: Re: HTML::template Module in perl
Message-Id: <1175913089.327138.292220@y66g2000hsf.googlegroups.com>
Thanks a lot.
On Apr 6, 11:35 pm, "J. Gleixner" <glex_no-s...@qwest-spam-no.invalid>
wrote:
> Xicheng Jia wrote:
> > On Apr 6, 4:26 am, "andy" <nitindutt2...@gmail.com> wrote:
> >> I have a html file named test.tmpl and containing the below lines.
> >> =====================================================================
> [...]
> >> <tr height="20" style="font-size: 95%;"><td align="left"
> >> valign="middle"><a href="TMPL_VAR NAME=SOME_DATA">NITIN</a></td></tr>
>
> > change to:
>
> > <a href="<TMPL_VAR NAME=SOME_DATA>">NITIN</a>
>
> >> my $template = HTML::Template->new(filename
> =>"//usr//local//apache2/templates//test.tmpl");
>
> And, why the double '/' in the path?
------------------------------
Date: 7 Apr 2007 00:44:10 -0700
From: "dt" <ppc@cheapbooks.com>
Subject: more robust way to handle missing modules?
Message-Id: <1175931850.008364.178350@n76g2000hsh.googlegroups.com>
I am having trouble with some modules that are not on all of my
servers.
I use about 15 different web hosting companies to host my site. I am
having trouble with one particular module, since it either is not
located on each web host account or I can't upload it.
usually I just upload my own version and everything runs fine, but in
some cases I get an error message that says that the module conflicts
with another version of the same module. my only solution has been to
not use that web host for that piece of code, which I have to manually
disable.
is there any way to use an eval {} or something similar to try to
require a module without having the server fail with a server 500
error?
------------------------------
Date: Sat, 7 Apr 2007 04:42:09 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sat Apr 7 2007
Message-Id: <JG42E9.15vq@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.
AFS-Monitor-0.3.1
http://search.cpan.org/~ntsutsumi/AFS-Monitor-0.3.1/
Perl interface to AFS monitoring and debugging tools
----
Acme-MorningMusume-0.09
http://search.cpan.org/~kentaro/Acme-MorningMusume-0.09/
All about Japanese pop star "Morning Musume"
----
Acme-RFC4824-0.01
http://search.cpan.org/~alech/Acme-RFC4824-0.01/
Internet Protocol over Semaphore Flag Signaling System (SFSS)
----
Astro-WCS-LibWCS-0.91
http://search.cpan.org/~pratzlaff/Astro-WCS-LibWCS-0.91/
Perl interface to WCSTools libwcs
----
Attribute-Util-1.02
http://search.cpan.org/~dankogai/Attribute-Util-1.02/
A selection of general-utility attributes
----
Audio-MPD-0.17.0
http://search.cpan.org/~jquelin/Audio-MPD-0.17.0/
class to talk to MPD (Music Player Daemon) servers
----
Business-MaxMind-HTTPBase-1.43
http://search.cpan.org/~tjmather/Business-MaxMind-HTTPBase-1.43/
Base class for accessing HTTP web services
----
CGI-Application-Plugin-Feedback-1.01
http://search.cpan.org/~leocharre/CGI-Application-Plugin-Feedback-1.01/
simple end user feedback method
----
Egg-Plugin-Blosxom-0.01
http://search.cpan.org/~lushe/Egg-Plugin-Blosxom-0.01/
Plugin to use ModBlosxom for Egg.
----
Encode-2.19
http://search.cpan.org/~dankogai/Encode-2.19/
character encodings
----
File-ExtAttr-1.02
http://search.cpan.org/~richdawe/File-ExtAttr-1.02/
Perl extension for accessing extended attributes of files
----
File-PathInfo-1.13
http://search.cpan.org/~leocharre/File-PathInfo-1.13/
access to path variables, stat data, misc info about a file
----
File-PathInfo-Ext-1.06
http://search.cpan.org/~leocharre/File-PathInfo-Ext-1.06/
metadata files, renaming, some other things on top of PathInfo
----
GPS-Point-0.03
http://search.cpan.org/~mrdvt/GPS-Point-0.03/
Provides an object interface for a GPS point.
----
Getopt-Param-v0.0.2
http://search.cpan.org/~dmuey/Getopt-Param-v0.0.2/
param() style opt handling
----
Gungho-0.01_01
http://search.cpan.org/~dmaki/Gungho-0.01_01/
Yet Another High Performance Web Crawler Framework
----
Gungho-0.01_02
http://search.cpan.org/~dmaki/Gungho-0.01_02/
Yet Another High Performance Web Crawler Framework
----
Gungho-0.01_03
http://search.cpan.org/~dmaki/Gungho-0.01_03/
Yet Another High Performance Web Crawler Framework
----
Gungho-0.01_04
http://search.cpan.org/~dmaki/Gungho-0.01_04/
Yet Another High Performance Web Crawler Framework
----
HTML-TagParser-0.16
http://search.cpan.org/~kawasaki/HTML-TagParser-0.16/
Yet another HTML document parser with DOM-like methods
----
Mac-PropertyList-SAX-0.50
http://search.cpan.org/~kulp/Mac-PropertyList-SAX-0.50/
work with Mac plists at a low level, fast
----
Mail-SpamAssassin-Plugin-OpenPGP-1.0.1
http://search.cpan.org/~brondsem/Mail-SpamAssassin-Plugin-OpenPGP-1.0.1/
A SpamAssassin plugin that validates OpenPGP signed email.
----
Moose-0.20
http://search.cpan.org/~stevan/Moose-0.20/
A complete modern object system for Perl 5
----
MooseX-Getopt-0.02
http://search.cpan.org/~stevan/MooseX-Getopt-0.02/
A Moose role for processing command line options
----
Net-Server-Mail-0.14
http://search.cpan.org/~guimard/Net-Server-Mail-0.14/
Class to easily create a mail server
----
Net-YAR-1.067
http://search.cpan.org/~rhandom/Net-YAR-1.067/
Perl interface to the YAR (Yet Another Registrar) API
----
Object-Prototype-0.02
http://search.cpan.org/~dankogai/Object-Prototype-0.02/
Prototypal Object Model a la JavaScript
----
POE-Filter-JSON-0.02
http://search.cpan.org/~xantus/POE-Filter-JSON-0.02/
A POE filter using JSON
----
Pod-Tree-1.13
http://search.cpan.org/~swmcd/Pod-Tree-1.13/
Create a static syntax tree for a POD
----
SystemC-Vregs-1.440
http://search.cpan.org/~wsnyder/SystemC-Vregs-1.440/
Utility routines used by vregs
----
Task-Email-PEP-All-7095.221
http://search.cpan.org/~rjbs/Task-Email-PEP-All-7095.221/
every Perl Email Project distribution, for testing
----
Task-Email-PEP-NoStore-7095.221
http://search.cpan.org/~rjbs/Task-Email-PEP-NoStore-7095.221/
every Perl Email Project distribution... except Email::Store
----
Text-CSV-Separator-0.14
http://search.cpan.org/~enell/Text-CSV-Separator-0.14/
Determine the field separator of a CSV file
----
Text-CSV-Separator-0.15
http://search.cpan.org/~enell/Text-CSV-Separator-0.15/
Determine the field separator of a CSV file
----
WWW-Translate-interNOSTRUM-0.10
http://search.cpan.org/~enell/WWW-Translate-interNOSTRUM-0.10/
Catalan < > Spanish machine translation
----
WebService-NFSN-0.01
http://search.cpan.org/~cjm/WebService-NFSN-0.01/
Client for the NearlyFreeSpeech.NET API
----
Win32-Process-List-0.07
http://search.cpan.org/~rpagitsch/Win32-Process-List-0.07/
Perl extension to get all processes and thier PID on a Win32 system
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: Fri, 06 Apr 2007 13:47:48 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: read path from a file
Message-Id: <461695d4$0$500$815e3792@news.qwest.net>
keepyourstupidspam@yahoo.co.uk wrote:
> I solved it by using chop to remove the last character from the string
> I read from the file:
perldoc -f chomp
>
> my $pathFile="paths.dat";
>
> open FILE, "<$pathFile" or die "ERROR $!";
> my @lines = <FILE>;
>
>
> foreach my $line (@lines) {
If all you're doing is looking for that line, then there's no need to
read the entire file into @lines;
for my $line ( <FILE> ) {
>
> if ($line =~ /PATH=/) {
> $path = substr($line,5);
> chop($path);
> $ENV{'PATH'} = "$path";
> print "$path\n";
> print "$ENV{'PATH'}"
> }
A bit shorter...
if( $line =~ /^PATH=(.*)/ {
$ENV{'PATH'} = $1;
print $ENV{'PATH'};
last;
}
>
> }
> close FILE;
------------------------------
Date: 6 Apr 2007 12:18:12 -0700
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: removing intermediate elements from an array, keeping first & last only
Message-Id: <1175887092.039724.136810@y66g2000hsf.googlegroups.com>
On Apr 6, 1:22 pm, "John W. Krahn" <some...@example.com> wrote:
> Paul Lalli wrote:
>
> > If you want to actually *remove* the inner array elements:
> > @array = @array[0,-1] unless @array < 3;
> > or
> > splice(@array, 1, @array - 2) unless @array < 3;
>
> > If you want to "blank" the inner array elemenets, so that the array's
> > size doesn't change, but all elements except the first and last become
> > the empty string:
> > @array[1..$#array-1] = ('' x @array - 2) unless @array < 3;
>
> $ perl -le'
> use Data::Dumper;
> @array = "a" .. "z";
> @new = ("" x @array - 2);
> print Dumper \@new;
> '
> $VAR1 = [
> -2
> ];
>
Damn. Should have qualified that with an "untested". My bad.
@array[1..$#array-1] = ('') x (@array - 2) unless @array < 3;
Thanks for the correction, John.
Paul Lalli
------------------------------
Date: 6 Apr 2007 12:48:58 -0700
From: "Lax" <lax_reddy@hotmail.com>
Subject: Setting LD_LIBRARY_PATH env variable for child process
Message-Id: <1175888938.526192.106780@y80g2000hsf.googlegroups.com>
Hi all,
I'm trying to rewrite a Bourne shell script in Perl.
The shell script, among other things, sets the LD_LIBRARY_PATH and
CLASSPATH variables, exports them and kicks off a Java process.
LD_LIBRARY_PATH=NewLibPath; export LD_LIBRARY_PATH
CLASSPATH=NewClassPath; export CLASSPATH
$java JavaClass
This works fine and the new values for LIBPATH and CLASSPATH are
passed on fine to the Java process.
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.
I also tried,
system("export LD_LIBRARY_PATH;$java -cp $ENV{CLASSPATH} JavaClass");
This too doesn't seem to have any effect.
A Google search on this issue shows this exchange on c.l.p.m,
http://tinyurl.com/333h64
I'm leaning towards setting LD_LIB_PATH from a shell wrapper around
the perl script, but I wonder
if there are more elegant ways of doing this? Does anyone have any
pointers for me?
Platform: The script would run on Linux , Solaris and AIX.
Thanks for your time,
Lax
------------------------------
Date: Fri, 06 Apr 2007 23:08:59 +0100
From: Big and Blue <No_4@dsl.pipex.com>
Subject: Re: Setting LD_LIBRARY_PATH env variable for child process
Message-Id: <2I2dndv077hhWYvbnZ2dnUVZ8sWhnZ2d@pipex.net>
Lax wrote:
>
> I'm trying to rewrite a Bourne shell script in Perl.
> The shell script, among other things, sets the LD_LIBRARY_PATH and
> CLASSPATH variables, exports them and kicks off a Java process.
Not sure why you would want to set LD_LIBRARY_PATH for Java and the
CLASSPATH can be set using the -cp command line option.
> This works fine and the new values for LIBPATH
LIBPATH? See below - are you setting the right var on the right system.
> Platform: The script would run on Linux , Solaris and AIX.
IIRC AIX uses something other than LD_LIBRARY_PATH (LIBPATH?) - (it
isn't known as Aix Isn't uniX for nothing).
> http://tinyurl.com/333h64
This is something different - it refers to the fact that dynamic linking
is set up as a process *starts* and so a process itself can't set
LD_LIBRARY_PATH to affect its own linking. It can, however, set it so that
sub-processes are affected by it, which is what you are trying to do.
This simple script shows that it can be set:
=====
#!/usr/bin/perl
#
$ENV{LD_LIBRARY_PATH} = '/xyzzy';
system "echo \$LD_LIBRARY_PATH";
=====
so I suspect something else amiss in your script, which we haven't seen, so
can't help you with.
--
Just because I've written it doesn't mean that
either you or I have to believe it.
------------------------------
Date: Fri, 06 Apr 2007 21:06:00 -0000
From: darkon <darkon.tdo@gmail.com>
Subject: Re: Traversing a hash with array refs as keys?
Message-Id: <Xns990AADF367014dkwwashere@216.168.3.30>
Jürgen Exner <jurgenex@hotmail.com> wrote:
> Bryan wrote:
>> I have a structure of key value pairs, where the key is an
>> array,
>
> That is impossible. Hash keys can only be strings. Any other
> scalar value is converted into its string representation.
>
[snip]
>
>> Im starting to think I am using the wrong structure,
>
> Quite possible.
>
>> but that is
>> really the structure of my data: 1-1 key-value relationships,
>> where the array is the unique element and therefore the key.
>> Right?
>
> This smells very much like an x-y problem. Do you actually use
> that hash as a hash, i.e. is there really a logical function,
> that maps your arrays to the value? Hashes are ideal for
> lookups. Do you really get some array from somewhere and
> frequently need to look up the associated value for that array
> in constant time?
>
> If not then chances are a different data structure would be
> better suited for the job.
He could switch to Python and use tuples as the keys. :-)
(Considers.... Nah.)
------------------------------
Date: Sat, 07 Apr 2007 01:29:06 GMT
From: "Mumia W." <paduille.4061.mumia.w+nospam@earthlink.net>
Subject: Re: Traversing a hash with array refs as keys?
Message-Id: <CtCRh.20236$tD2.572@newsread1.news.pas.earthlink.net>
On 04/06/2007 12:32 PM, Bryan wrote:
> Another one...
>
> I have a structure of key value pairs, where the key is an array, and
> the value is a scalar. [...]
As the others have said, hash keys must always be scalar strings;
however, I think there's a module on CPAN that allows you to use
references as hash keys. It might be Tie::RefHash, but search CPAN
yourself: http://search.cpan.org/
------------------------------
Date: Sat, 7 Apr 2007 10:20:42 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Traversing a hash with array refs as keys?
Message-Id: <ev7ram.no.1@news.isolution.nl>
Bryan schreef:
> I have a structure of key value pairs, where the key is an array, and
> the value is a scalar.
So you have a segmented key. Is the number of segments the same for all?
You can use
$HoH{$keypart1}{$keypart2}{$keypart3} = $value;
(see perldsc)
or
$value{$keypart1, $keypart2, $keypart3} = $value;
(see $; in perlvar)
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
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 314
**************************************