Re: Free PERL Editor

2006-12-02 Thread Daniel Kasak
Suja Emmanuel wrote: Hi all, Could you please suggest me any good PERL editor which is available in open source tools. I have tried 'EngineSite Perl Editor -LITE' and 'PerlExpress' which I am not comfortable with. Kindly refer me some good bug free tools. Eclipse IDE with the

Sorting from subroutine call

2006-12-02 Thread Sergio Escalada
Hi all! I would like to know if it's possible to make an array sorting with a subroutine call. Usually, a sort is made as, for example: sort {$a <=> $b} @array; But my intention is something like: sort subroutine_call @array; sub subroutine { $a <=> $b; } How could I do it? Thanks. Ser

Re: Sorting from subroutine call

2006-12-02 Thread W.P.Nijhof
Sergio Escalada wrote: Hi all! I would like to know if it's possible to make an array sorting with a subroutine call. Usually, a sort is made as, for example: sort {$a <=> $b} @array; But my intention is something like: sort subroutine_call @array; If you really want to call it like this

Re: Sorting from subroutine call

2006-12-02 Thread Lawrence Statton XE2/N1GAK
> Hi all! I would like to know if it's possible to make an array sorting with > a subroutine call. > > Usually, a sort is made as, for example: > > > sort {$a <=> $b} @array; > > > But my intention is something like: > > > sort subroutine_call @array; > > sub subroutine > { > $a <=> $b; > }

Re: Sorting from subroutine call

2006-12-02 Thread Rob Dixon
Sergio Escalada wrote: Hi all! I would like to know if it's possible to make an array sorting with a subroutine call. Usually, a sort is made as, for example: sort {$a <=> $b} @array; But my intention is something like: sort subroutine_call @array; sub subroutine { $a <=> $b; } How cou

Re: Sorting from subroutine call

2006-12-02 Thread Rob Dixon
Sergio Escalada wrote: Hi all! I would like to know if it's possible to make an array sorting with a subroutine call. Usually, a sort is made as, for example: sort {$a <=> $b} @array; But my intention is something like: sort subroutine_call @array; sub subroutine { $a <=> $b; } How cou

Re: Sorting from subroutine call

2006-12-02 Thread Sergio Escalada
Thanks for replies. The purpouse of this mini-script is to list the rows from a database loaded in memory ($ref_db is the reference to hashtable that cotains the DB). So I want to order the fields by different sort rules, and make the proccess as abstract as it's possible with a subrutine (sub cm

Re: Sorting from subroutine call

2006-12-02 Thread Bill Jones
On 12/2/06, Sergio Escalada <[EMAIL PROTECTED]> wrote: The purpouse of this mini-script is to list the rows from a database loaded in memory ($ref_db is the reference to hashtable Another idea - sub sortrows { my $sorted = @_; $sorted = -(($a->{ahash} eq 'x') <=> ($b->{ahash} eq 'x')) if $

Re: Sorting from subroutine call

2006-12-02 Thread Lawrence Statton XE2/N1GAK
> The purpouse of this mini-script is to list the rows from a database loaded > in memory ($ref_db is the reference to hashtable that cotains the DB). So I > want to order the fields by different sort rules, and make the proccess as > abstract as it's possible with a subrutine (sub cmpRule). This s

Re: Limit of number of files that can be opened in perl

2006-12-02 Thread Tom Phoenix
On 12/1/06, Ravi Malghan <[EMAIL PROTECTED]> wrote: Hi: is there a limit on number of files that can be open within perl. Some systems use ulimit to put an upper limit on the number of open files. And I believe that at least some perl releases have an overall limit of 128 files at once. I am

Re: Net::EasyTCP

2006-12-02 Thread Derek B. Smith
--- zentara <[EMAIL PROTECTED]> wrote: > On Fri, 1 Dec 2006 20:31:11 -0800 (PST), > [EMAIL PROTECTED] > ("Derek B. Smith") wrote: > > >I was hoping for socket data transfers to mimic an > >sftp/ftp get without having to deploy code to the > >clients and or deploying this module on the > clients.

Re: Sorting from subroutine call

2006-12-02 Thread Mumia W.
On 12/02/2006 06:22 AM, Sergio Escalada wrote: Hi all! I would like to know if it's possible to make an array sorting with a subroutine call. Usually, a sort is made as, for example: sort {$a <=> $b} @array; But my intention is something like: sort subroutine_call @array; sub subroutine {

Modifying a PNG File

2006-12-02 Thread Leonid Grinberg
Hello, Is there a (relatively simple) way to modify an image in Perl? Ideally, this would be a PNG or GIF image. I just need to be able to modify the colors of specific pixels. Thanks in advance! -- Leonid Grinberg [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional c

Re: Limit of number of files that can be opened in perl

2006-12-02 Thread Ravi Malghan
Hi all: thanks for the responses. I should have done this in the beginning. I checked the status open returns. I try to open 388 files, but it returned true(1) only 249 times (for the first 249 opens). So I guess thats the limit. Also to make sure I am doing the right way, the following is how

Re: Sorting from subroutine call

2006-12-02 Thread Sergio Escalada
# # hashref? Why in the WORLD is the database being kept in a hashref? # Oh, it's an exercise for class, and I must keep data in a hashtable, it's not my fault ^_^ Thanks for your code :) # # if you have a small number of columns you want to sort by, build a # simple subroutine to sort by

Re: Sorting from subroutine call

2006-12-02 Thread D. Bolliger
Sergio Escalada am Samstag, 2. Dezember 2006 15:41: > Thanks for replies. > > The purpouse of this mini-script is to list the rows from a database loaded > in memory ($ref_db is the reference to hashtable that cotains the DB). So I > want to order the fields by different sort rules, and make the pr

Re: Re: Limit of number of files that can be opened in perl

2006-12-02 Thread Jay Savage
Ravi, Please don't top post. On 12/2/06, Ravi Malghan <[EMAIL PROTECTED]> wrote: Hi all: thanks for the responses. I should have done this in the beginning. I checked the status open returns. I try to open 388 files, but it returned true(1) only 249 times (for the first 249 opens). So I gues

[OT] Re: Net::EasyTCP

2006-12-02 Thread D. Bolliger
Derek B. Smith am Samstag, 2. Dezember 2006 17:08: > --- zentara <[EMAIL PROTECTED]> wrote: > > On Fri, 1 Dec 2006 20:31:11 -0800 (PST), > > [EMAIL PROTECTED] > > > > ("Derek B. Smith") wrote: > > >I was hoping for socket data transfers to mimic an > > >sftp/ftp get without having to deploy code to

Re: Sorting from subroutine call

2006-12-02 Thread Sergio Escalada
Yes! It was exactly what I was trying to do. I wasn't so wrong after all. Thanks you, Dani, your code helps me a lot :D 2006/12/2, D. Bolliger <[EMAIL PROTECTED]>: Sergio Escalada am Samstag, 2. Dezember 2006 15:41: > Thanks for replies. > > The purpouse of this mini-script is to list the rows

Re: Modifying a PNG File

2006-12-02 Thread Tom Phoenix
On 12/2/06, Leonid Grinberg <[EMAIL PROTECTED]> wrote: Is there a (relatively simple) way to modify an image in Perl? Sure; use a module from CPAN. Ideally, this would be a PNG or GIF image. I just need to be able to modify the colors of specific pixels. Probably GD can do what you want; I

Re: Modifying a PNG File

2006-12-02 Thread Rob Dixon
Leonid Grinberg wrote: Hello, Is there a (relatively simple) way to modify an image in Perl? Ideally, this would be a PNG or GIF image. I just need to be able to modify the colors of specific pixels. Thanks in advance! Hello Leonid The GD module will do what you want. It will do a lot more b

Re: Limit of number of files that can be opened in perl

2006-12-02 Thread Mumia W.
On 12/01/2006 08:46 PM, Ravi Malghan wrote: Hi: is there a limit on number of files that can be open within perl. I am opening about 194 files and am seeing some weird behaviour. When i write to the filehandles, I see it writes ok to some files and not to the others. But I donot see any errors

RE: Limit of number of files that can be opened in perl

2006-12-02 Thread Bliss, Kevin
> From: Ravi Malghan >bash-2.05$ ulimit -a >core file size (blocks) unlimited >data seg size (kbytes) unlimited >file size (blocks) unlimited >open files 256 >pipe size (512 bytes) 10 >stack size (kbytes) 8192 >cpu time (seconds) unlimit

Re: Checking for infinite loops

2006-12-02 Thread hOURS
Thanks, I suppose I understand that code example from 'perldoc -f alarm' a little better. But much of it remains mysterious. e.g. the very first thing within eval. The only brackets I've ever seen with variables are [] for list elements. What's going on with {}? And what a strange thing to

Help with WWW::Mechanize - Next Question

2006-12-02 Thread Mathew Snyder
With all the help I've received I've been able to get this working. This is my text: #!/usr/bin/perl use warnings; use strict; use WWW::Mechanize; use HTML::TokeParser; my $username = 'msnyder'; my $password = 'xxx'; my $status = 'open'; my $agent = WWW::Mechanize->new(); $agent->get('htt