[30801] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2046 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Dec 10 03:09:43 2008

Date: Wed, 10 Dec 2008 00:09:06 -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           Wed, 10 Dec 2008     Volume: 11 Number: 2046

Today's topics:
    Re: executing unix command on a diff domain <slick.users@gmail.com>
    Re: executing unix command on a diff domain <glennj@ncf.ca>
    Re: Mathematica 7 compares to other languages <xahlee@gmail.com>
    Re: Mathematica 7 compares to other languages <wuwei23@gmail.com>
    Re: Mathematica 7 compares to other languages sln@netherlands.com
    Re: Mathematica 7 compares to other languages sln@netherlands.com
        Need help parsing <trezaei@gmail.com>
    Re: Need help parsing <jurgenex@hotmail.com>
    Re: Need help parsing <tadmc@seesig.invalid>
    Re: Need help parsing sln@netherlands.com
        new CPAN modules on Wed Dec 10 2008 (Randal Schwartz)
    Re: ordered hashes <uri@stemsystems.com>
    Re: Trouble with Net::Ping <No_4@dsl.pipex.com>
    Re: Using integers up to 0xFFFFFFFFFFFFFFFF sln@netherlands.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 9 Dec 2008 16:09:14 -0800 (PST)
From: Slickuser <slick.users@gmail.com>
Subject: Re: executing unix command on a diff domain
Message-Id: <fc9c8800-c3a3-439a-a856-72119d6fa248@g1g2000pra.googlegroups.com>

Doesn't work if I have my configuration save in a .txt file.
Search for it, assign to variable and do a chomp on it.

$ws 		user@xxx.yyy.zzz.com
$server		/server/folder/a/b
$local		/local/a/b/c


WORK:
my $cmd1 =3D "ssh $ws ls $server";
`$command_ssh`;

my @exec =3D "rsync -e ssh -avz user\@xxx.yyy.zzz.com:/server/folder/a/
b /local/a/b/c ";
print "@exec \n";
system(@exec);


DOESN'T WORK:
I think it has to do with @a in the user name & :. How can I fix this?
I have try qq, qw.

my @exec =3D "rsync -e ssh -avz $ws:$server $local ";
print "@exec \n";
system(@exec);


On Dec 9, 12:37=A0pm, Glenn Jackman <gle...@ncf.ca> wrote:
> At 2008-12-09 02:07PM, "Slickuser" wrote:
>
> > =A0my $workstation =3D "xxx\@domain.com";
> > =A0my $source_dir =3D "/aaa/bbb/ccc/ddd/"; #remote
> > =A0my $destination_dir =3D "/xxx/yyy/zzz/"; #local
>
> > =A0my $command1 =3D "rsync $source_dir $destination_dir";
> > =A0my $command2 =3D "ssh $workstation $command1";
>
> > =A0`$command2`;
>
> > =A0How can I achieve that when my $source_dir on a remote server. I wan=
t
> > =A0to rsync to destination which is not remote.
>
> You probably want:
>
> =A0 =A0 my @cmd =3D qw( rsync -e ssh remoteuser@remotehost:/remote/dir /l=
ocal/dir );
> =A0 =A0 system(@cmd) =3D=3D 0 or die "return value from system call: $?";
>
> --
> Glenn Jackman
> =A0 =A0 Write a wise saying and your name will live forever. -- Anonymous



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

Date: 10 Dec 2008 04:56:53 GMT
From: Glenn Jackman <glennj@ncf.ca>
Subject: Re: executing unix command on a diff domain
Message-Id: <slrngjuj0m.2cv.glennj@smeagol.ncf.ca>

At 2008-12-09 07:09PM, "Slickuser" wrote:
>  On Dec 9, 12:37 pm, Glenn Jackman <gle...@ncf.ca> wrote:
> > my @cmd = qw( rsync -e ssh remoteuser@remotehost:/remote/dir /local/dir );
> > system(@cmd) == 0 or die "return value from system call: $?";
>
>  DOESN'T WORK:
>  I think it has to do with @a in the user name & :. How can I fix this?
>  I have try qq, qw.
>  
>  my @exec = "rsync -e ssh -avz $ws:$server $local ";
>  print "@exec \n";
>  system(@exec);


You didn't pay attention to my quoting.

How exactly does it not work?  What errors do you see?

-- 
Glenn Jackman
    Write a wise saying and your name will live forever. -- Anonymous


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

Date: Tue, 9 Dec 2008 15:19:47 -0800 (PST)
From: Xah Lee <xahlee@gmail.com>
Subject: Re: Mathematica 7 compares to other languages
Message-Id: <986b6ea1-efba-4146-9704-5f9e3787c26a@a37g2000pre.googlegroups.com>

On Dec 8, 4:07 am, Jon Harrop <j...@ffconsultancy.com> wrote:
> s...@netherlands.com wrote:
> > Well, its past 'tonight' and 6 hours to go till past 'tomorrow'.
> > Where the hell is it Zah Zah?
>
> Note that this program takes several days to compute in Mathematica (even
> though it takes under four seconds in other languages) so don't expect to
> see a genuinely optimized version any time soon... ;-)

Note that Jon's Mathematica code is of very poor quality, as i've
given detailed analysis here:

=E2=80=A2 A Mathematica Optimization Problem
  http://xahlee.org/UnixResource_dir/writ/Mathematica_optimization.html

I'm not sure he's intentionally making Mathematica look bad or just
sloppiness. I presume it is sloppiness, since the Mathematica code is
not shown in his public website on this speed comparison issue. (as
far as i know) I suppose, he initialled tried this draft version, saw
that it is too slow for comparsion, and probably among other reason he
didn't include it in the speed comparison. However, in this thread
about Mathematica 7, he wanted to insert his random gribe to pave
roads to post his website books and url on OCml/f#, so he took out
this piece of Mathematica to bad mouth it and bait. He ignored my
paypal challenge, but it so happens that someone else paid me $20 to
show a better code, and in the showdown, Jon went defensive that just
make him looking like a major idiot.

  Xah
=E2=88=91 http://xahlee.org/

=E2=98=84


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

Date: Tue, 9 Dec 2008 16:09:45 -0800 (PST)
From: alex23 <wuwei23@gmail.com>
Subject: Re: Mathematica 7 compares to other languages
Message-Id: <f66d3b84-e72a-4cd8-9d53-18b3a8484e53@i20g2000prf.googlegroups.com>

On Dec 10, 9:19=A0am, Xah Lee <xah...@gmail.com> wrote:
> I'm not sure he's intentionally making Mathematica look bad or just
> sloppiness.

Actually, there's only one person here tainting Mathematica by
association, and it's not Jon.


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

Date: Wed, 10 Dec 2008 02:09:00 GMT
From: sln@netherlands.com
Subject: Re: Mathematica 7 compares to other languages
Message-Id: <j39uj4l4o7vq2n18394pfvm0eg8oqt6qog@4ax.com>

On Tue, 9 Dec 2008 15:19:47 -0800 (PST), Xah Lee <xahlee@gmail.com> wrote:

>On Dec 8, 4:07 am, Jon Harrop <j...@ffconsultancy.com> wrote:
>> s...@netherlands.com wrote:
>> > Well, its past 'tonight' and 6 hours to go till past 'tomorrow'.
>> > Where the hell is it Zah Zah?
>>
>> Note that this program takes several days to compute in Mathematica (even
>> though it takes under four seconds in other languages) so don't expect to
>> see a genuinely optimized version any time soon... ;-)
>
>Note that Jon's Mathematica code is of very poor quality, as i've
>given detailed analysis here:
>
>• A Mathematica Optimization Problem
>  http://xahlee.org/UnixResource_dir/writ/Mathematica_optimization.html
>
>I'm not sure he's intentionally making Mathematica look bad or just
>sloppiness. I presume it is sloppiness, since the Mathematica code is
>not shown in his public website on this speed comparison issue. (as
>far as i know) I suppose, he initialled tried this draft version, saw
>that it is too slow for comparsion, and probably among other reason he
>didn't include it in the speed comparison. However, in this thread
>about Mathematica 7, he wanted to insert his random gribe to pave
>roads to post his website books and url on OCml/f#, so he took out
>this piece of Mathematica to bad mouth it and bait. He ignored my
>paypal challenge, but it so happens that someone else paid me $20 to
>show a better code, and in the showdown, Jon went defensive that just
>make him looking like a major idiot.
>
>  Xah
>? http://xahlee.org/
>
>?
Ad hominem



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

Date: Wed, 10 Dec 2008 02:46:02 GMT
From: sln@netherlands.com
Subject: Re: Mathematica 7 compares to other languages
Message-Id: <nabuj418t5o4l6rmjli2i41315bv72ema3@4ax.com>

On Tue, 9 Dec 2008 15:01:11 -0800 (PST), Xah Lee <xahlee@gmail.com> wrote:

>
>On Dec 8, 4:56 pm, Jon Harrop <j...@ffconsultancy.com> wrote:
>> Xah Lee wrote:
>> > A moron, wrote:
>> > > You failed the challenge that you were given.
>>
>> > you didn't give me a challenge.
>>
>> Thomas gave you the challenge:
>>
>>   "What I want in return is you to execute and time Dr. Harrop's original
>> code, posting the results to this thread... By Dr. Harrop's original code,
>> I specifically mean the code he posted to this thread. I've pasted it below
>> for clarity.".
>>
>> Thomas even quoted my code verbatim to make his requirements totally
>> unambiguous. Note the parameters [9, 512, 4] in the last line that he and I
>> both gave:
>>
>>   AbsoluteTiming[Export["image.pgm", Graphics@Raster@Main[9, 512, 4]]]
>>
>> You have not posted timings of that, let alone optimized it. So you failed.
>
>The first parameter to your Main specifies some kinda recursively
>stacked spheres in the rendered image. The second parameter is the
>width and height of the pixels in the rendered image.
>
>I tried to run them but my computer went 100% cpu and after i recall 5
>min its still going. So, i reduced your input. In the end, with
>reduced input, it shows my code is 5 times faster (running Mathematica
>v4 on OS X 10.4.x with PPC 1.9 GHz), and on the other guy's computer
>with Mathematica 6 he says it's twice as fast.
>
>Given your code's nature, it is reasonably to assume that with your
>original input my code would still be faster than yours. You claim it
>is not or that it is perhaps just slightly faster?
>
>It is possible you are right. I don't want to spend the energy to run
>your code and my code and possible hog my computer for hours or
>perhaps days. As i said, your recursive Intersect is very badly
>written Mathematica code. It might even start memory swapping.
>
>Also, all you did is talking bullshit. Thomas actually is the one took
>my challenge to you and gave me $20 to prove my argument to YOU. His
>requirement, after the payment, is actually, i quote:
>
>«Alright, I've sent $20. The only reason I would request a refund is
>if you don't do anything. As long as you improve the code as you've
>described and post the results, I'll be satisfied. If the improvements
>you've described don't result in better performance, that's OK.»
>
>He haven't posted since nor emailed me. It is reasonable to assume he
>is satisfied as far as his payment to me to see my code goes.
>
>You, kept on babbling. Now you say that the input is different. Fine.
>How long does that input actually take on your computer? If days, i'm
>sorry i cannot run your toy code on my computer for days. If in few
>hours, i can then run the code overnight, and if necessary, give you
>another version that will be faster with your given input to shut you
>the fuck up.
>
>However, there's cost to me. What do i get to do your homework? It is
>possible, that if i spend the energy and time to do this, then you
>again refuse to acknowledge it, or kept on complaining about something
>else.
>
>You see, newsgroup is the bedrock of bullshit. You bullshit, he
>bullshits, everybody brags and bullshit because there is no stake. I
>want sincerity and responsibility backed up, with for example paypal
>deposits. You kept on bullshitting, Thomas gave me $20 and i produced
>a code that reasonably demonstrated at least how unprofessional your
>Mathematica code was.
>
>Here's the deal. Pay me $20, then i'll creat a version of Mathematica
>code that has the same input as yours. Your input is Main[9, 512, 4],
>as i have exposed, your use of interger in the last part for numerical
>computation is Mathematica incompetence. You didn't acknowledge even
>this. I'll give a version of Mathematica with input Main[9, 512, 4.]
>that will run faster than yours. If not, money back guaranteed. Also,
>pay me $300, then i can produce a Mathematica version no more than 10
>times slower than your OCaml code, this should be a 70000 times
>improvement according to you. Again, money back guarantee.
>
>If i don't receive $20 or $300, this will be my last post to you in
>this thread. You are just a bullshitter.
>
>O wait... my code with Main[9, 512, 4.] and other numerical changes
>already makes your program run faster regardless of the input size.
>What a motherfucking bullshit you are. Scratch the $20. The $300
>challenge still stands firm.
>
>  Xah
>? http://xahlee.org/
>
>?
Ad hominem


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

Date: Tue, 9 Dec 2008 19:14:43 -0800 (PST)
From: TR <trezaei@gmail.com>
Subject: Need help parsing
Message-Id: <3dd8ce46-c8a1-4c5b-995b-87fa924e6490@f3g2000yqf.googlegroups.com>

Hi everyone,
Sorry I'm kind of a noob.

I have the following string:

'/lawprod9/law/print/jimmy/iadj41508b/1'

and I need to parse out the word jimmy. So I tried:

$printdir='/lawprod9/law/print';
$string='/lawprod9/law/print/jimmy/iadj41508b/1';
$string=~ m/$printdir\/(.*)\/(.*)/o;

print "$1, $2";

thinking it would output:

jimmy, iadj41508b/1

but it outputs:

jimmy/iadj41508b, 1


So it thinks the last slash is the one I'm interested in. So the
$printdir is always the same but after that it changes and it can be
deeper or less deep that the sample line above.
Can anyone help me with this? Thanks.

Oh, I need the stuff after Jimmy to go to another variable ideally.


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

Date: Tue, 09 Dec 2008 20:08:34 -0800
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Need help parsing
Message-Id: <q5guj41cv4qnjdfg0kfq96p975dmtsb59q@4ax.com>

TR <trezaei@gmail.com> wrote:
>I have the following string:
>'/lawprod9/law/print/jimmy/iadj41508b/1'
>
>and I need to parse out the word jimmy. So I tried:
>Oh, I need the stuff after Jimmy to go to another variable ideally.

my $in = '/lawprod9/law/print/jimmy/iadj41508b/1';

my ($jimmy, $other) = (split('/', $in, 6))[-2, -1];
print "\$jimmy: $jimmy\n";
print "\$other: $other\n";


jue


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

Date: Tue, 9 Dec 2008 22:17:50 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Need help parsing
Message-Id: <slrngjugne.u9v.tadmc@tadmc30.sbcglobal.net>

TR <trezaei@gmail.com> wrote:
> Hi everyone,
> Sorry I'm kind of a noob.
>
> I have the following string:
>
> '/lawprod9/law/print/jimmy/iadj41508b/1'
>
> and I need to parse out the word jimmy. So I tried:
>
> $printdir='/lawprod9/law/print';
> $string='/lawprod9/law/print/jimmy/iadj41508b/1';
> $string=~ m/$printdir\/(.*)\/(.*)/o;
                          ^^
                          ^^
That can match slash characters...


> print "$1, $2";
>
> thinking it would output:
>
> jimmy, iadj41508b/1
>
> but it outputs:
>
> jimmy/iadj41508b, 1
>
>
> So it thinks the last slash is the one I'm interested in. So the
> $printdir is always the same but after that it changes and it can be
> deeper or less deep that the sample line above.
> Can anyone help me with this? Thanks.


Write your pattern so that the part you do not want to match slash
characters cannot match slash characters.

(And use an alternate delimiter to avoid backslash clutter):

    m#$printdir/[^/]*/(.*)#o;


> Oh, I need the stuff after Jimmy to go to another variable ideally.


    my($another_variable) = $string=~ m#$printdir/[^/]*/(.*)#o;


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


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

Date: Wed, 10 Dec 2008 05:37:39 GMT
From: sln@netherlands.com
Subject: Re: Need help parsing
Message-Id: <e9luj45vp8v6nfb1dgijtjnmbot152seoo@4ax.com>

On Tue, 09 Dec 2008 20:08:34 -0800, Jürgen Exner <jurgenex@hotmail.com> wrote:

>TR <trezaei@gmail.com> wrote:
>>I have the following string:
>>'/lawprod9/law/print/jimmy/iadj41508b/1'
>>
>>and I need to parse out the word jimmy. So I tried:
>>Oh, I need the stuff after Jimmy to go to another variable ideally.
>
/(jimmi)(.*)/

sln



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

Date: Wed, 10 Dec 2008 05:42:24 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Dec 10 2008
Message-Id: <KBnBuo.1n7L@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.

Apache2-WURFLFilter-0.54
http://search.cpan.org/~ifuschini/Apache2-WURFLFilter-0.54/
is a Apache Mobile Filter that manage content (text & image) to the correct mobile device 
----
App-ZofCMS-Plugin-BasicLWP-0.0102
http://search.cpan.org/~zoffix/App-ZofCMS-Plugin-BasicLWP-0.0102/
very basic "uri-to-content" style LWP plugin for ZofCMS. 
----
AutoXS-Header-0.05
http://search.cpan.org/~smueller/AutoXS-Header-0.05/
Container for the AutoXS header files 
----
Bio-Das-1.10
http://search.cpan.org/~lds/Bio-Das-1.10/
Interface to Distributed Annotation System 
----
CGI-ExceptionManager-0.04
http://search.cpan.org/~tokuhirom/CGI-ExceptionManager-0.04/
DebugScreen with detach! 
----
CPANPLUS-YACSmoke-0.26
http://search.cpan.org/~bingos/CPANPLUS-YACSmoke-0.26/
Yet Another CPANPLUS Smoke Tester 
----
Class-XSAccessor-0.14
http://search.cpan.org/~smueller/Class-XSAccessor-0.14/
Generate fast XS accessors without runtime compilation 
----
Class-XSAccessor-Array-0.14
http://search.cpan.org/~smueller/Class-XSAccessor-Array-0.14/
Generate fast XS accessors without runtime compilation 
----
ClearPress-291
http://search.cpan.org/~rpettett/ClearPress-291/
Simple, fresh & fruity MVC framework 
----
Combine-4.001
http://search.cpan.org/~aardo/Combine-4.001/
Focused Web crawler framework 
----
Devel-Leak-0.04
http://search.cpan.org/~srezic/Devel-Leak-0.04/
Utility for looking for perl objects that are not reclaimed. 
----
Email-Abstract-3.000
http://search.cpan.org/~rjbs/Email-Abstract-3.000/
unified interface to mail representations 
----
Fey-0.18
http://search.cpan.org/~drolsky/Fey-0.18/
Better SQL Generation Through Perl 
----
Fey-Loader-0.06
http://search.cpan.org/~drolsky/Fey-Loader-0.06/
Load your schema defintion from a DBMS 
----
Fey-Test-0.06
http://search.cpan.org/~drolsky/Fey-Test-0.06/
Test libraries for Fey distros 
----
File-Fu-v0.0.5
http://search.cpan.org/~ewilhelm/File-Fu-v0.0.5/
file and directory objects 
----
Geo-WebService-Elevation-USGS-0.001
http://search.cpan.org/~wyant/Geo-WebService-Elevation-USGS-0.001/
Elevation queries against USGS web services. 
----
MediaWiki-API-0.23
http://search.cpan.org/~exobuzz/MediaWiki-API-0.23/
Provides a Perl interface to the MediaWiki API (http://www.mediawiki.org/wiki/API) 
----
MojoX-Renderer-TT-0.20
http://search.cpan.org/~abh/MojoX-Renderer-TT-0.20/
Template Toolkit renderer for Mojo 
----
MooseX-Emulate-Class-Accessor-Fast-0.00500
http://search.cpan.org/~groditi/MooseX-Emulate-Class-Accessor-Fast-0.00500/
Emulate Class::Accessor::Fast behavior using Moose attributes 
----
MooseX-GlobRef-Object-0.03
http://search.cpan.org/~dexter/MooseX-GlobRef-Object-0.03/
Store a Moose object in glob reference 
----
MooseX-Types-0.08
http://search.cpan.org/~jjnapiork/MooseX-Types-0.08/
Organise your Moose types in libraries 
----
MooseX-Types-Structured-0.07
http://search.cpan.org/~jjnapiork/MooseX-Types-Structured-0.07/
Structured Type Constraints for Moose 
----
Net-OpenSSH-0.07
http://search.cpan.org/~salva/Net-OpenSSH-0.07/
Perl SSH client package implemented on top of OpenSSH 
----
Net-fonolo-1.1
http://search.cpan.org/~mpultz/Net-fonolo-1.1/
Perl interface to fonolo (http://fonolo.com/developer) 
----
NetAddr-IP-4.020
http://search.cpan.org/~miker/NetAddr-IP-4.020/
Manages IPv4 and IPv6 addresses and subnets 
----
NetApp-1.1.0
http://search.cpan.org/~wpmoore/NetApp-1.1.0/
----
NetApp-1.1.1
http://search.cpan.org/~wpmoore/NetApp-1.1.1/
----
NetHack-Item-0.05
http://search.cpan.org/~sartak/NetHack-Item-0.05/
parse and interact with a NetHack item 
----
PApp-1.43
http://search.cpan.org/~mlehmann/PApp-1.43/
multi-page-state-preserving web applications 
----
POE-Component-Client-HTTP-0.87
http://search.cpan.org/~rcaputo/POE-Component-Client-HTTP-0.87/
a HTTP user-agent component 
----
POE-Component-Client-Keepalive-0.25
http://search.cpan.org/~rcaputo/POE-Component-Client-Keepalive-0.25/
manage connections, with keep-alive 
----
Pod-Advent-0.12
http://search.cpan.org/~davidrw/Pod-Advent-0.12/
POD Formatter for The Perl Advent Calendar 
----
Proc-Safetynet-0.02
http://search.cpan.org/~dtady/Proc-Safetynet-0.02/
POE-based utility for supervising processes 
----
Rose-DB-0.748
http://search.cpan.org/~jsiracusa/Rose-DB-0.748/
A DBI wrapper and abstraction layer. 
----
Rose-DB-Object-0.776
http://search.cpan.org/~jsiracusa/Rose-DB-Object-0.776/
Extensible, high performance object-relational mapper (ORM). 
----
Rose-Object-0.854
http://search.cpan.org/~jsiracusa/Rose-Object-0.854/
A simple object base class. 
----
Rubyish-0.30
http://search.cpan.org/~gugod/Rubyish-0.30/
Perl programming, the rubyish way. 
----
Set-IntSpan-Fast-1.15
http://search.cpan.org/~andya/Set-IntSpan-Fast-1.15/
Fast handling of sets containing integer spans. 
----
String-Tests-0.02
http://search.cpan.org/~sfryer/String-Tests-0.02/
run a series of tests on a string 
----
String-Tests-0.03
http://search.cpan.org/~sfryer/String-Tests-0.03/
run a series of tests on a string 
----
Sys-Group-GIDhelper-0.0.1
http://search.cpan.org/~vvelox/Sys-Group-GIDhelper-0.0.1/
Helps for locating free GIDs. 
----
Term-Sprog-0.01
http://search.cpan.org/~keichner/Term-Sprog-0.01/
Perl extension for displaying a progress indicator on a terminal. 
----
Text-CSV-Slurp-0.4.1
http://search.cpan.org/~robbiebow/Text-CSV-Slurp-0.4.1/
convert CSV into an array of hashes 
----
Text-CSV-Slurp-0.5
http://search.cpan.org/~robbiebow/Text-CSV-Slurp-0.5/
convert CSV into an array of hashes 
----
Text-EditTranscript-0.01
http://search.cpan.org/~lmetcalf/Text-EditTranscript-0.01/
Perl extension for determining the edit transcript between two strings 
----
Text-EditTranscript-0.02
http://search.cpan.org/~lmetcalf/Text-EditTranscript-0.02/
Perl extension for determining the edit transcript between two strings 
----
Tk-GraphViz-1.01
http://search.cpan.org/~jgs/Tk-GraphViz-1.01/
Render an interactive GraphViz graph 
----
VCI-0.5.0_1
http://search.cpan.org/~mkanat/VCI-0.5.0_1/
A generic interface for interacting with various version-control systems. 
----
ZConf-0.7.0
http://search.cpan.org/~vvelox/ZConf-0.7.0/
A configuration system allowing for either file or LDAP backed storage. 
----
ZConf-Cron-0.0.0
http://search.cpan.org/~vvelox/ZConf-Cron-0.0.0/
Handles storing cron tabs in ZConf. 
----
github_creator-0.15
http://search.cpan.org/~bdfoy/github_creator-0.15/
Create a Github repository for your Perl module 
----
rssdrop-0.2
http://search.cpan.org/~acg/rssdrop-0.2/
deliver rss feeds to Maildirs 
----
signatures-0.03
http://search.cpan.org/~flora/signatures-0.03/
subroutine signatures with no source filter 


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: Tue, 09 Dec 2008 18:25:39 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: ordered hashes
Message-Id: <x7d4g1nd70.fsf@stemsystems.com>

>>>>> "MV" == Martien Verbruggen <martien.verbruggen@invalid.see.sig> writes:

  MV> I've done things like this in the past, but have always opted to use an
  MV> array with the order of the keys, rather than using an ordered hash. 

i wrote this about a week ago. 

my @col_names = split( /\t/, <> ) ;

my %name2col ;
@name2col{ @col_names } = 0 .. $#col_names ;

my @wanted_names = qw(
NAME SADDR1 SADDR2 SADDR3 SADDR4 SADDR5 PHONE1 CUSTFLD3 CUSTFLD4 NOTEPAD ) ;

while( <> ) {

	my %fields ;

	@fields{@wanted_names} =
		(split( /\t/, $_ ))[ @name2col{ @wanted_names } ] ;


the last statement is a favorite of mine. triple slicing. but only later
did i notice that one of the slices was constant and could be factored
out of the loop.

show me a better version line in any other lang. :)

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


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

Date: Wed, 10 Dec 2008 00:25:56 +0000
From: Big and Blue <No_4@dsl.pipex.com>
Subject: Re: Trouble with Net::Ping
Message-Id: <OOmdnTLZ0MQJkaLUnZ2dneKdnZydnZ2d@pipex.net>

Ted Byers wrote:

> But there is a problem, here, with what you've written.

    No - there is a serious problem with your expectations.

>                                                       You say the
> ping command uses ICMP, but you say www.microsoft.com is not ICMP
> pingable.  I used the ping command provided by MS with WXP.  Why would
> that use ICMP if www.microsoft.com is not ICMP pingable.

Because, despite appearances, Microsoft is not the be-all and end-all of 
the Internet.  ping is a command that was written a long time ago.  It 
was written just to determine whether system A could connect to system B 
on a single network, and the name comes from the fact that for each 
successful packet sent a sound (ping) was emitted from the speaker of 
the system it was running on so that he author could *hear* what was 
happening as he wandered round the rest of the room checking physical 
connexions (since he couldn't see the screen).

In practice www.microsoft.com may well be ICMP pingable (although I did 
recently discover that MS Vista turns *off* ICMP pings by default, which 
is an absolute pain when you are trying to figure out the state of a 
flakey wireless connexion and don't realize that setting), but the 
routers between you and it may not pass through ICMP packets.  And if 
you don't understand that you'll have problems understanding the basic 
concepts of what a ping is telling you, so look at the reading list 
posted for you.


-- 
              Just because I've written it doesn't mean that
                   either you or I have to believe it.


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

Date: Tue, 09 Dec 2008 23:45:48 GMT
From: sln@netherlands.com
Subject: Re: Using integers up to 0xFFFFFFFFFFFFFFFF
Message-Id: <g4vtj4dat0efvn99mheiefu63jugvob1le@4ax.com>

On Tue, 9 Dec 2008 02:49:03 -0800 (PST), "A. Farber" <Alexander.Farber@gmail.com> wrote:

>Hello perl users,
>
>I'm programming a card game were 32 cards are used.
>
>I'd like to represent each of those cards by a bit,
>because it makes several things easier for me
>(for example I can set a mask for a user,
>restricting the cards she can play at some moment)
>
>Unfortunately constants like these:
>
>use constant ALL_CARDS  => 0xFFFFFFFFFFFFFFFF;  # line 46
>use constant ALL_SPADES => 0x1111111111111111
>use constant ALL_CLUBS  => 0x2222222222222222
>use constant ALL_DIAMONDS => 0x4444444444444444
>use constant ALL_HEARTS => 0x8888888888888888
>
>give me errors:
>
>Integer overflow in hexadecimal number at Const.pm line 46.
>Hexadecimal number > 0xffffffff non-portable at Const.pm line 46.
>
>Does anybody have an advice, how could I handle this best?
>
>I'm using perl 5.8.8 at 32-bit OpenBSD 4.3 (and soon 4.4)
>
>Thank you!
>Alex

Well, you already know your problem. But just curious. Here is an alternative:

13 numbers x 4 suites = 52 cards

player has a list of available numbers they can play = 13 bits
player has a list of available suites they can play  = 4 bits

or,

each player has a mask of cards they can play = 20 bits + 32 bits

or,

each player has a mask of cards they can play = 26 bits + 26 bits

   clubs/diamonds: A-K = 26 bits from integer1
   spades/hearts:  A-K = 26 bits from integer2

or,

each player has a mask of cards they can play = 13 bits + 13 bits + 13 bits + 13 bits

   clubs:    A-K = 13 bits from integer1
   diamonds: A-K = 13 bits from integer2
   spades:   A-K = 13 bits from integer3
   hearts:   A-K = 13 bits from integer4

sln



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

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


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