[29152] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 396 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 2 03:09:55 2007

Date: Wed, 2 May 2007 00:09: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           Wed, 2 May 2007     Volume: 11 Number: 396

Today's topics:
    Re: 2D array values got replaced error <csoon@xilinx.com>
        A Web Development QUICK LINK PAGE (QLP) - HTML, Perl, P <ken911@wwiinnooggrraadd.com>
    Re: Access hash of hashes element problem. <tadmc@augustmail.com>
        Dynamic DNS management <noozegoy@pookmail.com>
    Re: FAQ 4.46 How do I handle linked lists? <baxter.brad@gmail.com>
    Re: hello world with perl <invalid@invalid.net>
        how to execute external file in script <stoupa@practisoft.cz>
    Re: how to execute external file in script <someone@example.com>
    Re: How to handling string contains single quote and do <joe@inwap.com>
    Re: How to handling string contains single quote and do <invalid@invalid.net>
    Re: Install Mail::RBL failed in CPAN, how to fix it? <needpassion@gmail.com>
    Re: Interval Timers on Windows sl123@netherlands.area
        new CPAN modules on Wed May  2 2007 (Randal Schwartz)
    Re: perl Write filehandle blocks. <joe@inwap.com>
    Re: Problem with Image::Info <joe@inwap.com>
    Re: Sockets <dale.schmitz@offutt.af.mil>
    Re: system call - how-to. <jgibson@mail.arc.nasa.gov>
        WWW::Slides polettix@gmail.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 2 May 2007 09:38:17 +0800
From: "Ken Soon" <csoon@xilinx.com>
Subject: Re: 2D array values got replaced error
Message-Id: <f18q7o$t03@cnn.xsj.xilinx.com>


> You say counters (index is the common term), but the values are
> not natural numbers.  Arrays (in Perl and elsewhere) take integer
> indices.  A float point number is first converted to an integer.
> Also, negative indices are special (they count from the end of the
> array).
>
>> Storing using the following code: (I have cut away most codes for 
>> simplicity
>> sake)
>> while (<file1>)
>> {
>>     if ($_ =~ /Site/)
>>     {
>>       @arr = split(/\s+/,$_);
>>           $var1 = $arr[6];
>>           $var2 = $arr[7];
>>           $a[$var1][$var2] = $arr[9];
>>      }
>> }
>
> [more code with similar problems snipped]
>
> That won't do what you want.  Use a hash %a instead of the array @a.
>
> Anno

Thks, changed to hash.  A little bit more complex but it works :) 




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

Date: Tue, 01 May 2007 20:02:34 -0400
From: Ken <ken911@wwiinnooggrraadd.com>
Subject: A Web Development QUICK LINK PAGE (QLP) - HTML, Perl, PHP, JavaScript, AJAX, CGI, etc.
Message-Id: <010520072002344150%ken911@wwiinnooggrraadd.com>

Hi. I've recently organized and even color-coded many of my favorite
bookmarks on WEB DEVELOPMENT (and a few other favorite subjects too)
into what I call QUICK LINK PAGES. These are very condensed, compact
(no graphics), fast-loading pages with a 100+ links to some of my
favorite web sites on a particular subject. I hope you'll give them a
try...

Here's the link...

http://www.winograd.com/QLP

The easy-to-remember link above gets you to one of the Quick Link Pages
(QLP). The current categories (DIVERSIONS, INVESTING, JAZZ, MACINTOSH,
OPERA, PHYSICS (with ASTRONOMY and MATHEMATICS), SPORTS, WEB
DEVELOPMENT, and WINDOWS) are color-coded on the top of every page.
Just click your favorite category. I hope you'll find a lot to enjoy.
If you find any errors, or have suggestions for additional links or
categories, please let me know.

THANKS...

Ken


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

Date: Tue, 1 May 2007 18:14:52 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Access hash of hashes element problem.
Message-Id: <slrnf3fifc.fh.tadmc@tadmc30.august.net>

Justin C <justin.0704@purestblue.com> wrote:
> In article <CNKZh.7221$j63.3948@newsread2.news.pas.earthlink.net>, Mumia W. wrote:

>> and the PRICES file is never explicitly closed by program. 
>
> I'm sure I read here that file-handles are closed automatically when
> they go out of scope, 


That is correct.


> I've not bothered closing a file since. 


perl will always do what it is supposed to do, it is a machine...


> Is this
> bad?


 ... but that does not lead to the conclusion that the human telling
perl what to do will do what _it_ is supposed to.  :-(

See my tale of woe from leaving out a close():

   http://groups.google.com/group/comp.lang.perl.misc/msg/73d4587743c64e2f


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Tue, 01 May 2007 17:42:31 -0600
From: Nooze Goy <noozegoy@pookmail.com>
Subject: Dynamic DNS management
Message-Id: <f18foe0oa8@news2.newsguy.com>

I'm in the process of setting up a web server - actually, it's pretty 
much working, just a few irritating things lurking about, occasionally 
leaping out and biting me on the arse.

One of the irritations is that with a dynamic DNS, I'm having to update 
the IP addresses for the authoritative DNS server of multiple domains 
hosted here. They're on one DNS service, ZoneEdit, and I found a couple 
of pieces of code to update the IP addresses. One was ddclient, but 
before I could get the config debugged, I tried another - which is not 
so much a program as a command-line. It works okay, except that 
ZoneEdit's server is agonizingly slow to respond, so it takes ten or 
fifteen seconds to respond for each domain.

wget -O - --http-user=mylogin --http-passwd=myp455 
'http://dynamic.zoneedit.com/auth/dynamic.html?host=my.domain.com'

In the script, the above line is repeated for each domain; each line 
takes ten or fifteen seconds to process - doesn't seem reasonable, butt 
hu nose?

Obviously, with five or six domains, you're going to be hard-pressed to 
update the IP every minute, and with 20 domains you're basically looking 
at five solid minutes of updating anytime the ISP changes the IP, so it 
doesn't make any sense to update unless it's actually changed.

I wrote a little Perl script to check the IP and log it and compare with 
last time it checked, and do the update only if the two don't match.

It works fine right now - all it does is run a bash script of the 
command-line entries shown above. But, of course, it's still sllooowwwww 
as molasses.

I'm assuming that there's some rational way to have my perl prog connect 
to the DNS update server directly, and maybe a) that'll be faster or b) 
there's some way to update all the domains in the list either with one 
string or in a loop.

So... here's the code - feel free to throw rocks at it, but it works... 
(barring typos - I'm looking at the code thru putty, and the copy and 
paste from a terminal window leave a lot to be desired)

####################################################
#!/usr/bin/perl
use LWP::Simple;

$site = "http://checkip.dyndns.org";
$var = get $site;
$colloc = index($var,":");
$ip = substr($var,$colloc+2,20);
$angloc = index($ip,"<");
$ip = substr($ip,0,$angloc);
open CURIP,">curip" or die "File does not exist, 'curip'";
print CURIP "$ip";
close CURIP;
open OLDIP,"oldip";
$oldip = <OLDIP>;
close OLDIP
if ( $oldip == $ip ) {
    # yep, yep... print "Look the same to me, too, ain't it???\n";
    }
else
   { #update dns address - run script of
     #    wget lines and replace old IP value
     system("./updns");
     system("cp -f curip oldip");
   }
###############################################


What should I use to send the update info direct to ZoneEdit?


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

Date: 1 May 2007 15:29:59 -0700
From: Brad Baxter <baxter.brad@gmail.com>
Subject: Re: FAQ 4.46 How do I handle linked lists?
Message-Id: <1178058599.485919.168930@c35g2000hsg.googlegroups.com>

On May 1, 5:44 pm, Michele Dondi <bik.m...@tiscalinet.it> wrote:
> On 1 May 2007 05:21:22 -0700, Brad Baxter <baxter.b...@gmail.com>
> wrote:
>
> >s/Both pop and shift are both/Both pop and shift are/;
>
> s/(?<=Both pop and shift are) both//;

:-)

s/ both//;

--
Brad



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

Date: Tue, 1 May 2007 22:42:39 -0400
From: "Wade Ward" <invalid@invalid.net>
Subject: Re: hello world with perl
Message-Id: <OcSdnQd3oqA8Z6rbnZ2dnUVZ_gKdnZ2d@comcast.com>


"Ian Wilson" <scobloke2@infotop.co.uk> wrote in message 
news:46370459$0$10729$db0fefd9@news.zen.co.uk...
> Wade Ward wrote:
>> "Wade Ward" <invalid@invalid.net> wrote in message 
>> news:Kdqdnbj53sJ-1qvbnZ2dnUVZ_gudnZ2d@comcast.com...
>>
>>>>>>My machine, even after installing komodo, has no associations for .cgi 
>>>>>>or .pl
>>>>>
>>>>>1) Re-install ActiveState perl.
>>>
>>>Responding to myself, sort of.  The install doesn't go off without 
>>>errors. These might be peculiar to the 21 day trial version.  I removed 
>>>the former installation, rebooted and re-installed, and it found my last 
>>>version of "hello world."  I seem to be in the same place.
>>
>> Now I'm definitely responding to myself.  The link with the screendumps 
>> didn't post:
>> http://www.billfordx.net/2007-04-30a.htm
>> whoops.
>
> Your problem is with the Komodo IDE. Maybe the Komodo installer doesn't 
> include ActivePerl and you need to separately install ActivePerl?
>
>
>
> If you open a Command Prompt and type `perl -v` what exact message do you 
> get?
>
> If it gives you some version information, type
>   `perl -e "print qw(Hello World\n)"
> What message do you get?
>
http://www.billfordx.net/2007-05-01a.htm
Thanks for your reply.  The above screenshot shows me still slightly short 
of square one.

> Have you read the "Software Prerequisites on Windows" section in
> http://aspn.activestate.com/ASPN/docs/Komodo/4.0/readme.html
I'll get on it now.
--
Wade Ward




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

Date: Wed, 2 May 2007 02:58:15 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: how to execute external file in script
Message-Id: <f18o8v$22fo$1@ns.felk.cvut.cz>

Idea:
I have script where at first I collect file names in exactly defined 
directory.
All these files are in principle part of perl program. I show filenames to 
user and user select one of these. Now I want to run code in selected file. 
Only one what I thinked up is to use eval() but must be a better way. Or 
not?

Very simple example:

#!/usr/bin/perl
use strict;
use Cwd;
use Term::ReadKey;

my $curdir = getcwd;
my $where = './files';
chdir $where;
opendir DIR,$where;
my @files=grep -f, readdir DIR;
closedir DIR;
chdir $curdir;
my $cnt=0;
foreach my $file (@files) {
    $cnt++;
    print $cnt, ": $file\n";
}
print "Type number or X for exit\n";
ReadMode 4;
my $key;
while (not defined ($key = ReadKey(-1))) {}
exit if(uc($key) eq 'X');
$file = $where . "/$files[ord($key) -48]";
open IN,"<$file";
my $sep=$/;
undef $/;
my $content = <IN>;
close IN;
our $variable = 'Nothing';
eval $content;
print $variable;
# end of main script

    file ./files/test1.pl
$variable = 'Test 1 was executed';

    file ./files/test2.pl
$variable = 'Test 2 was executed';

    file ./files/test3.pl
$variable = 'Test 3 was executed';


-- 

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




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

Date: Wed, 02 May 2007 04:42:58 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: how to execute external file in script
Message-Id: <mFUZh.23246$_G.745@edtnps89>

Petr Vileta wrote:
> Idea:
> I have script where at first I collect file names in exactly defined
> directory.
> All these files are in principle part of perl program. I show filenames
> to user and user select one of these. Now I want to run code in selected
> file. Only one what I thinked up is to use eval() but must be a better
> way. Or not?
> 
> Very simple example:
> 
> #!/usr/bin/perl

use warnings;

> use strict;
> use Cwd;
> use Term::ReadKey;
> 
> my $curdir = getcwd;
> my $where = './files';
> chdir $where;

chdir $where or die "Cannot chdir '$where' $!";

> opendir DIR,$where;

Suppose that your current directory is /home/stoupa and after you chdir your
current directory is now /home/stoupa/files so you are trying to opendir the
directory /home/stoupa/files/files?  You should *ALWAYS* verify that the
directory was opened correctly:

opendir DIR, $where or die "Cannot open '$where' $!";

> my @files=grep -f, readdir DIR;

You are trying to stat the file as if it were in the current directory but it
is in the $where directory.

perldoc -f readdir

> closedir DIR;
> chdir $curdir;

chdir $curdir or die "Cannot chdir '$curdir' $!";



John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall


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

Date: Tue, 01 May 2007 23:23:52 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: How to handling string contains single quote and double quote
Message-Id: <hsKdnbJqrI3ls6XbnZ2dnUVZ_vyunZ2d@comcast.com>

vikrant wrote:
> the code is a part of a
> function,which called again and again.So,i thought  that opening and
> closing a file on each call may effect the performance.That was the
> only reason of using the system command.
> Comments are most welcome.

FYI: Invoking system() like that means 32 separate file operations each
time it is called.

linux% strace -f -e trace=file sh -c 'echo foo > temp.txt' |& cat -n
      1  execve("/bin/sh", ["sh", "-c", "echo foo > temp.txt"], [/* 41 vars */]) = 0
      2  access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
      3  open("/etc/ld.so.cache", O_RDONLY)      = 3
      4  fstat64(3, {st_mode=S_IFREG|0644, st_size=79328, ...}) = 0
      5  open("/lib/libtermcap.so.2", O_RDONLY)  = 3
      6  fstat64(3, {st_mode=S_IFREG|0755, st_size=12924, ...}) = 0
      7  open("/lib/libdl.so.2", O_RDONLY)       = 3
      8  fstat64(3, {st_mode=S_IFREG|0755, st_size=16244, ...}) = 0
      9  open("/lib/libc.so.6", O_RDONLY)        = 3
     10  fstat64(3, {st_mode=S_IFREG|0755, st_size=1485672, ...}) = 0
     11  open("/dev/tty", O_RDWR|O_NONBLOCK|O_LARGEFILE) = 3
     12  open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
     13  fstat64(3, {st_mode=S_IFREG|0644, st_size=49641600, ...}) = 0
     14  open("/etc/mtab", O_RDONLY)             = 3
     15  fstat64(3, {st_mode=S_IFREG|0644, st_size=414, ...}) = 0
     16  open("/proc/meminfo", O_RDONLY)         = 3
     17  fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
     18  stat64("/home/jms", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
     19  stat64(".", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
     20  open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 3
     21  fstat64(3, {st_mode=S_IFREG|0644, st_size=22294, ...}) = 0
     22  open("/usr/lib/gconv/ISO8859-1.so", O_RDONLY) = 3
     23  fstat64(3, {st_mode=S_IFREG|0755, st_size=5340, ...}) = 0
     24  stat64(".", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
     25  stat64("/usr/bin/sh", 0xbff56eb4)       = -1 ENOENT (No such file or directory)
     26  stat64("/usr/sbin/sh", 0xbff56eb4)      = -1 ENOENT (No such file or directory)
     27  stat64("/bin/sh", {st_mode=S_IFREG|0755, st_size=686520, ...}) = 0
     28  access("/bin/sh", X_OK)                 = 0
     29  stat64("/bin/sh", {st_mode=S_IFREG|0755, st_size=686520, ...}) = 0
     30  access("/bin/sh", X_OK)                 = 0
     31  open("temp.txt", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666


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

Date: Wed, 2 May 2007 02:36:51 -0400
From: "Wade Ward" <invalid@invalid.net>
Subject: Re: How to handling string contains single quote and double quote
Message-Id: <6_ydnTM0Y9MZrKXbnZ2dnUVZ_vShnZ2d@comcast.com>


"Joe Smith" <joe@inwap.com> wrote in message 
news:hsKdnbJqrI3ls6XbnZ2dnUVZ_vyunZ2d@comcast.com...
> vikrant wrote:
>> the code is a part of a
>> function,which called again and again.So,i thought  that opening and
>> closing a file on each call may effect the performance.That was the
>> only reason of using the system command.
>> Comments are most welcome.
>
> FYI: Invoking system() like that means 32 separate file operations each
> time it is called.
>
> linux% strace -f -e trace=file sh -c 'echo foo > temp.txt' |& cat -n
>      1  execve("/bin/sh", ["sh", "-c", "echo foo > temp.txt"], [/* 41 vars 
> */]) = 0
>      2  access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file 
> or directory)
>      3  open("/etc/ld.so.cache", O_RDONLY)      = 3
>      4  fstat64(3, {st_mode=S_IFREG|0644, st_size=79328, ...}) = 0
>      5  open("/lib/libtermcap.so.2", O_RDONLY)  = 3
>      6  fstat64(3, {st_mode=S_IFREG|0755, st_size=12924, ...}) = 0
>      7  open("/lib/libdl.so.2", O_RDONLY)       = 3
>      8  fstat64(3, {st_mode=S_IFREG|0755, st_size=16244, ...}) = 0
>      9  open("/lib/libc.so.6", O_RDONLY)        = 3
>     10  fstat64(3, {st_mode=S_IFREG|0755, st_size=1485672, ...}) = 0
>     11  open("/dev/tty", O_RDWR|O_NONBLOCK|O_LARGEFILE) = 3
>     12  open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
>     13  fstat64(3, {st_mode=S_IFREG|0644, st_size=49641600, ...}) = 0
>     14  open("/etc/mtab", O_RDONLY)             = 3
>     15  fstat64(3, {st_mode=S_IFREG|0644, st_size=414, ...}) = 0
>     16  open("/proc/meminfo", O_RDONLY)         = 3
>     17  fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
>     18  stat64("/home/jms", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 
> 0
>     19  stat64(".", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
>     20  open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 3
>     21  fstat64(3, {st_mode=S_IFREG|0644, st_size=22294, ...}) = 0
>     22  open("/usr/lib/gconv/ISO8859-1.so", O_RDONLY) = 3
>     23  fstat64(3, {st_mode=S_IFREG|0755, st_size=5340, ...}) = 0
>     24  stat64(".", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
>     25  stat64("/usr/bin/sh", 0xbff56eb4)       = -1 ENOENT (No such file 
> or directory)
>     26  stat64("/usr/sbin/sh", 0xbff56eb4)      = -1 ENOENT (No such file 
> or directory)
>     27  stat64("/bin/sh", {st_mode=S_IFREG|0755, st_size=686520, ...}) = 0
>     28  access("/bin/sh", X_OK)                 = 0
>     29  stat64("/bin/sh", {st_mode=S_IFREG|0755, st_size=686520, ...}) = 0
>     30  access("/bin/sh", X_OK)                 = 0
>     31  open("temp.txt", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666
What's the 32nd?
--
WW 




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

Date: 1 May 2007 16:54:42 -0700
From: mike <needpassion@gmail.com>
Subject: Re: Install Mail::RBL failed in CPAN, how to fix it?
Message-Id: <1178063682.178232.232290@e65g2000hsc.googlegroups.com>

Already get the new pack from the author of Mail::RBL and fixed this
issue. Many thanks to Luis.



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

Date: Tue, 01 May 2007 21:04:26 -0700
From: sl123@netherlands.area
Subject: Re: Interval Timers on Windows
Message-Id: <l93g33t3do49rdhcic1qsrfautpi4spa1h@4ax.com>

On Sun, 29 Apr 2007 16:40:11 +0800, Bernard Chan <cbkihong@hotmail.com> wrote:

>
>Hi All,
>
>I am writing a script to generate some packets for RTP stream simulation. As
>you may know, RTP requires a more-or-less constant packet rate (and hence
>UDP is used), and I will need to generate fixed sized packets at regular
>intervals, say 20ms, so that will be around 50 packets per second.
>
>On Linux I have tried a version using Time::HiRes ualarm(). On some of my
>Linux systems ualarm() can generate a packet rate that approximates 50Hz
>pretty well, and the interval variance is infinitesimal. However, I also
>have some systems (mostly Fedora) which seem to exhibit increasingly long
>intervals after some seconds for reasons unknown to me.
>
>I would also like to have the script usable on Windows that my peers who
>have Windows on their systems can perform some tests. There is no ualarm()
>in Time::HiRes on Windows, so I tried another approach. I created a
>thread-enabled version of the script. A separate thread is created which
>does roughly this:
>
>while ($continue) {
>        sendPacket();
>        select(undef, undef, undef, 20/1000);
>}
>
>However, I find that the sleep between each packet tends to be slightly
>higher than 20ms, so after not many packets it is already arriving slower
>than the drain rate at the receiver side.
>
>So, I would like to know, whether I can do anything to improve this on the
>Windows side? I don't need microseconds or even nanoseconds granularity.
>1ms would be generally good enough, but I would like a cross-platform
>(Win+Linux at least) approach.
>
>Any insights will be much appreciated.
>
>-- 
>Regards,
>Bernard Chan

Hey, not sure if this will work but its worth a try.
Some pseudo perl code to try out.
Typically on Windows this is realatively easy to start the send packet on a time increment
boundry. Done with signals, multiple threads and non-blocking WaitForMultipleObjects();

Not sure in Perl if you can set the thread priorities but the timer thread would get a little higher.



packet_available = 0;
packet_sequence = 1;
kill_threads = 0;

main()
{
   # start Packet_thread();
   # start Timer_thread();
   while (packet_sequence < 500)
   {
       # you can try a sleep here of 5ms but I don't think its necessary
       sleep(5);
   }
   kill_threads = 1;
   sleep(500);
}
   

Timer_thread()
{
   while (!kill_threads)
   {
      sleep(20);
      packet_sequence++;
      packet_available = 1;
   }
}

Packet_thread()
{
   last_packet_sequence = 0;
   while (!kill_threads)
   {
      if (packet_available)
      {
          Send_Packet();
          # do something with the sequence
          # to see if we missed one
          if (packet_sequence != last_packet_sequence+1)
          {
              print "race condition, missed packet, expected ...\n";
          }
          last_packet_sequence = packet_sequence;
          Load_Next_Packet_Data();
          packet_available = 0;
       }
       # you can try a sleep here of 1ms but I don't think its necessary
       # sleep(1);
    }
}





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

Date: Wed, 2 May 2007 04:42:10 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed May  2 2007
Message-Id: <JHED2A.yCC@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.

Apache-Wyrd-0.96
http://search.cpan.org/~wyrd/Apache-Wyrd-0.96/
HTML embeddable perl objects under mod_perl
----
Astro-SpaceElevator-0.02
http://search.cpan.org/~dbrooks/Astro-SpaceElevator-0.02/
Model a Space Elevator
----
Brick-0.223
http://search.cpan.org/~bdfoy/Brick-0.223/
Complex business rule data validation
----
Business-OnlinePayment-LinkPoint-0.08
http://search.cpan.org/~ivan/Business-OnlinePayment-LinkPoint-0.08/
LinkPoint (Cardservice) backend for Business::OnlinePayment
----
Catalyst-Plugin-Browser-0.04
http://search.cpan.org/~mramberg/Catalyst-Plugin-Browser-0.04/
Browser Detection
----
Catalyst-Plugin-Cache-FastMmap-0.7
http://search.cpan.org/~mramberg/Catalyst-Plugin-Cache-FastMmap-0.7/
Mmap cache
----
Catalyst-Plugin-Cache-FileCache-0.6
http://search.cpan.org/~mramberg/Catalyst-Plugin-Cache-FileCache-0.6/
File cache
----
Catalyst-Plugin-Cache-Memcached-0.7
http://search.cpan.org/~mramberg/Catalyst-Plugin-Cache-Memcached-0.7/
Distributed cache
----
Catalyst-Plugin-Compress-Bzip2-0.02
http://search.cpan.org/~mramberg/Catalyst-Plugin-Compress-Bzip2-0.02/
Bzip2 response
----
Catalyst-Plugin-Compress-Zlib-0.02
http://search.cpan.org/~mramberg/Catalyst-Plugin-Compress-Zlib-0.02/
Zlib Compression for Catalyst
----
Catalyst-Plugin-Prototype-1.33
http://search.cpan.org/~mramberg/Catalyst-Plugin-Prototype-1.33/
Plugin for Prototype
----
Catalyst-View-JSON-0.18
http://search.cpan.org/~miyagawa/Catalyst-View-JSON-0.18/
JSON view for your data
----
Catalyst-View-Petal-0.02
http://search.cpan.org/~mramberg/Catalyst-View-Petal-0.02/
Petal View Class
----
Class-C3-0.15_06
http://search.cpan.org/~blblack/Class-C3-0.15_06/
A pragma to use the C3 method resolution order algortihm
----
Class-C3-XS-0.01_07
http://search.cpan.org/~blblack/Class-C3-XS-0.01_07/
XS speedups for Class::C3
----
DBIx-HA-1.00
http://search.cpan.org/~hasseily/DBIx-HA-1.00/
High Availability package for DBI
----
DBIx-Mysql-InformationSchema-0.03
http://search.cpan.org/~gwl/DBIx-Mysql-InformationSchema-0.03/
Perl module to access the mysql INFORMATION_SCHEMA view, which contains database metadata.
----
DBIx-Mysql-InformationSchema-0.04
http://search.cpan.org/~gwl/DBIx-Mysql-InformationSchema-0.04/
Perl module to access the mysql INFORMATION_SCHEMA view, which contains database metadata.
----
Gantry-3.49
http://search.cpan.org/~tkeefer/Gantry-3.49/
Web application framework for mod_perl, cgi, etc.
----
Gearman-Server-1.07
http://search.cpan.org/~bradfitz/Gearman-Server-1.07/
function call "router" and load balancer
----
Gearman-Server-1.08
http://search.cpan.org/~bradfitz/Gearman-Server-1.08/
function call "router" and load balancer
----
Google-Checkout-1.0.5
http://search.cpan.org/~dzhuo/Google-Checkout-1.0.5/
----
Image-Magick-Thumbnail-PDF-1.01
http://search.cpan.org/~leocharre/Image-Magick-Thumbnail-PDF-1.01/
----
Mail-RBL-1.10
http://search.cpan.org/~luismunoz/Mail-RBL-1.10/
Perl extension to access RBL-style host verification services
----
Memoize-Attrs-0.00_02
http://search.cpan.org/~ferreira/Memoize-Attrs-0.00_02/
Add memoization with subroutine attributes
----
Module-Release-1.15
http://search.cpan.org/~bdfoy/Module-Release-1.15/
Automate software releases
----
MooseX-Method-0.20
http://search.cpan.org/~berle/MooseX-Method-0.20/
Method declaration with type checking
----
MooseX-Method-0.22
http://search.cpan.org/~berle/MooseX-Method-0.22/
Method declaration with type checking
----
Net-YASA-0.01
http://search.cpan.org/~clsung/Net-YASA-0.01/
Interface to YASA (Yet Another Suffix Array)
----
POE-Component-GCS-0.03
http://search.cpan.org/~ccobb/POE-Component-GCS-0.03/
----
POE-Component-IRC-5.27
http://search.cpan.org/~bingos/POE-Component-IRC-5.27/
a fully event-driven IRC client module.
----
POE-Component-IRC-5.28
http://search.cpan.org/~bingos/POE-Component-IRC-5.28/
a fully event-driven IRC client module.
----
POE-Event-Message-0.10
http://search.cpan.org/~ccobb/POE-Event-Message-0.10/
A generic messaging protocol
----
PTools-0.02
http://search.cpan.org/~ccobb/PTools-0.02/
Tools for Perl Tool Developers
----
Solaris-SysInfo-0.04
http://search.cpan.org/~pevans/Solaris-SysInfo-0.04/
A perl wrapper around Solaris' sysinfo(1) system call
----
Sub-Information-0.01
http://search.cpan.org/~ovid/Sub-Information-0.01/
Get subroutine information
----
Test-Warn-0.10
http://search.cpan.org/~chorny/Test-Warn-0.10/
Perl extension to test methods for warnings
----
Text-MeCab-0.17
http://search.cpan.org/~dmaki/Text-MeCab-0.17/
Alternate Interface To libmecab
----
Tk-Wizard-2.005
http://search.cpan.org/~mthurn/Tk-Wizard-2.005/
GUI for step-by-step interactive logical process
----
WWW-Scraper-ISBN-TWApexbook_Driver-0.02
http://search.cpan.org/~ijliao/WWW-Scraper-ISBN-TWApexbook_Driver-0.02/
Search driver for TWApexbook's online catalog.
----
WWW-Slides-v0.0.1
http://search.cpan.org/~polettix/WWW-Slides-v0.0.1/
[Una riga di descrizione dello scopo del modulo]
----
WWW-Slides-v0.0.2
http://search.cpan.org/~polettix/WWW-Slides-v0.0.2/
serve presentations on the Web
----
perl-0.0017
http://search.cpan.org/~hooo/perl-0.0017/
Perl
----
time-1.0012
http://search.cpan.org/~hooo/time-1.0012/
uses Time::HiRes
----
time-1.0014
http://search.cpan.org/~hooo/time-1.0014/
uses Time::HiRes


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: Tue, 01 May 2007 22:32:28 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: perl Write filehandle blocks.
Message-Id: <asCdnRti0oHzv6XbnZ2dnUVZ_rCsnZ2d@comcast.com>

kiranmn@my-deja.com wrote:
>     First  parent do a fork, parent waits for child to finish , child
> runs a command "head" and exits. After waiting parent sleep fror 1
> hours and continue doing same thing. when i write a file to t "open2",
> write filehandle, it just hangs there...

>      use IPC::Open2;
>         $pid=open2($RDR, $WTR, "/usr/bin/head  ");



perldoc IPC::Open2

        This whole affair is quite dangerous, as you may block forever.  It
        assumes it's going to talk to something like bc, both writing to it and
        reading from it.  This is presumably safe because you "know" that com-
        mands like bc will read a line at a time and output a line at a time.
        Programs like sort that read their entire input stream first, however,
        are quite apt to cause deadlock.

It's cases like this where the parent should fork two children:
one that can block while writing to $WTR yet not preventing the other
fork from reading from $RDR at the same time.

	-Joe


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

Date: Tue, 01 May 2007 23:10:45 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: Problem with Image::Info
Message-Id: <JLadnfl4xOz0tqXbnZ2dnUVZ_s-rnZ2d@comcast.com>

Gary wrote:

> #!/usr/bin/perl -w

   #!/usr/bin/perl
   use warnings;

> use strict;
> use CGI qw(:standard);
> use Image::Info qw(image_info dim);
> 
> my $Photo = param('photo');
> my $info = image_info("$Photo");
> 
> print header;
> print start_html(-title=>'My Photos',  -bgcolor=>'#FFDEAD');
> 
> if (%info){
> print "Good <br> \n";
> }
> print "<img SRC=\"$Photo\"/>",
> print end_html;

   print h1("No photo name specified") unless $Photo;
   print h1("File '$Photo' does not exist in this directory
     on the server") unless -f $Photo;
   if ($info) {
     print img({img=>$Photo,alt=>$Photo}), start_ul();
     print li(b($_)," = $info->{$_}") for sort keys %$info;
     print end_ul();
   } else {
     print h1("Unable to get image_info from '$Photo'");
   }


That last part needs
   use CGI qw(:standard *ul);


	-Joe


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

Date: 1 May 2007 17:55:59 -0700
From: Monty <dale.schmitz@offutt.af.mil>
Subject: Re: Sockets
Message-Id: <1178067359.411051.137380@y80g2000hsf.googlegroups.com>

> Actually, I just checked, and IO::Select
> objects are indeed references to arrays, but again, it doesn't matter.

Actually, to me, at this stage of understanding, it kind of does
matter that it's an array.  While it could have been an array, a list,
or a hash, those structures are at least familiar and I know means
exist for traipsing through them.  So now the statement @ready = $sel-
>can_read begins to shed light for me.

> One of the points of OO classes is to encapsulate and hide the
> implementation from the user of the class. It should never be necessary
> to need to know what exactly underlies the implementation.

In practice, I won't need to refresh myself with the underlying
mechanisms, but they are important to learn from.

So this is what I've got from all this so far: IO::Select allows me to
'peruse', if you will, all the connections associated with a port I
designate in a client-server connection, upon or through which I've
established a communications socket (bear with me if this is rambling
a bit).  Somewhere in the system, something is keeping track of all
the connections I establish through that port, and IO::Select helps me
look at them all.

How's that so far?



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

Date: Tue, 01 May 2007 16:44:43 -0700
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: system call - how-to.
Message-Id: <010520071644435342%jgibson@mail.arc.nasa.gov>

In article <1178039561.065663.196510@l77g2000hsb.googlegroups.com>,
Paul Lalli <mritty@gmail.com> wrote:

> > > On May 1, 7:22 am, elsiddik <elsid...@gmail.com> wrote:
> >
> > > > perl -e "system qw (whatis /usr/bin/*)"
> >
> > > > but its not giving me the same whatislog - what am i doing wrong ?
> >
> > > You are using the qw operator.  This operator takes a space-separated
> > > list of barewords and returns a quoted list of words.  That is, your
> > > system() call is equivalent to:
> > > system('whatis', '/usr/bin/*');
> >
> > > Change your qw() to qq() or q(), and read up on `perldoc -f system`
> > > for more information.
> 
> > well i tried running the code with q and qq but im still getting the
> > same output --
> 
> I don't believe you.  Please post a short-but-complete script that
> demonstrates this, like so:
> 
> $ perl -e'system qq(whatis /usr/bin/*)'
> acctcom         acctcom (1)     - search and print process accounting
> files
> activation-client               activation-client ()    - bonobo-
> activationdebugging tool
> adb             adb (1)         - general-purpose debugger
> <remainder snipped>

On my system (Mac OS 10.4.9), "whatis /usr/bin/anything" gives:

/usr/bin/anything: nothing appropriate

I have to do

whatis anything

so "perl -e'system qq(whatis /usr/bin/*)'

give a long list of "nothing appropriate". I can fix this with the Unix
basename utility:

perl -e 'system(qq(whatis `basename /usr/bin/*`));'

> 
> > the part that i cant understand is when you run the shell script - i
> > could see all the /usr/bin/files output with <whatis> details ,
> > with perls everything looks quiet good also but instead of the
> > <whatis> details - keeps giving me /usr/bin/filename: nothing
> > appropriate.
> 
> Again, post a short-but-complete script that generates this output.
> 
> > i even tried to write a perl script - used File::Basename
> 
> I have no idea what you think File::Basename has to do with this.

As above.

-- 
Jim Gibson

 Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------        
                http://www.usenet.com


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

Date: Wed, 2 May 2007 00:13:20 GMT
From: polettix@gmail.com
Subject: WWW::Slides
Message-Id: <JHEIGz.12tt@zorch.sf-bay.org>

Hi,

I hope you will enjoy WWW::Slides, a system for serving slides to a
browser with a little support for HTTP streaming and CSS. The basic
idea is described in this post of mine in Perl Monks:
http://www.perlmonks.org/?node_id=608585

The module is still in some alpha state, but there is a working (and
documented) example inside the script directory, named 'console.pl'.
OTOH, documentation, testing and implementation are still on their
way.

Any feedback is appreciated! Regards,

   Flavio.

[moderator note: WWW::Slides is in the CPAN.]





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

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


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