[30694] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1939 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 22 14:09:43 2008

Date: Wed, 22 Oct 2008 11:09:10 -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           Wed, 22 Oct 2008     Volume: 11 Number: 1939

Today's topics:
    Re: accessing single characters of strings <lehmannmapson@cnm.de>
    Re: accessing single characters of strings <willem@stack.nl>
    Re: accessing single characters of strings <jurgenex@hotmail.com>
    Re: accessing single characters of strings <thepoet_nospam@arcor.de>
    Re: accessing single characters of strings <lehmannmapson@cnm.de>
    Re: accessing single characters of strings <cdalten@gmail.com>
    Re: accessing single characters of strings <tadmc@seesig.invalid>
    Re: can LWP handle this? <dontmewithme@got.it>
    Re: can LWP handle this? <dontmewithme@got.it>
    Re: Comparing audio files <kieranocall@gmail.com>
        greping a value from a file paul_0403@yahoo.com
    Re: greping a value from a file <jurgenex@hotmail.com>
    Re: greping a value from a file <tim@burlyhost.com>
    Re: IDE with Class Browser for Perl <rvtol+news@isolution.nl>
        new CPAN modules on Wed Oct 22 2008 (Randal Schwartz)
        open(@_): Do not expect to get ARRAY(0x88a4c0) argument <socyl@987jk.com.invalid>
    Re: open(@_): Do not expect to get ARRAY(0x88a4c0) argu <socyl@987jk.com.invalid>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 22 Oct 2008 10:06:29 +0200
From: Marten Lehmann <lehmannmapson@cnm.de>
Subject: Re: accessing single characters of strings
Message-Id: <6m8589Ffi1bkU1@mid.individual.net>

Hello,

>> how can I access a single character of a string in Perl like I can do it 
>> in C with text[10]? I don't want to split it up and work on an array. 
>> How can I work directly in place?
> 
> substr() is the function you are looking for.
> However I very strongly recommend that you change your mental model.
> Perl strings are _NOT_ arrays of characters. That primitive model is
> adaquate for C. Perl strings are much more powerful and if you use them
> like you would use arrays of characters in C, then you are missing most
> of their functionality.

I need to parse a file line by line. It is basically a CSV file, not not 
completely.

Imagine this content:

"one","""two"",""three"""

"" mean a replacement for one "

Correctly parsed, I would get two values:

one
and
"two","three"

But I cannot split at , and I cannot split at ",", since both would lead 
to wrong parsing. So I have to lexically go through every character. And 
Thus I don't only need to know the current character, but also the next 
one. Is substr() really the only choice? Looks a bit awkward to call 
substr() dozends of times.

Kind regards
Marten


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

Date: Wed, 22 Oct 2008 08:49:16 +0000 (UTC)
From: Willem <willem@stack.nl>
Subject: Re: accessing single characters of strings
Message-Id: <slrngftq8c.1cvb.willem@snail.stack.nl>

Marten Lehmann wrote:
) I need to parse a file line by line. It is basically a CSV file, not not 
) completely.
)
) Imagine this content:
)
) "one","""two"",""three"""
)
) "" mean a replacement for one "
)
) Correctly parsed, I would get two values:
)
) one
) and
) "two","three"
)
) But I cannot split at , and I cannot split at ",", since both would lead 
) to wrong parsing.

Obviously.

) So I have to lexically go through every character.

A strange conclusion.  There are dozens of other ways to do it.

One example: split at , and then use some simple processing to determine
if an entry has an odd number of quotes and, if so, join it to the next
entry.  Then postprocess the entries for the quotes.

Another example: Use one of the many existing CSV parsing module.


SaSW, Willem
-- 
Disclaimer: I am in no way responsible for any of the statements
            made in the above text. For all I know I might be
            drugged or something..
            No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT


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

Date: Wed, 22 Oct 2008 02:27:16 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: accessing single characters of strings
Message-Id: <1irtf4d68gjs6qto48npcqt55acdohe657@4ax.com>

Marten Lehmann <lehmannmapson@cnm.de> wrote:
>I need to parse a file line by line. It is basically a CSV file, not not 
>completely.
>
>Imagine this content:
>
>"one","""two"",""three"""
>
>"" mean a replacement for one "

That is a normal, standard, boring CSV, nothing special. Why do you
think, the standard CSV parsers wouldn't be able to parse it?

>Correctly parsed, I would get two values:
>one
>and
>"two","three"

Which of the existing CSV parsers did you try? How did they fail to
parse that line?

>But I cannot split at , and I cannot split at ",", since both would lead 
>to wrong parsing. 

Yes, but that's not how you normally would write a parser anyway.

>So I have to lexically go through every character. And 
>Thus I don't only need to know the current character, but also the next 
>one. 

It has been a really long time, but AFAIR that depends on the kind of
tokenizer you are using. 

>Is substr() really the only choice? Looks a bit awkward to call 
>substr() dozends of times.

If you really insist on reinventing the wheel and writing your own CSV
parser (why would you want to do that? Excercise in parser writing?)
then the low-level tokenizer may indeed work best on an array of
characters.  

jue


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

Date: Wed, 22 Oct 2008 11:32:10 +0200
From: Christian Winter <thepoet_nospam@arcor.de>
Subject: Re: accessing single characters of strings
Message-Id: <48fef2dd$0$14060$9b4e6d93@newsspool3.arcor-online.net>

Marten Lehmann wrote:
> Hello,
> 
>>> how can I access a single character of a string in Perl like I can do 
>>> it in C with text[10]? I don't want to split it up and work on an 
>>> array. How can I work directly in place?
>>
>> substr() is the function you are looking for.
>> However I very strongly recommend that you change your mental model.
>> Perl strings are _NOT_ arrays of characters. That primitive model is
>> adaquate for C. Perl strings are much more powerful and if you use them
>> like you would use arrays of characters in C, then you are missing most
>> of their functionality.
> 
> I need to parse a file line by line. It is basically a CSV file, not not 
> completely.
> 
> Imagine this content:
> 
> "one","""two"",""three"""
> 
> "" mean a replacement for one "
> 
> Correctly parsed, I would get two values:
> 
> one
> and
> "two","three"
> 
> But I cannot split at , and I cannot split at ",", since both would lead 
> to wrong parsing. So I have to lexically go through every character. And 
> Thus I don't only need to know the current character, but also the next 
> one. Is substr() really the only choice? Looks a bit awkward to call 
> substr() dozends of times.

Have a look at the Text::CSV_XS[1] module, which will parse your csv
data correctly and spare you a lot of headache about balanced
quotations. Using the double quote itself to escape a literal
double quote isn't that uncommon, so it's a default setting in
Text::CSV_XS.

-Chris

[1] http://search.cpan.org/~hmbrand/Text-CSV_XS-0.57/CSV_XS.pm


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

Date: Wed, 22 Oct 2008 13:40:31 +0200
From: Marten Lehmann <lehmannmapson@cnm.de>
Subject: Re: accessing single characters of strings
Message-Id: <6m8hpjFfi7n1U1@mid.individual.net>

> Have a look at the Text::CSV_XS[1] module, which will parse your csv
> data correctly and spare you a lot of headache about balanced
> quotations. Using the double quote itself to escape a literal
> double quote isn't that uncommon, so it's a default setting in
> Text::CSV_XS.

Thanks, you are right. While I'm usually doing easy parsing line by line 
own my own and I just planned to extend it a bit, I just realized, that 
recognizing double quotations and new lines is just a bit more work, so 
I'm now using the Text::CSV_XS module you recommended.

Regards
Marten


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

Date: Wed, 22 Oct 2008 04:52:23 -0700 (PDT)
From: grocery_stocker <cdalten@gmail.com>
Subject: Re: accessing single characters of strings
Message-Id: <a9177123-9b78-4123-9575-e6e5442f5e0a@v28g2000hsv.googlegroups.com>

On Oct 21, 11:14 am, Tad J McClellan <ta...@seesig.invalid> wrote:
> Marten Lehmann <lehmannmap...@cnm.de> wrote:
> > like I can do it
> > in C with text[10]? I don't want to split it up and work on an array.
>
> It is not possible to do it like in C, because in C it _is_ an array.
>
> --

an array of objects.





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

Date: Wed, 22 Oct 2008 05:53:52 -0500
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: accessing single characters of strings
Message-Id: <slrngfu1i0.j82.tadmc@tadmc30.sbcglobal.net>

Marten Lehmann <lehmannmapson@cnm.de> wrote:

> I need to parse a file line by line. It is basically a CSV file, not not 
> completely.
>
> Imagine this content:
>
> "one","""two"",""three"""
>
> "" mean a replacement for one "


That looks like normal CSV to me...


> Correctly parsed, I would get two values:
>
> one
> and
> "two","three"


---------------------------
#!/usr/bin/perl
use warnings;
use strict;
use Text::CSV_XS;

my $line = q("one","""two"",""three""");
my $csv = Text::CSV_XS->new();
$csv->parse($line);
print "$_\n" for $csv->fields();
---------------------------


Looks like the code you need has already been written. Just use it.


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Wed, 22 Oct 2008 12:32:36 +0200
From: Larry <dontmewithme@got.it>
Subject: Re: can LWP handle this?
Message-Id: <dontmewithme-E03C6F.12323622102008@news.tin.it>

In article <slrngfsbhj.h0e.hjp-usenet2@hrunkner.hjp.at>,
 "Peter J. Holzer" <hjp-usenet2@hjp.at> wrote:

> If this works with your server, that's fine, but I don't think you can
> rely on this. If you send less than 2048000000 bytes, a server might (or
> even should) conclude that something went wrong at the client end and
> return an error.

Thank you for pointing that out. Actually I'm sending endless data and 
if I try "transfer chunked" my server will fire a "411 Length Required" 
error!


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

Date: Wed, 22 Oct 2008 18:20:41 +0200
From: Larry <dontmewithme@got.it>
Subject: Re: can LWP handle this?
Message-Id: <dontmewithme-B3DA8D.18204122102008@news.tin.it>

In article <dontmewithme-3D7BF7.17391321102008@news.tin.it>,
 Larry <dontmewithme@got.it> wrote:

> ok, I sorted out something like the following:

I have found I cannot send an header data before the rwa data:

I cannot do this: # It won't send "Hello World!" at all

$req->content("Hello World!");

$req->content(sub {
   read($fh1, my $buf, 2048);
   return $buf;   
 } );


nor this: # It will send only "Hello world!" for ever, like it weren't 
aquainted with $_hsent = 1;

$_hsent = 0;

$req->content(sub {
   if $_hsent == 0
   {
      return "Hello World!";
      $_hsent = 1;
   } else {
      read($fh1, my $buf, 2048);
      return $buf;
   }
 } );

any idea?

thanks


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

Date: Wed, 22 Oct 2008 08:58:31 -0700 (PDT)
From: kieran <kieranocall@gmail.com>
Subject: Re: Comparing audio files
Message-Id: <d6d21d35-c472-4759-8c4f-f67f4c6bdf35@v56g2000hsf.googlegroups.com>

On Oct 16, 9:56 pm, rc <christian.ramse...@gmail.com> wrote:
> On Oct 8, 4:39 pm, kieran <kieranoc...@gmail.com> wrote:
>
> > Hello,
> > I am trying to compare two similar audio files (WAV). From what i have
> > read i need tosampleboth audio files at certain frequencies and run
> > these through a FFT and then compare the results. Can anyone advise me
> > if this is the correct approach and also describe the steps i need to
> > take to get to the stage where I can compare the files.
>
> While this can certainly be done in Perl, a nice environment for
> prototyping this kind of applications is GNU Octave or Matlab (given
> you are rich or a student). Reading some files from wav,down/
> upsampling them, applying filters and perform an fft is just a few
> lines of code in both of these tools.
>
> Once you have a working solution, you can still collect all modules
> you need to do it in Perl from CPAN or just continue to use Octave via
> Inline::Octave.
>
> Now for what to do exactly, this heavily depends on what your input
> and your goals are. To get help with this, maybe asking in a group
> about audio processing or algorithms would be better.
>
> Good luck
>
> Christian
>
> --
> rc at networkz dot ch

Hi Christian,
Thanks for your reply, the approach you describe will certainly help,
I have requested a trial version of Octave so I will begin using that
for protoyyping once I get access.

A couple of things you might be able to help me with, I have been
looking for some modules to use for downsampling, filtering etc... The
module I found for resampling audio called Audio::Mad::Resample would
not install on my machine, i got some errors that i could not resolve.
Are there any modules you can recomend for down/up sampling?
Also for creating a low-pass filter i have been looking at PDL::Audio,
there are many types of filter available in this module, I am not sure
which is best for low-pass filters.
Thanks,
Kieran


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

Date: Wed, 22 Oct 2008 09:44:32 -0700 (PDT)
From: paul_0403@yahoo.com
Subject: greping a value from a file
Message-Id: <3e37504e-2b09-4104-8cd1-8640bfce2f68@q35g2000hsg.googlegroups.com>

I have a file with the following contents(see below) and I want to get
the value associated with PROCESS_PID using grep or what ever is the
most effient way. Once I get that value (23491) into a variable
I am going to use it to send a kill command to a process.

Of course I need to test if the grep was successful or not since all
my files may not contain that name value pair.

cat file
PROCESS_START_DATE='20081021'
PROCESS_PID='23491'

Thanks


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

Date: Wed, 22 Oct 2008 10:16:11 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: greping a value from a file
Message-Id: <qrnuf4l14bh1kcpv479re7tc1btqr1gkmm@4ax.com>

paul_0403@yahoo.com wrote:
>I have a file with the following contents(see below) and I want to get
>the value associated with PROCESS_PID using grep or what ever is the
>most effient way. Once I get that value (23491) into a variable
>I am going to use it to send a kill command to a process.
>
>Of course I need to test if the grep was successful or not since all
>my files may not contain that name value pair.
>
>cat file
>PROCESS_START_DATE='20081021'
>PROCESS_PID='23491'

No need for grep(). Just loop through the file in a standard
while(<FILE>) loop and try to m//atch the line, grouping the value in $1
in the process.

jue


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

Date: Wed, 22 Oct 2008 10:34:41 -0700
From: Tim Greer <tim@burlyhost.com>
Subject: Re: greping a value from a file
Message-Id: <SuJLk.252$3w.15@newsfe19.iad>

paul_0403@yahoo.com wrote:

> I have a file with the following contents(see below) and I want to get
> the value associated with PROCESS_PID using grep or what ever is the
> most effient way. Once I get that value (23491) into a variable
> I am going to use it to send a kill command to a process.

Open the file normally and just step through it, per line, with a while
loop, and then grab it with  my $pid = $1 if
(m/^PROCESS_PID='(\d+)'$/);  Or do the look and check, and if positive,
use last to break out of the loop and do the appropriate processing.
 
> Of course I need to test if the grep was successful or not since all
> my files may not contain that name value pair.

I'm confused by the above.  Do you not know what files might contain
PROCESS_PID='number'?  Is that why you want to run a grep (perhaps
first) to see?  Something like grep -l ^PROCESS_PID /path/to/files/* to
get the file(s) that have it, and then use Perl to open and grab the
actual value (if not grep itself) from those files?  I'm not sure if
you're asking how to do this in Perl (instead of grep), how to use grep
inside a Perl script, or if you want to use Perl's built in grep?

-- 
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting.  24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!


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

Date: Wed, 22 Oct 2008 11:07:24 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: IDE with Class Browser for Perl
Message-Id: <gdnvns.1bg.1@news.isolution.nl>

saragwyn schreef:

> Our group is getting ready to dive into a massive refactor of our Perl
> app and were hoping to find a tool to more easily move up and down the
> class hierarchy (especially to find all the matching functions within
> base classes and subclasses).
>
> Does anyone know of a Perl IDE that has any of that functionality?
> Komodo 4.4 does not seem to do any class browsing for Perl.

eclipse epic

-- 
Affijn, Ruud

"Gewoon is een tijger."



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

Date: Wed, 22 Oct 2008 04:42:21 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Oct 22 2008
Message-Id: <K94IEL.1700@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.

AnyEvent-Mojo-0.1
http://search.cpan.org/~melo/AnyEvent-Mojo-0.1/
Run Mojo apps using AnyEvent framework 
----
Apache2-ASP-2.00_05
http://search.cpan.org/~johnd/Apache2-ASP-2.00_05/
ASP for Perl, reloaded. 
----
B-Hooks-OP-Check-StashChange-0.02
http://search.cpan.org/~flora/B-Hooks-OP-Check-StashChange-0.02/
Invoke callbacks when the stash code is being compiled in changes 
----
B-Hooks-Parser-0.01
http://search.cpan.org/~flora/B-Hooks-Parser-0.01/
Interface to perls parser variables 
----
BDB-1.81
http://search.cpan.org/~mlehmann/BDB-1.81/
Asynchronous Berkeley DB access 
----
Bundle-DBD-PO-1.00
http://search.cpan.org/~steffenw/Bundle-DBD-PO-1.00/
A bundle to install all DBD::PO related modules 
----
Catalyst-Authentication-Store-LDAP-0.1004
http://search.cpan.org/~karman/Catalyst-Authentication-Store-LDAP-0.1004/
Authentication from an LDAP Directory. 
----
Catalyst-Plugin-ConfigComponents-0.1.44
http://search.cpan.org/~pjfl/Catalyst-Plugin-ConfigComponents-0.1.44/
Creates components from config entries 
----
CatalystX-CRUD-0.32
http://search.cpan.org/~karman/CatalystX-CRUD-0.32/
CRUD framework for Catalyst applications 
----
CatalystX-CRUD-YUI-0.007
http://search.cpan.org/~karman/CatalystX-CRUD-YUI-0.007/
YUI for your CatalystX::CRUD view 
----
Config-Model-0.630
http://search.cpan.org/~ddumont/Config-Model-0.630/
Framework to create configuration validation tools and editors 
----
Config-Simple-Extended-0.07
http://search.cpan.org/~hesco/Config-Simple-Extended-0.07/
Extend Config::Simple w/ Configuration Inheritance, chosen by URL 
----
DBD-PO-1.00
http://search.cpan.org/~steffenw/DBD-PO-1.00/
DBI driver for PO files 
----
DBD-Unify-0.76
http://search.cpan.org/~hmbrand/DBD-Unify-0.76/
DBI driver for Unify database systems 
----
DBD-mysql-4.009
http://search.cpan.org/~capttofu/DBD-mysql-4.009/
MySQL driver for the Perl5 Database Interface (DBI) 
----
Data-Dump-1.12
http://search.cpan.org/~gaas/Data-Dump-1.12/
Pretty printing of data structures 
----
Data-Peek-0.22
http://search.cpan.org/~hmbrand/Data-Peek-0.22/
A collection of low-level debug facilities 
----
Data-Peek-0.23
http://search.cpan.org/~hmbrand/Data-Peek-0.23/
A collection of low-level debug facilities 
----
Devel-PPPort-3.14_03
http://search.cpan.org/~mhx/Devel-PPPort-3.14_03/
Perl/Pollution/Portability 
----
Don-Mendo-0.0.6
http://search.cpan.org/~jmerelo/Don-Mendo-0.0.6/
Modules for "La venganza de Don Mendo", Sir Mendo's revenge. 
----
EV-3.45
http://search.cpan.org/~mlehmann/EV-3.45/
perl interface to libev, a high performance full-featured event loop 
----
Games-Risk-2.0.2
http://search.cpan.org/~jquelin/Games-Risk-2.0.2/
classical 'risk' board game 
----
Google-ProtocolBuffers-0.05_1
http://search.cpan.org/~gariev/Google-ProtocolBuffers-0.05_1/
simple interface to Google Protocol Buffers 
----
Lingua-EN-Titlecase-0.11
http://search.cpan.org/~ashley/Lingua-EN-Titlecase-0.11/
Titlecase English words by traditional editorial rules. 
----
Method-Signatures-20081021
http://search.cpan.org/~mschwern/Method-Signatures-20081021/
method declarations with signatures and no source filter 
----
Module-Versions-Report-1.06
http://search.cpan.org/~jesse/Module-Versions-Report-1.06/
report versions of all modules in memory 
----
MooseX-Meta-Attribute-Index-0.02
http://search.cpan.org/~ctbrown/MooseX-Meta-Attribute-Index-0.02/
Provides index meta attribute trait 
----
MooseX-Types-CNPJ-0.01
http://search.cpan.org/~tbr/MooseX-Types-CNPJ-0.01/
CNPJ type for Moose classes 
----
MooseX-Types-CPF-0.01
http://search.cpan.org/~tbr/MooseX-Types-CPF-0.01/
CPF type for Moose classes 
----
MooseX-Types-Path-Class-0.05
http://search.cpan.org/~thepler/MooseX-Types-Path-Class-0.05/
A Path::Class type library for Moose 
----
Net-SSH-Perl-1.33
http://search.cpan.org/~turnstep/Net-SSH-Perl-1.33/
Perl client Interface to SSH 
----
PAR-Dist-0.39
http://search.cpan.org/~smueller/PAR-Dist-0.39/
Create and manipulate PAR distributions 
----
RDF-Trine-0.109_02
http://search.cpan.org/~gwilliams/RDF-Trine-0.109_02/
An RDF Framework for Perl. 
----
Rose-URI-0.50
http://search.cpan.org/~jsiracusa/Rose-URI-0.50/
A URI class that allows easy and efficient manipulation of URI components. 
----
Spreadsheet-Read-0.29
http://search.cpan.org/~hmbrand/Spreadsheet-Read-0.29/
Meta-Wrapper for reading spreadsheet data 
----
TRD-DebugLog-0.0.7
http://search.cpan.org/~ichi/TRD-DebugLog-0.0.7/
debug log 
----
Teradata-SQL-0.06
http://search.cpan.org/~grommel/Teradata-SQL-0.06/
Perl interface to Teradata SQL 
----
Test-Classy-0.04
http://search.cpan.org/~ishigaki/Test-Classy-0.04/
write your unit tests in other modules than *.t 
----
Test-Formats-0.11
http://search.cpan.org/~rjray/Test-Formats-0.11/
An umbrella class for test classes that target formatted data 
----
Test-MockCommand-0.01
http://search.cpan.org/~kyz/Test-MockCommand-0.01/
provide mock results for external commands 
----
Test-XML-Order-1.01
http://search.cpan.org/~gam/Test-XML-Order-1.01/
Compare the order of XML tags in perl tests 
----
Text-CSV_XS-0.56
http://search.cpan.org/~hmbrand/Text-CSV_XS-0.56/
comma-separated values manipulation routines 
----
Text-CSV_XS-0.57
http://search.cpan.org/~hmbrand/Text-CSV_XS-0.57/
comma-separated values manipulation routines 
----
Text-Template-Simple-0.62_06
http://search.cpan.org/~burak/Text-Template-Simple-0.62_06/
Simple text template engine 
----
Tk-Clock-0.23
http://search.cpan.org/~hmbrand/Tk-Clock-0.23/
Clock widget with analog and digital display 
----
VCS-SCCS-0.12
http://search.cpan.org/~hmbrand/VCS-SCCS-0.12/
OO Interface to SCCS files 
----
VCS-SCCS-0.13
http://search.cpan.org/~hmbrand/VCS-SCCS-0.13/
OO Interface to SCCS files 
----
VCS-SCCS-0.14
http://search.cpan.org/~hmbrand/VCS-SCCS-0.14/
OO Interface to SCCS files 
----
WWW-Blogger-2008.1021
http://search.cpan.org/~ermeyers/WWW-Blogger-2008.1021/
Blogger Development Interface (BDI) 
----
WWW-Netflix-API-0.05
http://search.cpan.org/~davidrw/WWW-Netflix-API-0.05/
Interface for Netflix's API 
----
XML-Hash-0.95
http://search.cpan.org/~braceta/XML-Hash-0.95/
Converts from a XML into a Hash. 
----
parrot-0.8.0
http://search.cpan.org/~particle/parrot-0.8.0/
----
perlindex-1.604
http://search.cpan.org/~ulpfr/perlindex-1.604/
index and query perl manual pages 
----
rgit-0.05
http://search.cpan.org/~vpit/rgit-0.05/
Recursively execute a command on all the git repositories in a directory tree. 


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/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


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

Date: Wed, 22 Oct 2008 14:32:07 +0000 (UTC)
From: kj <socyl@987jk.com.invalid>
Subject: open(@_): Do not expect to get ARRAY(0x88a4c0) arguments
Message-Id: <gdndh7$e6p$1@reader1.panix.com>



I've written a script that is supposed to serve as a wrapper around
an existing command-line utility (which I'll call "foobar" below).
This utility has a very rich and complex set of command-line options,
so, in order to have the wrapper script follow the original utility's
calling conventions as closely as possible, while bypassing the
shell, I had the line

  open my $out, '|-', 'foobar', @ARGV or die $!;

 ...but open complains with

  Internal error: open(@_): Do not expect to get ARRAY(0x88a4c0) arguments

I can avoid the error if instead I use

  open my $out, "|foobar @ARGV" or die $!;

 ...but this can lead to errors (e.g. if one of the original arguments
is a quoted string with embedded whitespace).

Is this a bug in the design of open, or a feature?

More importantly, is there a way around this problem?

TIA!

Kynn
-- 
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.


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

Date: Wed, 22 Oct 2008 14:54:49 +0000 (UTC)
From: kj <socyl@987jk.com.invalid>
Subject: Re: open(@_): Do not expect to get ARRAY(0x88a4c0) arguments
Message-Id: <gdnerp$dvb$1@reader1.panix.com>

In <gdndh7$e6p$1@reader1.panix.com> kj <socyl@987jk.com.invalid> writes:

>I've written a script that is supposed to serve as a wrapper around
>an existing command-line utility (which I'll call "foobar" below).
>This utility has a very rich and complex set of command-line options,
>so, in order to have the wrapper script follow the original utility's
>calling conventions as closely as possible, while bypassing the
>shell, I had the line

>  open my $out, '|-', 'foobar', @ARGV or die $!;

>...but open complains with

>  Internal error: open(@_): Do not expect to get ARRAY(0x88a4c0) arguments

I found the problem.  It seems to be a bug in autodie...

Kynn
-- 
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.


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

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


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