[24743] in Perl-Users-Digest
Perl-Users Digest, Issue: 6898 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 22 21:06:03 2004
Date: Sun, 22 Aug 2004 18: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 Sun, 22 Aug 2004 Volume: 10 Number: 6898
Today's topics:
ANNOUNCE: List::Compare v0.31 (Jim Keenan)
Re: Breaking reference chians <zebee@zip.com.au>
Re: Breaking reference chians <noreply@gunnar.cc>
Re: Breaking reference chians <someone@example.com>
Re: Breaking reference chians (Anno Siegel)
Re: Breaking reference chians <nobull@mail.com>
Re: Breaking reference chians <perlman@hyperlands.net>
Re: Breaking reference chians <1usa@llenroc.ude.invalid>
Confusion of Win32::ODBC under CygWin. Please help... (MartinM)
Re: Confusion of Win32::ODBC under CygWin. Please help. <1usa@llenroc.ude.invalid>
Re: Earthquake forecasting program Aug. 16, 2004 <edgrsprj@ix.netcom.com>
Re: how to install Sybase::DBlib??? <nobull@mail.com>
How to randomize foreach (Josh)
Re: How to randomize foreach <not-for-replies@zombie.org.uk>
Re: How to randomize foreach <noreply@gunnar.cc>
Re: How to randomize foreach (Anno Siegel)
Re: How to randomize foreach <abigail@abigail.nl>
Re: How to randomize foreach <noreply@gunnar.cc>
Re: How to randomize foreach <mb@uq.net.au.invalid>
MP4::Info 1.00 released to CPAN <noone@nowhere.stonehenge.com>
Re: Recursively copying a directory <nospam@bigpond.com>
Re: start some actions with Perl without Cron? <tadmc@augustmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 22 Aug 2004 13:06:57 GMT
From: jkeen_via_google@yahoo.com (Jim Keenan)
Subject: ANNOUNCE: List::Compare v0.31
Message-Id: <I2vJn4.D7F@zorch.sf-bay.org>
Version 0.31 of Perl extension List-Compare is now available on CPAN,
e.g., http://search.cpan.org/~jkeenan/List-Compare-0.31/
In this version two new methods, get_unique_all() and
get_complement_all(), make their debut. For a series of lists,
get_unique_all() returns an array of arrays identifying the items
unique to each list. get_complement_all() works analogously.
Identically named functions are also available in the functional
interface, List::Compare::Functional. The lists being examined may be
passed to the constructor or functions via arrays or via seen-hashes.
This version of List-Compare followed a 'test-driven' model of
development more than earlier versions. Paul Johnson's Devel::Cover
module was used to analyze how well the test suite covered the
module's code. This led to over 3300 tests being added to the test
suite.
Jim Keenan
------------------------------
Date: Sun, 22 Aug 2004 10:21:44 GMT
From: Zebee Johnstone <zebee@zip.com.au>
Subject: Re: Breaking reference chians
Message-Id: <slrncigsjf.fag.zebee@zeus.zipworld.com.au>
In comp.lang.perl.misc on Sun, 22 Aug 2004 09:48:19 GMT
Mark Keightley <perlman@hyperlands.net> wrote:
> hash. I've written a sub routine that reads the key value pairs and
> then returns a reference to this hash. The problem is that because
> there is a reference back to this hash, even with it being a local hash
> (created with my) to that sub, it never goes out of scope. Hence only
> the first section of the main config hash is correct. Section 2 has
> keys and values for both sections 1 and 2, section 3 has 1,2 and 3 etc.
NO idea how you are working out what pairs go with what section name,
but...
Can you read the pairs for a section into a hash local to the
subroutine, then put that hash into the main one?
so you pass $mainhash, work on $localhash, then put the stuff in
$localhash into $mainhash and pass $mainhash back.
Zebee
------------------------------
Date: Sun, 22 Aug 2004 12:19:59 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Breaking reference chians
Message-Id: <2oradkFdo5q1U1@uni-berlin.de>
Mark Keightley wrote:
> The config is then held in a hash of hashes. The problem I'm
> having is getting the hash with the key value pairs stored in the
> main config hash. I've written a sub routine that reads the key
> value pairs and then returns a reference to this hash. The
> problem is that because there is a reference back to this hash,
> even with it being a local hash (created with my) to that sub, it
> never goes out of scope. Hence only the first section of the main
> config hash is correct. Section 2 has keys and values for both
> sections 1 and 2, section 3 has 1,2 and 3 etc.
Speak less English and more Perl!!
Please post a short but complete program that illustrates the problem.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Sun, 22 Aug 2004 11:21:46 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: Breaking reference chians
Message-Id: <el%Vc.44891$X12.23803@edtnps84>
Mark Keightley wrote:
>
> I'm currently writing a script to read windows style config files. You
> know the sort of file that reads like this
>
> [section name]
> key1 = value1
> key2 = value2
>
> [another section name]
> ...
This appears to do what you want (tested on C:\WINDOWS\WIN.INI):
use warnings;
use strict;
use Data::Dumper;
my $file = '/mnt/windows/WINDOWS/WIN.INI';
open my $IN, '<', $file or die "Cannot open $file: $!";
my ( $section, %data );
while ( <$IN> ) {
next unless /\S/;
s/\s+\Z//; # used this instead of chomp because of Windows newline
if ( /^\[(.+)\]$/ ) {
$section = $1;
next;
}
my ( $key, $val ) = split /\s*=\s*/, $_, 2;
$data{ $section }{ $key } = $val;
}
print Dumper \%data;
__END__
John
--
use Perl;
program
fulfillment
------------------------------
Date: 22 Aug 2004 12:02:13 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Breaking reference chians
Message-Id: <cga205$pai$1@mamenchi.zrz.TU-Berlin.DE>
Mark Keightley <perlman@hyperlands.net> wrote in comp.lang.perl.misc:
> Hi
>
> I'm currently writing a script to read windows style config files. You
> know the sort of file
No, I don't.
> that reads like this
>
> [section name]
> key1 = value1
> key2 = value2
>
> [another section name]
> ...
Aha.
> The config is then held in a hash of hashes. The problem I'm having is
[snip lots of prose]
Show your code instead of a verbal description.
Assuming a moderate amount of data and standard line feeds, this
reads a file structured as you describe into a HoH %h:
my ( undef, %h) = split /\[(.*?)\]\n/, do { local $/; <DATA> };
$_ = { map split( /\s*=\s*/), split /\n/ } for values %h;
The first line builds a hash whose keys are the section names and
whose values are (multiline) strings containing the key/value pairs.
The second line transforms each set of key/value pairs into the equivalent
hash.
Anno
------------------------------
Date: Sun, 22 Aug 2004 13:08:19 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: Breaking reference chians
Message-Id: <cga2bm$bev$1@slavica.ukpost.com>
Mark Keightley wrote:
> I'm currently writing a script to read windows style config files.
Is this a learning exercise or is there some other reason you don't just
use one of the modules on CPAN that do this?
> So to my question how do I copy data using references,
> but keep the copies detached from each other?
This is FAQ: "How do I [...] copy a recursive data structure?"
------------------------------
Date: Sun, 22 Aug 2004 13:16:13 GMT
From: Mark Keightley <perlman@hyperlands.net>
Subject: Re: Breaking reference chians
Message-Id: <x01Wc.188813$28.166204@fe1.news.blueyonder.co.uk>
Mark Keightley wrote:
> Hi
>
> I'm currently writing a script to read windows style config files. You
> know the sort of file that reads like this
>
> [section name]
> key1 = value1
> key2 = value2
...
Thanks to for all the responses, and sorry for the lack of code (it was
a bit of a mess!). It turns out the way I was going the long way around
for the soluiton. You live and learn. I've now used the exmaple given
John W Krahn as the bais for my script, which yes was done purly as an
excercise.
Thanks again to all.
------------------------------
Date: 22 Aug 2004 15:50:01 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Breaking reference chians
Message-Id: <Xns954D7861D7844asu1cornelledu@132.236.56.8>
Mark Keightley <perlman@hyperlands.net> wrote in
news:x01Wc.188813$28.166204@fe1.news.blueyonder.co.uk:
> I've now used the exmaple given John W Krahn as the
> bais for my script, which yes was done purly as an
> excercise.
See also:
http://search.cpan.org/~sherzodr/Config-Simple-4.56/Simple.pm
http://search.cpan.org/~wadg/Config-IniFiles-2.38/IniFiles.pm
--
A. Sinan Unur
1usa@llenroc.ude.invalid
(remove '.invalid' and reverse each component for email address)
------------------------------
Date: 22 Aug 2004 04:03:05 -0700
From: martin.mrazek@email.cz (MartinM)
Subject: Confusion of Win32::ODBC under CygWin. Please help...
Message-Id: <2e189192.0408220303.3d16519c@posting.google.com>
Hi,
I use Perl under Cygwin. I need to use Win32::ODBC. It is located
in
c:\cygwin\lib\perl5\site_perl\5.8.2\cygwin-thread-multi-64int\Win32\ODBC.pm
but this path is not in @INC. There are just links 5.8.5 not 5.8.2
in the @INC and (to my surprise), the 5.8.5/cygwin-thread-multi-64int
is completely empty.
The @INC includes:
/usr/lib/perl5/5.8.5/cygwin-thread-multi-64int
/usr/lib/perl5/5.8.5
/usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int
/usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.5/cygwin-thread-multi-64int
/usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl
So the execution of code with use Win32::ODBC; ends up with
Can't locate Win32/ODBC...
If I copy content of 5.8.2/ into 5.8.5 it results with error
Can't load the
/usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/Win32/ODBC/ODBC.dll
for module Win32/ODBC: dlopen: Win32 error 126 at
/usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/Dynaloader.pm
line 230
Please, can you send a piece of advice to me?
Martin
------------------------------
Date: 22 Aug 2004 15:47:27 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Confusion of Win32::ODBC under CygWin. Please help...
Message-Id: <Xns954D77F287943asu1cornelledu@132.236.56.8>
martin.mrazek@email.cz (MartinM) wrote in
news:2e189192.0408220303.3d16519c@posting.google.com:
> Hi,
>
> I use Perl under Cygwin. I need to use Win32::ODBC. It is located
> in
>
> c:\cygwin\lib\perl5\site_perl\5.8.2\cygwin-thread-multi-64int\Win32\ODB
> C.pm
>
> but this path is not in @INC. There are just links 5.8.5 not 5.8.2
> in the @INC and (to my surprise), the 5.8.5/cygwin-thread-multi-64int
> is completely empty.
>
...
>
> So the execution of code with use Win32::ODBC; ends up with
> Can't locate Win32/ODBC...
>
> If I copy content of 5.8.2/ into 5.8.5 it results with error
>
> Can't load the
> /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/auto/Win32/ODB
> C/ODBC.dll for module Win32/ODBC: dlopen: Win32 error 126 at
> /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int/Dynaloader.pm
> line 230
>
> Please, can you send a piece of advice to me?
What is the output of perl -v?
It looks like your Win32::ODBC was compiled for perl 5.8.2 whereas you
have perl 5.8.5. You need probably need to reinstall Win32::ODBC.
--
A. Sinan Unur
1usa@llenroc.ude.invalid
(remove '.invalid' and reverse each component for email address)
------------------------------
Date: Sun, 22 Aug 2004 13:13:12 GMT
From: "edgrsprj" <edgrsprj@ix.netcom.com>
Subject: Re: Earthquake forecasting program Aug. 16, 2004
Message-Id: <IZ0Wc.7711$2L3.6453@newsread3.news.atl.earthlink.net>
"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrncieja1.48o.tadmc@magna.augustmail.com...
> edgrsprj <edgrsprj@ix.netcom.com> wrote:
>
> > *** Is Perl the best language to use for this application?
>
> No.
>
> Python would be much much better for your task.
>
Pascal has been mentioned before as a more appropriate language. So has
Ruby. I looked at both briefly and did not see where anything would be
gained by switching. However if a formal effort gets stared then that would
be the time to make a decision on that.
> > I am going to state the following once more.
> WTF for?
The reason for repeating this is the following:
Right now this effort needs to have an organized group get the computer
programming part moving along. There are individual programmers who are
interested in helping. But I don't presently have time to direct their
efforts. I have been saying this so that other people would be aware that
this is what is needed. And if they hear about any groups interested in
such a project then they might remember what I said and let that group know
about this.
Motivation:
Just looking at the U.S. alone I have seen projections which state that a
devastating earthquake could produce 10,000 fatalities and result in 100
billion U.S. dollars worth of damage and lost productivity. I did my own
informal projection on a worse case earthquake and arrived at perhaps
100,000 or more fatalities and as much as a half trillion dollars or more
worth of damage and lost productivity. Basically, such an earthquake or a
series of major earthquakes in the U.S. in a short period of time could have
a devastating impact on the U.S. economy. And that would quickly begin to
affect the economy of other countries which have economic ties with the U.S.
And so, my posts are recommending to people around the world, "Make progress
now if that is possible. Don't wait until the ground is starting to shake."
------------------------------
Date: Sun, 22 Aug 2004 13:25:29 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: how to install Sybase::DBlib???
Message-Id: <cga3bp$bhk$1@slavica.ukpost.com>
yubo he wrote:
> hey, I am using activate perl in windows,
I think you mean ActiveState.
> I used ppm to install Sybase::DBlib
I think you mean "I failed to..."
> error: could not locate a PPD file for package Sybase-DBlib
In PPM unlike CPAN you need to specify the distribution name not the
module name in the install command.
Often the distribution name is the same as the module name with '::'
replaced by '-' so if you type something that looks like a module name
then PPM will try that but this is only a heuristic that works occasionally.
Looking on http://search.cpan.org/ I found that the distribution that
contains Sybase::DBlib is sybperl.
I don't know if its on the ActiveState's PD repository.
------------------------------
Date: 22 Aug 2004 09:27:43 -0700
From: jlincoln3@hotmail.com (Josh)
Subject: How to randomize foreach
Message-Id: <be933455.0408220827.61eb5840@posting.google.com>
I have an array that I need to cycle through once, but in a random
order. For now I'm dumping the variables into a hash, pulling a random
number, retrieving that value, using it, deleting it, and repeating
the process until there are no more members in the hash. This
obviously won't be efficient with a large set. Seems there must be a
better way.
Here's what I'm currently doing:
%sections = (
'0'=>'x',
'1'=>'t',
'2'=>'m',
'3'=>'v'
);
$count_sect = (keys %sections); # counts the sections in the keys
do {
$rand_sect = int(rand($count_sect)); # generates a random integer <
$count_sect
print 'key:'.$rand_sect."\n";
if (exists $sections{$rand_sect})
{ $sect=$sections{$rand_sect};
print "SECTION:".$sect."\n"; # do things with the returned section
delete $sections{$rand_sect};
}
else
{ print '-key non existent'."\n";}
} until (!keys %sections);
Anyone have suggestions for improvement? Thanks.
------------------------------
Date: Sun, 22 Aug 2004 16:49:04 GMT
From: Brian Greenfield <not-for-replies@zombie.org.uk>
Subject: Re: How to randomize foreach
Message-Id: <ehjhi01kp36fhpkp1377daoni0jntn08dm@4ax.com>
On 22 Aug 2004 09:27:43 -0700, jlincoln3@hotmail.com (Josh) wrote:
>I have an array that I need to cycle through once, but in a random
>order.
perldoc -q shuffle
------------------------------
Date: Sun, 22 Aug 2004 19:19:29 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: How to randomize foreach
Message-Id: <2os31sFdsvsvU1@uni-berlin.de>
Josh wrote:
> I have an array that I need to cycle through once, but in a random
> order. For now I'm dumping the variables into a hash, pulling a
> random number, retrieving that value, using it, deleting it, and
> repeating the process until there are no more members in the hash.
> This obviously won't be efficient with a large set. Seems there
> must be a better way.
This is at least significantly less code:
my @arr = qw/x t m v/;
print splice(@arr, rand $_, 1) for reverse 1 .. @arr;
As Brian suggested, you should also read the applicable FAQ entry,
especially if your array is large.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 22 Aug 2004 18:47:35 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How to randomize foreach
Message-Id: <cgapo7$82q$1@mamenchi.zrz.TU-Berlin.DE>
Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in comp.lang.perl.misc:
> Josh wrote:
> > I have an array that I need to cycle through once, but in a random
> > order. For now I'm dumping the variables into a hash, pulling a
> > random number, retrieving that value, using it, deleting it, and
> > repeating the process until there are no more members in the hash.
> > This obviously won't be efficient with a large set. Seems there
> > must be a better way.
>
> This is at least significantly less code:
>
> my @arr = qw/x t m v/;
> print splice(@arr, rand $_, 1) for reverse 1 .. @arr;
Or even
print splice(@arr, rand @arr, 1) while @arr;
> As Brian suggested, you should also read the applicable FAQ entry,
> especially if your array is large.
There is also List::Util::shuffle, ready to use.
Anno
------------------------------
Date: 22 Aug 2004 22:27:22 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: How to randomize foreach
Message-Id: <slrncii7ea.q3p.abigail@alexandra.abigail.nl>
Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMMMIX September
MCMXCIII in <URL:news:cgapo7$82q$1@mamenchi.zrz.TU-Berlin.DE>:
%% Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in comp.lang.perl.misc:
%% > Josh wrote:
%% > > I have an array that I need to cycle through once, but in a random
%% > > order. For now I'm dumping the variables into a hash, pulling a
%% > > random number, retrieving that value, using it, deleting it, and
%% > > repeating the process until there are no more members in the hash.
%% > > This obviously won't be efficient with a large set. Seems there
%% > > must be a better way.
%% >
%% > This is at least significantly less code:
%% >
%% > my @arr = qw/x t m v/;
%% > print splice(@arr, rand $_, 1) for reverse 1 .. @arr;
%%
%% Or even
%%
%% print splice(@arr, rand @arr, 1) while @arr;
Let's not. Splicing out elements one-by-one of an array is very
inefficient. Shuffling can be done in linear time, while the splice
method takes time quadratic in the length of the array.
It's even worse than suggesting to use Bubblesort to sort an array.
See also http://www.perlmonks.org/index.pl?node_id=349969
Abigail
--
perl -wlpe '}$_=$.;{' file # Count the number of lines.
------------------------------
Date: Mon, 23 Aug 2004 01:38:11 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: How to randomize foreach
Message-Id: <2osp9sFeda8lU1@uni-berlin.de>
Abigail wrote:
> Anno Siegel wrote:
>> Gunnar Hjalmarsson wrote:
>>>
>>> my @arr = qw/x t m v/;
>>> print splice(@arr, rand $_, 1) for reverse 1 .. @arr;
>>
>> Or even
>>
>> print splice(@arr, rand @arr, 1) while @arr;
>
> Let's not. Splicing out elements one-by-one of an array is very
> inefficient.
Yeah, that's what the FAQ says, too. OTOH, I measured the speed with
help of the Benchmark module, and code that created the array
my @arr = 1 .. 5000;
and then spliced it randomly using those inefficient methods, run
about 15 times per second. So, if you don't have a really big array,
or are about to run it very frequently, is there anything wrong with
keeping it simple?
> Shuffling can be done in linear time, while the splice
> method takes time quadratic in the length of the array.
I measured with the List::Util::shuffle() function, too, and it run
about 70 times per second. However, when I included loading of the
module in the benchmark, the overall speed was reduced to 12 times per
second, i.e. slightly slower than the slice() method...
use Benchmark 'cmpthese';
my %oldINC = %INC;
cmpthese -5, {
'splice()' => sub {
my @arr = 1 .. 5000;
my @shuffled;
push @shuffled, splice(@arr, rand @arr, 1) while @arr;
},
'shuffle()' => sub {
my @arr = 1 .. 5000;
%INC = %oldINC;
require List::Util;
my @shuffled = List::Util::shuffle(@arr);
},
};
Output including module loading:
Rate shuffle() splice()
shuffle() 12.0/s -- -23%
splice() 15.5/s 30% --
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Mon, 23 Aug 2004 10:19:06 +1000
From: Matthew Braid <mb@uq.net.au.invalid>
Subject: Re: How to randomize foreach
Message-Id: <cgbd5q$j40$1@bunyip.cc.uq.edu.au>
Gunnar Hjalmarsson wrote:
> I measured with the List::Util::shuffle() function, too, and it run
> about 70 times per second. However, when I included loading of the
> module in the benchmark, the overall speed was reduced to 12 times per
> second, i.e. slightly slower than the slice() method...
>
> use Benchmark 'cmpthese';
> my %oldINC = %INC;
>
> cmpthese -5, {
> 'splice()' => sub {
> my @arr = 1 .. 5000;
> my @shuffled;
> push @shuffled, splice(@arr, rand @arr, 1) while @arr;
> },
> 'shuffle()' => sub {
> my @arr = 1 .. 5000;
> %INC = %oldINC;
> require List::Util;
> my @shuffled = List::Util::shuffle(@arr);
> },
> };
>
> Output including module loading:
>
> Rate shuffle() splice()
> shuffle() 12.0/s -- -23%
> splice() 15.5/s 30% --
>
Odd. I just tried the same thing (well, I added a third option - sort
{int(rand(3)) - 1} @arr - to double check:
use Benchmark 'cmpthese';
my %oldINC = %INC;
cmpthese -5, {
'splice()' => sub {
my @arr = 1..5000;
my @shuffled;
push @shuffled, splice(@arr, rand @arr, 1) while @arr;
},
'shuffle()' => sub {
my @arr = 1..5000;
%INC = %oldINC;
require List::Util;
my @shuffled = List::Util::shuffle(@arr);
},
'rand()' => sub {
my @arr = 1..5000;
my @shuffled = sort {int(rand(3)) - 1} @arr;
}
};
and I got:
Rate rand() splice() shuffle()
rand() 23.1/s -- -47% -88%
splice() 43.3/s 87% -- -77%
shuffle() 189/s 719% 338% --
Where shuffle was the clear winner by a mile.... Normally I'd say YMMV, but this
seems like a slightly over the top difference. I'm using an slightly old perl
(5.8.1) - maybe something is different between our versions?
MB
------------------------------
Date: Sat, 21 Aug 2004 23:45:24 GMT
From: Jonathan Harris <noone@nowhere.stonehenge.com>
Subject: MP4::Info 1.00 released to CPAN
Message-Id: <I2vJnD.9Ey@zorch.sf-bay.org>
The first release of MP4::Info has been made to CPAN.
http://search.cpan.org/~jhar/MP4-Info/
>From the README:
======================================================================
NAME
MP4::Info - Fetch info from MPEG-4 files (.mp4, .m4a, .m4p)
======================================================================
DESCRIPTION
The MP4::Info module can be used to extract tag and file information
from MPEG-4 files. It is designed as a drop-in replacement for
MP3::Info.
Note that this module does not allow you to update the information
in MPEG-4 files.
======================================================================
SYNOPSIS
use MP4::Info;
my $file = 'Pearls_Before_Swine.m4a';
my $tag = get_mp4tag($file) or die "No TAG info";
printf "$file is a %s track\n", $tag->{GENRE};
my $info = get_mp4info($file);
printf "$file length is %d:%d\n", $info->{MM}, $info->{SS};
my $mp4 = new MP4::Info $file;
printf "$file length is %s, title is %s\n",
$mp4->time, $mp4->title;
======================================================================
INSTALLATION
See the INSTALL file for details.
======================================================================
AUTHOR
Jonathan Harris <jhar at cpan.org>
======================================================================
SEE ALSO
Latest version is available from:
http://search.cpan.org/~jhar/MP4-Info/
======================================================================
COPYRIGHT and LICENSE
Copyright (c) 2004, Jonathan Harris <jhar at cpan.org>
This program is free software; you can redistribute it and/or modify it
under the the same terms as Perl itself.
------------------------------
Date: Mon, 23 Aug 2004 10:54:27 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: Recursively copying a directory
Message-Id: <2osti4Fdu2nnU2@uni-berlin.de>
Lénaïc Huard wrote:
> -----BEGIN xxx SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> I'm looking for a way to copy a directory and all its content with perl ;
> that is to say the perl function equivalent to the "cp -R" Unix command.
Why reinvent the wheel? I use system all the time
system("cp -R dir1 dir2");
gtoomey
------------------------------
Date: Sun, 22 Aug 2004 06:42:10 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: start some actions with Perl without Cron?
Message-Id: <slrncih1ki.gl0.tadmc@magna.augustmail.com>
Pinocchio <krakle@visto.com> wrote:
> What's wrong with cron?
It is spelled wrong.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
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 6898
***************************************