[29272] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 516 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 15 03:09:58 2007

Date: Fri, 15 Jun 2007 00:09:09 -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           Fri, 15 Jun 2007     Volume: 11 Number: 516

Today's topics:
        Depending on perl version <hslee911@yahoo.com>
    Re: Depending on perl version <purlgurl@purlgurl.net>
    Re: Depending on perl version <tadmc@seesig.invalid>
    Re: Depending on perl version <joe@inwap.com>
    Re: encrypt with perl, decrypt with ruby, 3 days and co QoS@domain.invalid
    Re: How can I use the string variable expansion for OO  <paduille.4061.mumia.w+nospam@earthlink.net>
        new CPAN modules on Fri Jun 15 2007 (Randal Schwartz)
    Re: Perl Bug??? <mritty@gmail.com>
    Re: Perl script to identify corrupt mbox messages? <stoupa@practisoft.cz>
    Re: Perl script to identify corrupt mbox messages? <tuxedo@mailinator.net>
        regex question <a@mail.com>
    Re: regex question  usenet@DavidFilmer.com
    Re: regex question <tadmc@seesig.invalid>
        Simplify Variable Number of Regex Groups <wcitoan@NOSPAM-yahoo.com>
    Re: Simplify Variable Number of Regex Groups <purlgurl@purlgurl.net>
        Types of Data Transformation Software, If You're  Looki <irishhacker@gmail.com>
    Re: Writing row at a time in Excel using OLE <stoupa@practisoft.cz>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 14 Jun 2007 17:29:17 -0700
From:  James <hslee911@yahoo.com>
Subject: Depending on perl version
Message-Id: <1181867357.771825.312290@o11g2000prd.googlegroups.com>

if ($] < 5.008) {
   use lib 'path/to/module';
}

This line is executed irrespective of perl version.
How do I fix it?

TIA
James



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

Date: Thu, 14 Jun 2007 18:36:29 -0700
From: Purl Gurl <purlgurl@purlgurl.net>
Subject: Re: Depending on perl version
Message-Id: <HoudneDbwImEcOzbnZ2dnUVZ_qqrnZ2d@giganews.com>

James wrote:

> if ($] < 5.008) {
>    use lib 'path/to/module';
> }

> This line is executed irrespective of perl version.
> How do I fix it?

#!perl

if ($] < 5.008)
  {
   print "true";
   unshift (@INC, 'C:/test/path/to/module');
  }
else
  { print "not true"; }

print "\n\n";

print "Version: $]";

print "\n\n";

$" = "\n";

print "@INC";


PRINTED RESULTS:

true

Version: 5.006001

C:/test/path/to/module
C:/apache/lib
C:/apache/site/lib


PRINTED RESULTS:

not true

Version: 5.008

C:/apache2/lib
C:/apache2/site/lib


-- 
Purl Gurl
--
"Then again what can you expect from a fat-assed, champagne swilling,
  half-breed just off the Rez?"
   - Joe Kline


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

Date: Fri, 15 Jun 2007 02:21:56 GMT
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Depending on perl version
Message-Id: <slrnf73tqv.1p3.tadmc@tadmc30.sbcglobal.net>

James <hslee911@yahoo.com> wrote:
> if ($] < 5.008) {
>    use lib 'path/to/module';
> }
>
> This line is executed irrespective of perl version.
> How do I fix it?


They way the documentation says to:

   perldoc lib

           use lib LIST;

       is almost the same as saying

           BEGIN { unshift(@INC, LIST) }

So then:

BEGIN {
   if ($] < 5.008) {
      unshift @INC, 'path/to/module';
   }
}


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


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

Date: Thu, 14 Jun 2007 23:38:30 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: Depending on perl version
Message-Id: <mIqdnQH2dqd0ru_bnZ2dnUVZ_trinZ2d@comcast.com>

Purl Gurl wrote:

> if ($] < 5.008)
>  {
>   print "true";
>   unshift (@INC, 'C:/test/path/to/module');
>  }

You forgot to put that inside a BEGIN{} block.

If the change to @INC is not done inside a BEGIN{} block,
the 'use' statements that depend on it will fail.
	-Joe


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

Date: Thu, 14 Jun 2007 22:25:41 GMT
From: QoS@domain.invalid
Subject: Re: encrypt with perl, decrypt with ruby, 3 days and counting...
Message-Id: <Ffjci.5570$O15.3226@trnddc03>


uncle <aktxyz@gmail.com> wrote in message-id:  <1181854382.457369.262480@i13g2000prf.googlegroups.com>

>
>I have tried hundreds of combos, scanned hundreds of web pages, I
>still cannot encrypt with perl and decrypt with ruby.  Hell, I can't
>even encrypt with perl/ruby and get the same result.
>
>Have tried blowfish, tripledes, des, rc4, you name.
>
>Would love an expert to help out !
>
>Here is one of my many attempts
>
>
>#===== PERL
>
>#!/usr/bin/perl
>use MIME::Base64;
>use Crypt::CBC;
>my $key = '12345678';
>my $iv = '12345678';
>my $text = '12345678';
>$cipher = Crypt::CBC->new({
>  'literal_key' => 0,
>  'key' => $key,
>  'iv' => $iv,
>  'header' => 'none',
>  'padding' => 'standard',
>  'prepend_iv' => 0});
>$encrypted = $cipher->encrypt($text);
>$encoded = encode_base64($encrypted);
>print "encrypted=$encrypted\n";
>print "encoded=$encoded\n";
>
>#===== RUBY
>
>require 'openssl'
>require "base64"
>require 'cgi'
>require 'uri'
>key = "23456789"
>token = "12345678"
>e = OpenSSL::Cipher::Cipher.new 'DES'
>e.encrypt key
>s = e.update token
>s << e.final
>puts s
>puts Base64.encode64(s)
>
>~

Feel free to have a look at ShapeShifter on CPAN scripts, something
there may help you out somehow.

http://www.cpan.org/authors/id/Q/QO/QOS/Utilities/

It does seem to me that your key is different in these examples,
afaik the decrypt key needs to match the key used to encrypt.



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

Date: Fri, 15 Jun 2007 01:27:29 GMT
From: "Mumia W." <paduille.4061.mumia.w+nospam@earthlink.net>
Subject: Re: How can I use the string variable expansion for OO "$self->attribute"
Message-Id: <5Wlci.4370$tb6.4012@newsread3.news.pas.earthlink.net>

On 06/09/2007 06:57 AM, Ilias Lazaridis wrote:
> [...]
> http://search.cpan.org/~nobull/Tie-OneOff/lib/Tie/OneOff.pm
> http://perl.plover.com/Interpolation/manual.html
> 
> Thanks for the info, but I'm unable to see how I could process this
> string:
> 
> return "$self->label: $self->val($attrib)"
> 

Tie::OneOff seems to be very similar to Tie::Sub:

     use strict;
     use warnings;
     require Tie::Sub;
     require NetAddr::IP;

     my $net = NetAddr::IP->new('loopback');
     tie my %sub, 'Tie::Sub', sub {
         my $method = shift;
         $net->$method;
     };

     print "My address is $sub{addr}\n";

Tie::Sub makes a function call look like a reference to a hash element, 
and interpolation is done for hash elements within double-quoted strings.

> is there any stand-alone function available (something like
> "stringeval"), which would process the string correctly?
> 

Probably not.

> If yes (or if I write my own), is there a way to override the default
> string-processing behaviour of perl on a per-package basis?
> 

You could create a source filter. Install Filter::Simple and read these:

perldoc perlfilter
perldoc Filter::Simple

I think Tie::Sub is much simpler.



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

Date: Fri, 15 Jun 2007 04:42:13 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Fri Jun 15 2007
Message-Id: <JJnuED.CvK@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.

AI-NeuralNet-SOM-0.03
http://search.cpan.org/~drrho/AI-NeuralNet-SOM-0.03/
Perl extension for Kohonen Maps 
----
Alien-GvaScript-1.09
http://search.cpan.org/~dami/Alien-GvaScript-1.09/
Gva extension to the prototype javascript framework 
----
Astro-SpaceElevator-0.04
http://search.cpan.org/~dbrooks/Astro-SpaceElevator-0.04/
Model a Space Elevator 
----
Astro-SpaceElevator-0.05
http://search.cpan.org/~dbrooks/Astro-SpaceElevator-0.05/
Model a Space Elevator 
----
Audio-M4P-0.36
http://search.cpan.org/~billh/Audio-M4P-0.36/
Perl QuickTime / MP4 / iTunes Music Store audio file tools 
----
CGI-Ex-Template-XS-0.06
http://search.cpan.org/~rhandom/CGI-Ex-Template-XS-0.06/
DEPRECATED - you should now use Template::Alloy::XS 
----
Calendar-Japanese-Holiday-0.01
http://search.cpan.org/~kztomita/Calendar-Japanese-Holiday-0.01/
Japanese holidays in calender 
----
Catalyst-Engine-Wx-0.02_01
http://search.cpan.org/~eriam/Catalyst-Engine-Wx-0.02_01/
Catalyst wxPerl Engine 
----
Config-Apt-Sources-0.02
http://search.cpan.org/~iank/Config-Apt-Sources-0.02/
Parse and manipulate apt sources 
----
Cvs-Simple-0.01
http://search.cpan.org/~stephenca/Cvs-Simple-0.01/
Perl interface to cvs 
----
DJabberd-Plugin-StatusHistory-1.0
http://search.cpan.org/~markpasc/DJabberd-Plugin-StatusHistory-1.0/
records changes in status for posterity and/or display to interested parties 
----
Date-Holidays-NZ-1.01
http://search.cpan.org/~samv/Date-Holidays-NZ-1.01/
Determine New Zealand public holidays 
----
File-PathInfo-Ext-1.16
http://search.cpan.org/~leocharre/File-PathInfo-Ext-1.16/
metadata files, renaming, some other things on top of PathInfo 
----
Finance-QuoteTW-0.07
http://search.cpan.org/~alec/Finance-QuoteTW-0.07/
Fetch quotes of mutual funds in Taiwan 
----
Finance-QuoteTW-0.08
http://search.cpan.org/~alec/Finance-QuoteTW-0.08/
Fetch quotes of mutual funds in Taiwan 
----
Gas-Prices-0.0.4
http://search.cpan.org/~ashoooo/Gas-Prices-0.0.4/
Perl Module to get the gas prices around a particular zip code 
----
Geo-Query-0.01
http://search.cpan.org/~retoh/Geo-Query-0.01/
Perl extension for querying geo data. 
----
Geo-Query-LatLong-0.8001
http://search.cpan.org/~retoh/Geo-Query-LatLong-0.8001/
Perl module to query latitude and longitude from a city. 
----
HTML-SearchPage-0.02
http://search.cpan.org/~pcanaran/HTML-SearchPage-0.02/
Generic framework for web-based search pages 
----
Imager-0.59
http://search.cpan.org/~tonyc/Imager-0.59/
Perl extension for Generating 24 bit Images 
----
Locale-Maketext-Lexicon-Slurp-0.01
http://search.cpan.org/~nuffin/Locale-Maketext-Lexicon-Slurp-0.01/
One message per file Maketext lexicon. 
----
Mail-Audit-2.219
http://search.cpan.org/~rjbs/Mail-Audit-2.219/
Library for creating easy mail filters 
----
Mail-Box-2.072
http://search.cpan.org/~markov/Mail-Box-2.072/
manage a mailbox, a folder with messages 
----
Net-Amazon-Thumbnail-0.06
http://search.cpan.org/~ityndall/Net-Amazon-Thumbnail-0.06/
Use the Amazon Alexa Site Thumbnail web service 
----
Net-SIP-0.29
http://search.cpan.org/~sullr/Net-SIP-0.29/
Framework SIP (Voice Over IP, RFC3261) 
----
Net-SIP-0.30
http://search.cpan.org/~sullr/Net-SIP-0.30/
Framework SIP (Voice Over IP, RFC3261) 
----
OODoc-1.00
http://search.cpan.org/~markov/OODoc-1.00/
object oriented production of code related documentation 
----
Pod-POM-Web-1.07
http://search.cpan.org/~dami/Pod-POM-Web-1.07/
HTML Perldoc server 
----
RDF-Query-1.042
http://search.cpan.org/~gwilliams/RDF-Query-1.042/
An RDF query implementation of SPARQL/RDQL in Perl for use with RDF::Redland and RDF::Core. 
----
RDF-Query-1.043
http://search.cpan.org/~gwilliams/RDF-Query-1.043/
An RDF query implementation of SPARQL/RDQL in Perl for use with RDF::Redland and RDF::Core. 
----
Taint-Runtime-0.03
http://search.cpan.org/~rhandom/Taint-Runtime-0.03/
Runtime enable taint checking 
----
Tie-Hash-ImmutableKeys-1.13
http://search.cpan.org/~fdulau/Tie-Hash-ImmutableKeys-1.13/
Perl module to create a HASH where keys are immutable but not the leaf data. It is possible to modify the key by FORCE_STORE or FORCE_DELETE. It is working on all the tree key created (keys and subkey
----
Tie-Hash-ImmutableKeys-1.14
http://search.cpan.org/~fdulau/Tie-Hash-ImmutableKeys-1.14/
Perl module to create a HASH where keys are immutable but not the leaf data. It is possible to modify the key by FORCE_STORE or FORCE_DELETE. It is working on all the tree key created (keys and subkey
----
Tripletail-0.28
http://search.cpan.org/~hio/Tripletail-0.28/
Tripletail, Framework for Japanese Web Application 
----
XML-Bare-0.03
http://search.cpan.org/~codechild/XML-Bare-0.03/
Minimal XML parser implemented via a C++ state engine 
----
XML-Filter-Conditional-0.01
http://search.cpan.org/~pevans/XML-Filter-Conditional-0.01/
an XML SAX filter for conditionally ignoring XML content 
----
ack-1.63_02
http://search.cpan.org/~petdance/ack-1.63_02/
grep-like text finder 
----
ack-1.63_03
http://search.cpan.org/~petdance/ack-1.63_03/
grep-like text finder 
----
clearpress-1111
http://search.cpan.org/~rpettett/clearpress-1111/


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: Thu, 14 Jun 2007 15:09:38 -0700
From:  Paul Lalli <mritty@gmail.com>
Subject: Re: Perl Bug???
Message-Id: <1181858978.526058.46530@d30g2000prg.googlegroups.com>

On Jun 14, 5:07 pm, "Mike Thorland" <Mike.Thorl...@sas.com> wrote:
> I see so the even though the for loop creates a "localized" $_
> variable, it is still global and can be manipulated. After the
> for loop exits the original $_ variable is restored.

Yes.  That is what local() means.

perldoc -f local

http://perl.plover.com/FAQs/Namespaces.html

Paul Lalli




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

Date: Fri, 15 Jun 2007 02:01:43 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: Perl script to identify corrupt mbox messages?
Message-Id: <f4smvj$fs6$2@ns.felk.cvut.cz>

Tuxedo wrote:
> I'm trying to repair a gigantic mbox file that appears to have been
> corrupted in that it displays only 17 of the most recent and total
> 3087 messages contained in the actual file.
>
> The mail application used is Mozilla on Windows. The exact same error
> occurs in all Mozilla applications I tested the file with, i.e. the
> full Mozilla suite, the most recent Seamonkey and the stand-alone
> Thunderbird.
>
You can try my freeware Tbird2OE (use google). This program is not primary 
mean for recovery mbox file but if this will work and will create more then 
17 files then I can send you part of Perl code for read and parse mbox file.
-- 

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail 
from another non-spammer site please.)





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

Date: Fri, 15 Jun 2007 07:01:50 +0200
From: Tuxedo <tuxedo@mailinator.net>
Subject: Re: Perl script to identify corrupt mbox messages?
Message-Id: <f4t6fu$c6b$00$1@news.t-online.com>

Petr Vileta wrote:

[...]

> You can try my freeware Tbird2OE (use google). This program is not primary
> mean for recovery mbox file but if this will work and will create more
> then 17 files then I can send you part of Perl code for read and parse
> mbox file.

Ok, thanks. Your program converts folders from mbox format to separate .eml 
messages. I will try that to see if it recognizes all 3000+ messages in the 
mbox. With a bit of luck, it might be possible to use Mozilla's built in 
function to re-import the messages and perhaps the new folder will be fixed.



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

Date: Thu, 14 Jun 2007 23:51:38 GMT
From: "a" <a@mail.com>
Subject: regex question
Message-Id: <ewkci.28522$1i1.18404@pd7urf3no>

Hi,
str = c:/dir0/dir1/file.txt
str =~ /c:\/(.*)/
The $1 will equal to dir0/dir1/file.txt
I only want to have dir0 in $1
How should I put my regex?

Thanks




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

Date: Fri, 15 Jun 2007 00:03:37 -0000
From:  usenet@DavidFilmer.com
Subject: Re: regex question
Message-Id: <1181865817.592881.157850@i38g2000prf.googlegroups.com>

On Jun 14, 4:51 pm, "a" <a...@mail.com> wrote:
> str = c:/dir0/dir1/file.txt
> str =~ /c:\/(.*)/
> I only want to have dir0 in $1

$str =~ m{c:/(.*?)/};


--
The best way to get a good answer is to ask a good question.
David Filmer (http://DavidFilmer.com)



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

Date: Fri, 15 Jun 2007 02:21:56 GMT
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: regex question
Message-Id: <slrnf73t5f.1p3.tadmc@tadmc30.sbcglobal.net>

a <a@mail.com> wrote:

> str = c:/dir0/dir1/file.txt
> str =~ /c:\/(.*)/


Scalar variables in Perl start with a dollar character.

Statements in Perl are separated with a semicolon.

That is not Perl code.


> The $1 will equal to dir0/dir1/file.txt


Only if the pattern match *succeeds*.

If it fails, it will have whatever value it had from a previous
successful match.

You should check to see if the match succeeded before accessing
the dollar-digit variables.


> I only want to have dir0 in $1
> How should I put my regex?


if ( $str =~ m#c:/([^/]*)# ) {
   # use $1 here
}


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


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

Date: Fri, 15 Jun 2007 03:14:27 GMT
From: "W. Citoan" <wcitoan@NOSPAM-yahoo.com>
Subject: Simplify Variable Number of Regex Groups
Message-Id: <slrnf7410l.1j4.wcitoan@wcitoan-via.verizon.net>


I need to reformat portions of text.  The patterns I am matching and
their replacements are as follows:

word1 [note:word1]                          --> [word1]
word1 word2 [note:word1_word2]              --> [word1 word2]
word1 word2 word3 [note:word1_word2_word3]  --> [word1 word2 word3]

This pattern continues (word4, word5, ... wordN) with an indeterminate
maximum number of words.  I know how to replace each individual case.

For example:

  my @data = ( 
    "word1 [note:word1]",
    "word1 word2 [note:word1_word2]",
    "word1 word2 word3 [note:word1_word2_word3]",
  );

  for (@data) {
    print "$_\n";
    s/(\w+)\s\[note:(\1)\]/[$1]/g;
    s/(\w+)\s(\w+)\s\[note:(\1)_(\2)\]/[$1 $2]/g;
    s/(\w+)\s(\w+)\s(\w+)\s\[note:(\1)_(\2)_(\3)\]/[$1 $2 $3]/g;
    print "$_\n\n";
  }

produces:

  word1 [note:word1]
  [word1]

  word1 word2 [note:word1_word2]
  [word1 word2]

  word1 word2 word3 [note:word1_word2_word3]
  [word1 word2 word3]

I can obviously keep adding additional substitution lines until I have
up to the wordN case.  I would have to guess at N and keep adding if I
find larger cases.

However, I was wondering if there was anyway to simplify this so that I
can use a single (or smaller set of) substitution.  If it wasn't for the
underscores, I could use a larger grouping (example:

  s/((\w+\s)*\w+)\s\[note:(\1)\]/[$1]/g;

), but I don't see how to do it with the underscores.  I cannot simply
strip the underscores out prior to doing the substitution as any cases
without the repeating words need to be left untouched.  

Any ideas?  Am I missing something obvious?

Thanks,

- W. Citoan
-- 
First say to yourself what you would be; and then do what you have to do.
-- Epictetus


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

Date: Thu, 14 Jun 2007 20:42:14 -0700
From: Purl Gurl <purlgurl@purlgurl.net>
Subject: Re: Simplify Variable Number of Regex Groups
Message-Id: <RZydnUlo3_kPl-_bnZ2dnUVZ_jadnZ2d@giganews.com>

W. Citoan wrote:

(snipped)

> I need to reformat portions of text.  The patterns I am matching and
> their replacements are as follows:

> word1 [note:word1]                          --> [word1]
> word1 word2 [note:word1_word2]              --> [word1 word2]
> word1 word2 word3 [note:word1_word2_word3]  --> [word1 word2 word3]

> This pattern continues (word4, word5, ... wordN) with an indeterminate
> maximum number of words.  I know how to replace each individual case.

> For example:

>   my @data = ( 
>     "word1 [note:word1]",
>     "word1 word2 [note:word1_word2]",
>     "word1 word2 word3 [note:word1_word2_word3]",
>   );

>   for (@data) {

[...]

> produces:

>   word1 [note:word1]
>   [word1]

>   word1 word2 [note:word1_word2]
>   [word1 word2]

>   word1 word2 word3 [note:word1_word2_word3]
>   [word1 word2 word3]


#!perl

while (<DATA>)
  {
   print $_;
   print "[", substr ($_, 0, index ($_, "[") - 1), "]\n\n";
  }

__DATA__
word1 [note:word1]
word1 word2 [note:word1_word2]
word1 word2 word3 [note:word1_word2_word3]


PRINTED RESULTS:

word1 [note:word1]
[word1]

word1 word2 [note:word1_word2]
[word1 word2]

word1 word2 word3 [note:word1_word2_word3]
[word1 word2 word3]


-- 
Purl Gurl
--
"Then again what can you expect from a fat-assed, champagne swilling,
  half-breed just off the Rez?"
   - Joe Kline


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

Date: Fri, 15 Jun 2007 01:17:25 -0000
From:  Robert <irishhacker@gmail.com>
Subject: Types of Data Transformation Software, If You're  Looking
Message-Id: <1181870245.703018.96220@n15g2000prd.googlegroups.com>


Data transformation software, data munging software, data preparation
software, whatever you want to call it. There are many types of
different data preparation problems, so different        tools can be
better for different problems, especially if you have to deal with the
same category of data problems again and again on a daily basis. So if
you run into these obstacles, herein is a list of some options to try
out.

I'm going to say a heresy: there are some data crunching problems for
which the best solution is an all-purpose programming language. The
reason some hackers find that to be an unspeakable heresy is because I
use the word "some" , not "all". On more than one occasion, someone
has said to me "Oh hell, I can do the same thing using a 70-line
script in Python (or Perl or Ruby)". But when I asked them for such a
code example, none was provided. One guy claimed he could solve a
certain problem ( which happened to involve a many-to-many join, where
the specialized language can ask for that in one line of code) in
sixty lines of hand-coded Python or less (internally, not by
controlling a database).

A couple of people I spoke with last week felt that sometimes Awk is a
better choice than Perl for certain problems. (I consider Awk to be a
specialized programming language.)
And they are probably right.

That said, Perl has incredible power, and for a wide class of data
munging problems is the best choice.


SOME SPECIALIZED PROGRAMMING LANGUAGES, ALL OPEN SOURCE :
*******************************************************

DAP and PSPP: open source implementations for SAS and SPSS.
(in addition to statistics, these provide some data transformation
features).

Find it at: http://directory.fsf.org/math/stats

******************************************************

Vilno: data transformation software, that reads in input datasets
(rows and columns), crunches through the data, and writes out output
datasets. It's an open source application that can replace the SAS
datastep ( and also replaces proc transpose and proc means ).

Find it at: http://code.google.com/p/vilno
( look in the download section for a tarball, it's a Linux
application, can be opened up (and maybe installed) on an Apple as
well ).

*************************************************

Awk: data transformation/filtering software for semi-structured ASCII
files.
A predecessor to Perl. A real old-timer. I underestimated it. My
mistake.

Find it at: a lot of places, but try:
http://www.gnu.org/software/gawk/gawk.html

*********************************************

Any others, for data crunching problems?

***********************************************

Some, but not all , data crunching problems can be handled fairly well
by an
all-purpose programming language, such as Perl or Python or Ruby, all
three of which
are easy to find.



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

Date: Fri, 15 Jun 2007 01:55:02 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: Writing row at a time in Excel using OLE
Message-Id: <f4smvi$fs6$1@ns.felk.cvut.cz>

Ash wrote:
> On Jun 14, 2:05 pm, "anton.vanderst...@chello.nl"
> <anton.vanderst...@chello.nl> wrote:
>> Hey,
>>
>> You must look for the package Spreadsheet::WriteExcel
>> With this package you can create an Excel document realy fast.
>>
>> With the Perl listing below I  create an Excel file first and then I
>> write data in it based on an sql statement.
>> In this example I did use an connection to an Access database.
>>
>> Have fun.
>>
>> #!
>
> Thanks!But I need to modify existing Excel file and not create a new
> one.
If this is not possible then avoid a problem ;-) Open existing Excel file 
(say file1.xls) and read it, create new Excel file (file2.xls) and write 
rows from file1.xls unchanged or modified. At the end close both files and 
rename file2.xls to file1.xls.
-- 
Petr

Skype: callto://fidokomik

Na mail uvedeny v headeru zpravy nema cenu nic posilat, konci to v PR*
:-) Odpovidejte na petr na practisoft cz



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

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


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