Re: hash of arrays sorting

2012-08-22 Thread Eduardo
On 22/08/12 03:49, Uri Guttman wrote: On 08/21/2012 08:29 PM, Eduardo wrote: how would you do with Sort::Maker? i don't have time to show an example now but it is much cleaner looking. all you need to do is code up how you extract each key from the data set and how it gets sorted (number vs

Re: hash of arrays sorting

2012-08-21 Thread Eduardo
$naa == $nba; return $nab = $nbb; } with this loop: foreach ( sort sorted keys $hash ) { print $_\n; } Eduardo. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: hash of arrays sorting

2012-08-21 Thread Eduardo
On 22/08/12 00:35, Uri Guttman wrote: On 08/21/2012 05:33 PM, Eduardo wrote: On 21/08/12 22:05, Chris Stinemetz wrote: Hello List, I am trying to sort a hash of arrays ( example below: ) I would the sort to sort in ascending order the first index of the array then the second index

Re: perlcc, par, another ?

2010-03-31 Thread Eduardo Terzella
scripts in 5:10 2010/3/29 Shlomi Fish shlo...@iglu.org.il On Monday 29 Mar 2010 17:47:30 Eduardo Terzella wrote: Look with using PAR. pp -o testeC teste.pl teste.pl #!/usr/bin/perl print Hello World\n; Size file: teste.pl = 4.0 k testeC = 3.6 M

Re: perlcc, par, another ?

2010-03-31 Thread Eduardo Terzella
it. 2010/3/29 Shlomi Fish shlo...@iglu.org.il Replying to the list, next time - hit reply to all. On Monday 29 Mar 2010 17:29:15 Eduardo Terzella wrote: I know it's possible to open my obfuscate your source code, but I want something just that impede it. I used the perlcc, so that the version

Unsubscrime from the list

2005-04-18 Thread Eduardo Vázquez Rodríguez
Unsubscrime from the list Thank U -- If I have seen further it is by standing on the shoulders of the giants Isaac Newton -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

COPY FROM Postgresql

2005-02-25 Thread Eduardo Vázquez Rodríguez
Hello Does anybody has already programmed the way of using the COPY FROM function from postgres, I try producing the following code: my ($dbh, $sth10); $dbh = DBI-connect(dbi:Pg:dbname=$database, $username, $password) or die Error: $DBI::errstr \n; $sth10 = $dbh-prepare (COPY

Re: Upgrading from Perl 5.6 to Perl 5.8

2005-02-23 Thread Eduardo Vázquez Rodríguez
Where did you install perl? Does your environment variables are pointing to the new perl version?. I had the same error and I fixed changing the usual path /usr/bin/perl to the new one /usr/local/bin/perl, just use the ln command As long as I remember the newer versions of perl are installed

Solaris Perl Execution

2005-02-17 Thread Eduardo Vázquez Rodríguez
Hello perl addicts! Is there a possible way of executing a Perl Script so that it uses not only one Solaris Processor? What I want is that my script use more than one processor, because they took much time to execute. What I do with my scripts are parsing log files (each one about 800 000

Re: Start reading from a specific line

2005-02-15 Thread Eduardo Vázquez Rodríguez
I know that programming is not one of my best skills, but this code works for me, your help is very appreciate open(INPUT, $file) or die Can't read from file: $! $file; # Where we move the pointer to line number 10 $. = 0; do { $_ = INPUT } until $. == 10;

Start reading from a specific line

2005-02-14 Thread Eduardo Vázquez Rodríguez
Hello Perl Programmers I have a question regarding openning a file How can I start reading a file from n line? For example I open a File like this way open(INPUT, $file) while (INPUT) { do something with $_; } But It starts to read from line #1, what I want is that start reading exactly

RE: Start reading from a specific line

2005-02-14 Thread Eduardo Vázquez Rodríguez
] To Perl Beginners beginners@perl.org 02/14/2005 04:13 cc PM Subject Re: Start reading from a specific line Eduardo Vázquez Rodríguez wrote: Hello Perl

Re: perl and PostgreSQL?

2005-02-01 Thread Eduardo Vázquez Rodríguez
Did you have already check the compile process of the Perl Module that provides access to Postgres? If you have do it. Then my code might help you use DBI; use diagnostics; use strict; my $database=Database; my $username=postgres; my $password=123; my ($mbd, $sth1); $mbd =

Perl and Threads

2004-10-11 Thread Eduardo Vázquez Rodríguez
Hello Im writing perl scripts that use threads. Mi goal is that each thread could process an element of an array that has 10 elements, so thread0 process array[0], thread1 process array[1] and so on until thread9 process array[9] Those 10 lines come from a file that Perl reads in chunks of ten

Upgrading from version 5.8.0 to 5.8.5 on Solaris

2004-10-06 Thread Eduardo Vázquez Rodríguez
Hello everybody! My intention is to have thread support in Perl, reding through CPAN I must have a Perl version compiled with support to threads. I made a script and I have the following output This Perl hasn't been configured and built properly for the threads module to work. (The

Open a text file

2004-09-29 Thread Eduardo Vázquez Rodríguez
Hello everyone I have a question, how do I open a file in a specific line number, for example I want to open a text file exactly on line number 5, Thanks in advanced -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Open a text file

2004-09-29 Thread Eduardo Vázquez Rodríguez
Thanks Chris I try this and works $. = 0; do { $_ = INPUT } until $. == 5; WHILE INPUT { Do_whatever_you_like_begining_after_line_5(); :-) } Chris Devers wrote: On Wed, 29 Sep 2004, Eduardo Vázquez Rodríguez wrote: I have a question

Perl and Postgres

2004-09-29 Thread Eduardo Vázquez Rodríguez
Hello everybody out there using postgres and perl I am writing Perl scripts with the purpouse of parsing text and inserting the text parsed into a database, which I choose Postgresql. My scripts are many, exactly 7, if I ran each one of them sequencially, my processing speed is about 200 lines

Threads Perl On Solaris

2004-09-10 Thread Eduardo Vazquez Rodriguez
Hello everyone out there using Perl. Im doing perl scripts that parses log files of networking devices. In this forum thanks to everyone suggest me to take several lines at time. I can do that already, but I have another problem. If I read 5 lines at time I have to process each once at time,

String to integer

2004-09-09 Thread Eduardo Vazquez Rodriguez
Using regular expressions I match a criteria in a text string, such as: @duration = $string =~ /\sduration=(.*?)\s/; The first element in duration contains 1.23, in a string format When I try to insert $duration[0], into a field of integer type in a database, I get the Following error: Error

Re: String to integer

2004-09-09 Thread Eduardo Vazquez Rodriguez
September 2004 01:49 pm, Jeff 'japhy' Pinyan wrote: On Sep 9, Eduardo Vazquez Rodriguez said: @duration = $string =~ /\sduration=(.*?)\s/; The first element in duration contains 1.23, in a string format When I try to insert $duration[0], into a field of integer type in a database, I get

Reading Multiple Lines

2004-09-08 Thread Eduardo Vázquez Rodríguez
lines at the same time? can anyone suggest any better strategy? -- Eduardo Vázquez Rodríguez [EMAIL PROTECTED] Consultoría Implantación Tel. 5322 5200 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first

Re: create connection from html form into insert MySQL data script

2004-09-07 Thread Eduardo Vázquez Rodríguez
I think he is from Croatia. moreover in the last part of this message I think what he is pretending is to accomplish a better way of inserting into the database. I think that one of his goals is to avoid the use of the variable names when inserting I believe that he pretends to catch the

Perl Binary

2004-08-31 Thread Eduardo Vázquez Rodríguez
Hello everybody out there using Perl- Im doing a perl scripts, which objective is to parse text. I am looking for a way of creating a perl binary, my intention is that no one can read the scripts in a human readable way. Thanks in advance -- Eduardo Vázquez Rodríguez [EMAIL PROTECTED

Re: Help installing Perl and Perl Modules on Mac OS X

2003-01-31 Thread Eduardo Cancino
Sorry, won't happen again. On Thursday, January 30, 2003, at 10:09 AM, [EMAIL PROTECTED] wrote: Please be sure to always group reply. On Thu, 30 Jan 2003 09:12:15 -0600, Eduardo Cancino [EMAIL PROTECTED] wrote: As I recall installing Perl

perl 5.8.0,

2002-11-25 Thread Eduardo Cancino
Hi : My box - eMac, MacOSX Jaguar 10.2.1, DevTools installed After installing perl 5.8.0, I ran a perl script, and perl send this message: error perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LC_ALL = (unset), LANG = en_US are

Content Management System - very newbie question

2002-09-26 Thread Eduardo Cancino
Hi Enlightened Ones... I need to build a website that has a classification like this h - human n - natural resources i - enviroment impact and then subclasses ie. h6 - health and then the object h6.1 - Aids For this I have every text in .rtf and I have a excel datasheet for the video

regex

2002-06-07 Thread Eduardo Cancino
Hi. I'm parsing a text file with this estrcuture line: 'here is a quote'. Autor (birth year - death year); occupation nationality. == I need to separate from the beggining to the first dot, ignoring the dots in side the two ''. but i have tried to escape the ' (\'), but no use, what i'm

Regexp

2002-05-09 Thread Eduardo Cancino
Hello! I have a lot of trouble understanding regexes, i just don't get how to parse a file with: Hablar es el arte de sofocar e interrumpir el pensamiento. Thomas Carlyle (1795-1881); historiador y ensayista escocés. Se aprende más por lo que la gente habla entre sí o por lo que se

DBD-ODBC - WIN2K - ACCESS

2002-04-26 Thread Eduardo Cancino
HI. I'm having this problem I have a memo field that i use for the main text and when i access it my script just prints a blank page, but when the field is reduced my scripts prints exactly as i want to: You know why?? SOME CODE #!c:/perl/bin/perl.exe # cargar modulos use DBI; use CGI

[OT] DBI-ODBC WIN2K

2002-04-23 Thread Eduardo Cancino
I have this problem now, maybe is not about perl but here I go: I connected an Access Datasource to a cgi, (made in Perl ;), but while in the command line runs perfectly, as a CGI, on my host, it outputs: Software error: No pude conectarme : (DBD: db_login/SQLConnect err=-1) I know that maybe

RV: [OT] DBI-ODBC WIN2K

2002-04-23 Thread Eduardo Cancino
But how do I know who the correct user is??? I have tried todos (all) the admin but it doesnot work! -Mensaje original- De: David Kirol [mailto:[EMAIL PROTECTED]] Enviado el: Martes, 23 de Abril de 2002 02:45 p.m. Para: Eduardo Cancino Asunto: RE: [OT] DBI-ODBC WIN2K Eduardo

RE: [OT] DBI-ODBC WIN2K

2002-04-23 Thread Eduardo Cancino
:[EMAIL PROTECTED]] Enviado el: Martes, 23 de Abril de 2002 02:45 p.m. Para: Eduardo Cancino Asunto: RE: [OT] DBI-ODBC WIN2K Eduardo, Review your connect string. Make sure a user is specified. If not the CGI script's 'user' (usually nobody) will be passed and the db will reject it. HTH

ODBC - win2k

2002-04-22 Thread Eduardo Cancino
Hi everybody, i'm new to perl and i want to connect to an access database. I'm using DBI::ODBC but returns that it can connect to my database: Can't connect to database: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (SQL-IM002)(DBD:

What's wrong with this?

2002-01-24 Thread Eduardo Cancino
Hi everybody! The next script runs looks pefectly in IE but in Netscape it shows the source of the html... #!c:/perl/bin/perl.exe # recibe la forma. read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(//, $buffer); # inicia variables. $to = info\@domain.mx; $from = info\@domain.mx;

Re: What's wrong with this?

2002-01-24 Thread Eduardo Cancino
??? Thanks everybody... Lalo. - Original Message - From: Jeff 'japhy' Pinyan [EMAIL PROTECTED] To: Eduardo Cancino [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, January 24, 2002 10:39 PM Subject: Re: What's wrong with this? On Jan 24, Eduardo Cancino said: The next script