[26926] in Perl-Users-Digest
Perl-Users Digest, Issue: 8898 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jan 29 18:05:41 2006
Date: Sun, 29 Jan 2006 15:05:07 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 29 Jan 2006 Volume: 10 Number: 8898
Today's topics:
Re: concatenate variables during looping question burlo.stumproot@gmail.com
Embedding private .pm files into a script <hakonrk@fys.uio.no>
Re: Embedding private .pm files into a script <1usa@llenroc.ude.invalid>
Re: Embedding private .pm files into a script <hakonrk@fys.uio.no>
Re: LF: Server scripting advice burlo.stumproot@gmail.com
Re: When were @- and @+ added <abigail@abigail.nl>
Re: When were @- and @+ added <abigail@abigail.nl>
Re: When were @- and @+ added <BZ@caradhras.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 29 Jan 2006 22:08:34 GMT
From: burlo.stumproot@gmail.com
Subject: Re: concatenate variables during looping question
Message-Id: <u7j8iit5o.fsf@gmail.com>
lance-news <lance-news@augustmail.com> writes:
> Hey all,
>
> Trying to create a loop and need some help
> in concatenation
>
> My current syntax:
>
> $Sheet->Cells(16,2)->{Value} = $Ja13_1;
> $Sheet->Cells(16,3)->{Value} = $Ja13_2;
> $Sheet->Cells(16,4)->{Value} = $Ja13_3;
> $Sheet->Cells(16,5)->{Value} = $Ja13_4;
> $Sheet->Cells(16,6)->{Value} = $Ja13_5;
> $Sheet->Cells(16,7)->{Value} = $Ja13_6;
>
> $Sheet->Cells(34,2)->{Value} = $Ks13_1;
> $Sheet->Cells(34,3)->{Value} = $Ks13_2;
> $Sheet->Cells(34,4)->{Value} = $Ks13_3;
> $Sheet->Cells(34,5)->{Value} = $Ks13_4;
> $Sheet->Cells(34,6)->{Value} = $Ks13_5;
> $Sheet->Cells(34,7)->{Value} = $Ks13_6;
>
You should probably use Range instead.
# write a 2 rows by 3 columns range
$sheet->Range("A8:C9")->{Value} = [[ undef, 'Xyzzy', 'Plugh' ],
[ 42, 'Perl', 3.1415 ]];
> Thanks in advance,
>
> Lance
------------------------------
Date: Sun, 29 Jan 2006 19:47:11 +0000 (UTC)
From: Haakon Riiser <hakonrk@fys.uio.no>
Subject: Embedding private .pm files into a script
Message-Id: <slrndtq6tv.ro5.hakonrk@fox.venod.com>
I keep my own little library of Perl routines in a directory
separate from the stuff that came with Perl itself and CPAN,
and I've put this directory in PERL5LIB. This is sufficient for
programs that only I use, but when friends and co-workers ask
for a copy of one of my scripts, it would be nice if I could just
give them a single file that contains everything they need.
I have looked at PAR, but what it does is overkill. I don't need
it to bundle every single dependancy to create a huge stand-alone
executable. Only the modules from my personal library needs to
be embedded into the resulting script. I see that pp has the -X
option to exclude a named module, but what I want is to exclude
everything except the stuff stored in a certain directory tree.
As far as I can tell, PAR can't do this.
Is there an easy way to accomplish what I want? I could embed
the required modules by hand, but that's too much work. :-)
--
Haakon
------------------------------
Date: Sun, 29 Jan 2006 20:00:45 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Embedding private .pm files into a script
Message-Id: <Xns975A98CB9D110asu1cornelledu@127.0.0.1>
Haakon Riiser <hakonrk@fys.uio.no> wrote in
news:slrndtq6tv.ro5.hakonrk@fox.venod.com:
> I keep my own little library of Perl routines in a directory
> separate from the stuff that came with Perl itself and CPAN,
> and I've put this directory in PERL5LIB. This is sufficient for
> programs that only I use, but when friends and co-workers ask
> for a copy of one of my scripts, it would be nice if I could just
> give them a single file that contains everything they need.
See
perldoc -q lib
perldoc lib
perldoc FindBin
NAME
FindBin - Locate directory of original perl script
SYNOPSIS
use FindBin;
use lib "$FindBin::Bin/../lib";
or
use FindBin qw($Bin);
use lib "$Bin/../lib";
So, put your scripts in a directory, and put your packages in a
subdirectory of that. Then zip everything up. Give them the zip file.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)
comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
------------------------------
Date: Sun, 29 Jan 2006 20:19:41 +0000 (UTC)
From: Haakon Riiser <hakonrk@fys.uio.no>
Subject: Re: Embedding private .pm files into a script
Message-Id: <slrndtq8qt.sjk.hakonrk@fox.venod.com>
[A. Sinan Unur]
> See
>
> perldoc -q lib
> perldoc lib
> perldoc FindBin
>
> NAME
> FindBin - Locate directory of original perl script
>
> SYNOPSIS
> use FindBin;
> use lib "$FindBin::Bin/../lib";
>
> or
>
> use FindBin qw($Bin);
> use lib "$Bin/../lib";
>
> So, put your scripts in a directory, and put your packages in a
> subdirectory of that. Then zip everything up. Give them the zip file.
Thanks for the tip, but I'd prefer not having to reorganize my
directories.
I think I'll just write a simple script to convert all 'use'
declarations that refer to my private modules by a simple
package Private::Foo;
<contents of Private/Foo.pm>
package main;
This works as long as I don't include my modules in a fancy way
(such as loading them on demand, etc.)
--
Haakon
------------------------------
Date: Sun, 29 Jan 2006 22:29:47 GMT
From: burlo.stumproot@gmail.com
Subject: Re: LF: Server scripting advice
Message-Id: <uzmlehdlv.fsf@gmail.com>
Tad McClellan <tadmc@augustmail.com> writes:
> Dave <david@nospam.com> wrote:
>
> > Subject: LF: Server scripting advice
>
>
> What does "LF" stand for?
My guess is "Loocking For"
------------------------------
Date: 29 Jan 2006 20:49:46 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: When were @- and @+ added
Message-Id: <slrndtqaja.e1.abigail@alexandra.abigail.nl>
Sisyphus (sisyphus1@nomail.afraid.org) wrote on MMMMDXXXIV September
MCMXCIII in <URL:news:43dc749c$0$15126$afc38c87@news.optusnet.com.au>:
<>
<> Sorry - I meant to specify that I was using perl 5.8.7 on Win32.
<>
<> The following script just hangs forever (with no output), then segfaults
<> when I kill the script (with Ctrl-C):
<>
<> use warnings;
<> $foo = 'ffooooo';
<> $foo =~ /o/g;
<> print "@-";
<>
<> I don't think it's critical since removal of the 'g' modifier solves the
<> problem. Should I file a bug report about this ?
Yes.
Abigail
--
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'
------------------------------
Date: 29 Jan 2006 20:53:12 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: When were @- and @+ added
Message-Id: <slrndtqapo.e1.abigail@alexandra.abigail.nl>
Dr.Ruud (rvtol+news@isolution.nl) wrote on MMMMDXXXIV September MCMXCIII
in <URL:news:drh90m.nc.1@news.isolution.nl>:
__ Abigail schreef:
__ > Sisyphus:
__
__ >> use warnings;
__ >> "foo" =~ /o/g;
__ >> print scalar @-;
__ >>
__ >> If I don't 'use warnings;' in that script, it reverts to
__ >> outputting '1'.
__ >
__ > I can't reproduce that with any version of Perl that supports @-.
__
__
__ perl, v5.8.6 built for i386-freebsd-64int
__
__ $ perl -e 'use strict; use warnings; "foo" =~ /o/g; print scalar @-'
__ 134641065
__
__ $ perl -e 'use warnings; "foo" =~ /o/g; print scalar @-'
__ 134621613
__
__ $ perl -e '"foo" =~ /o/g; print scalar @-'
__ 1
__
__ Without the g-modifier they all print '1'.
That's a bug, and something I can't reproduce under Linux.
You ought to file a bugreport.
Abigail
--
$_ = "\x3C\x3C\x45\x4F\x54"; s/<<EOT/<<EOT/e; print;
Just another Perl Hacker
EOT
------------------------------
Date: Sun, 29 Jan 2006 21:12:56 +0000 (UTC)
From: BZ <BZ@caradhras.net>
Subject: Re: When were @- and @+ added
Message-Id: <slrndtqbuo.le1.BZ@ophelia.vpn.zoetekouw.net>
Abigail wrote in comp.lang.perl.misc:
> That's a bug, and something I can't reproduce under Linux.
> You ought to file a bugreport.
I can (Debian sid). It seems locale dependent, see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=350377
--
BZ
------------------------------
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 8898
***************************************