Integration Tests

2014-08-07 Thread marcos rebelo
requests I can use Mojolicious but I don't know what to use for the WebSocket tests. Anyone has an idea? Best Regards Marcos Rebelo -- Marcos Rebelo http://www.oleber.com/ Webmaster of http://perl5notebook.oleber.com

Re: baby perl to get the right date

2014-01-27 Thread marcos rebelo
single line. At least there's no simple map I can think of. Thanks, Luca -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- Marcos Rebelo http://www.oleber.com/ Webmaster of http

Moose Role Derivation

2012-08-22 Thread marcos rebelo
::Role, but I have no ideia how to solve the problem correctly. May I have your suggestions? Best Regards MArcos Rebelo -- Marcos Rebelo http://www.oleber.com/ Webmaster of http://perl5notebook.oleber.com

encoding and PDF::API2

2011-10-07 Thread marcos rebelo
= { 'Subject' = \x{fffd}\x{fffd}my subject, 'CreationDate' = 'D:20111006161347+02\'00\'', 'Producer' = \x{fffd}\x{fffd}LibreOffice 3.3, 'Creator' = \x{fffd}\x{fffd}Writer, 'Author' = \x{fffd}\x{fffd}Marcos Rebelo, 'Title' = \x{fffd}\x{fffd}my title

Re: Sorting a String

2011-08-16 Thread marcos rebelo
line in the string.  I need it sorted.  How would I approach this? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- Marcos Rebelo http://www.oleber.com/ Webmaster of http

Re: How can I install a perl module without a root authority?

2011-08-16 Thread marcos rebelo
tried to copy the .pm file to my own lib directory directly, but it says can't locate loadable perl module . Is there any other way to install perl modules without a root authority? Thanks. -- Marcos Rebelo http://www.oleber.com/ Webmaster of http://perl5notebook.oleber.com -- To unsubscribe

discover all packages subclassing some other package

2011-06-11 Thread marcos rebelo
for all your help Marcos Rebelo -- Marcos Rebelo http://www.oleber.com/ Webmaster of http://perl5notebook.oleber.com

Re: discover all packages subclassing some other package

2011-06-11 Thread marcos rebelo
I found an half solution, since it doesn't get me the -ALL_PACKAGES- mro::get_isarev($classname) How do I get the -ALL_PACKAGES-? Thanks for all your help Marcos Rebelo On Sat, Jun 11, 2011 at 08:25, marcos rebelo ole...@gmail.com wrote: I need to discover all the packages (not files

Re: how do i push a hashref into another hashref

2011-06-07 Thread marcos rebelo
(@{$selet_domU_data-{$_}}, { rets = %hash1 ); } print Dumper ([$selet_domU_data]); i also tried a combination of many other things but does not seem to work thanks in advanced -- Regards Agnello D'souza -- Marcos Rebelo http://www.oleber.com/ Milan Perl Mongers leader https

Re: memory doesn't free after lexical block

2011-05-19 Thread marcos rebelo
:  use only FLOSS. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- Marcos Rebelo http://www.oleber.com/ Milan Perl Mongers leader https://sites.google.com/site/milanperlmongers/ Webmaster of http

Re: Perl source code beautifier

2011-04-18 Thread marcos rebelo
try perltidy http://search.cpan.org/dist/Perl-Tidy/bin/perltidy Best Regards Marcos Rebelo On Mon, Apr 18, 2011 at 12:05, Bruno Costacurta tec...@costacurta.org wrote: Hello, I'm looking for a command line tool for Perl source code beautifier. Thanks for your help and advice. Bye, Bruno

Re: Dynamic replacement of the variable

2011-04-17 Thread marcos rebelo
. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- Marcos Rebelo http://www.oleber.com/ Milan Perl Mongers leader https://sites.google.com/site/milanperlmongers/ Webmaster of http

Re: Regular expression to capitalize first letter of words in sentence

2011-04-14 Thread marcos rebelo
this snippet more clear: #!/usr/local/bin/perl use v5.10; use strict; use warnings; my $text = jack and jill went up the hill to fetch a pail of water; $text =~ s~(\w{3,})~\u$1~g; $text =~ s~\b(and)\b~\l$1~ig; $text =~ s~\b(the)\b~\l$1~ig; say $text; Best Regards Marcos Rebelo On Thu, Apr 14, 2011 at 22:37

call method by name

2011-04-12 Thread marcos rebelo
Hi all I have a code like: foreach my $key ( ... ) { my $sub = get_$key; $self-$sub; ... } If I can do this, I can also do it without the variable $sub. What is the syntax? please Best Regards Marcos Rebelo -- Marcos Rebelo http://www.oleber.com/ Milan Perl Mongers leader https

Re: call method by name

2011-04-12 Thread marcos rebelo
On Tue, Apr 12, 2011 at 15:54, Paul Johnson p...@pjcj.net wrote: On Tue, Apr 12, 2011 at 03:26:49PM +0200, marcos rebelo wrote: Hi all I have a code like: foreach my $key ( ... ) {    my $sub = get_$key;    $self-$sub;    ... } If I can do this, I can also do it without the variable

inteligent DBI

2011-04-07 Thread marcos rebelo
like to do something like: $dbh-do( 'INSERT INTO my_table(field_1) VALUES (?)', [ 'pippo', { 'ora_type' = SQLT_BIN } ] ) is there a way to do this? maybe with some DBIx Best Regards Marcos Rebelo -- Marcos Rebelo http://www.oleber.com/ Milan Perl Mongers leader https://sites.google.com/site

Re: inteligent DBI

2011-04-07 Thread marcos rebelo
We have a internal wrapper, The problem is that doesn't work with Oracle ;) I'm implementing it now. Oracle madness Best Regards Marcos Rebelo On Thu, Apr 7, 2011 at 11:57, Rob Coops rco...@gmail.com wrote: Even if it is not possible at the moment you could always overwrite this function

Oracle nightmare

2011-04-06 Thread marcos rebelo
$sth = $dbh-prepare( 'SELECT field_1, field_2 FROM my_table', undef ); $sth-execute(); while ( my ( $field_1, $field_2 ) = $sth-fetchrow() ) { say ( $field_1, $field_2 ); } } Thanks Marcos Rebelo -- Marcos Rebelo http://www.oleber.com/ Milan Perl Mongers

Re: Oracle nightmare

2011-04-06 Thread marcos rebelo
6, 2011 at 12:07, Paul Johnson p...@pjcj.net wrote: On Wed, Apr 06, 2011 at 10:24:37AM +0200, marcos rebelo wrote: Hi all I have already lost one day around coding and documentation with this problem, so I'm asking for help with DBD::Oracle. I'm working around the unicode and BLOB problem

Re: file manipulation

2011-02-14 Thread marcos rebelo
-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- Marcos Rebelo http://www.oleber.com/ Milan Perl Mongers leader https://sites.google.com/site/milanperlmongers/ Webmaster of http://perl5notebook.oleber.com

Re: perl training material and excercises for freshers

2011-01-03 Thread marcos rebelo
I used this slides to give a Perl training 3 times. http://www.slideshare.net/oleber/perl-introduction The course is done in a week, supposing that your juniors know how to program any other language. Best luck Marcos Rebelo -- Marcos Rebelo http://www.oleber.com/ Milan Perl Mongers leader

Re: perl training material and excercises for freshers

2011-01-03 Thread marcos rebelo
The course is done in a week, supposing that your juniors know how to program any other language. Best luck Marcos Rebelo -- Marcos Rebelo http://www.oleber.com/ Milan Perl Mongers leader https://sites.google.com/site/milanperlmongers/ Webmaster of http://perl5notebook.oleber.com On Mon, Jan 3

Re: SSH to remote machines..

2010-10-20 Thread marcos rebelo
, $exit) = $ssh-cmd($cmd); ... } Best Regards Marcos Rebelo On Tue, Oct 19, 2010 at 11:43 AM, Bob Null burnabybo...@gmail.com wrote: Hello Folks, I want to create a chuck of code that will take a list of instructions (things one would type at a shell) and have them run one by one until

Fwd: SSH to remote machines.. 6D7-36A

2010-10-20 Thread marcos rebelo
Can someone take of the SPAM Assin??? -- Forwarded message -- From: marcos rebelo ole...@gmail.com Date: Wed, Oct 20, 2010 at 12:34 PM Subject: Re: SSH to remote machines.. To: Bob Null burnabybo...@gmail.com Cc: beginners@perl.org I usually use http://search.cpan.org/dist/Net

Re: perl or python

2010-10-10 Thread marcos rebelo
. Octavian -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- Marcos Rebelo http://oleber.freehostia.com Milan Perl Mongers leader http://milan.pm.org Webmaster of http://perl5notebook.oleber.com

Re: Perl Threads

2010-10-10 Thread marcos rebelo
Good and threads are hardly find together. Perl has a share nothing model. I would really consider to 'use forks', the syntax is similar and usually gets the work done. http://search.cpan.org/dist/forks/lib/forks.pm Best Regards Marcos Rebelo On Sun, Oct 10, 2010 at 5:08 PM, chillidba testa

Fwd: Perl Threads 6D7-36A

2010-10-10 Thread marcos rebelo
Good and threads are hardly find together. Perl has a share nothing model. I would really consider to 'use forks', the syntax is similar and usually gets the work done. http://search.cpan.org/dist/forks/lib/forks.pm Best Regards Marcos Rebelo On Sun, Oct 10, 2010 at 5:08 PM, chillidba testa

Re: [Milan-pm] New note on page5notebook

2010-10-07 Thread marcos rebelo
-and a lot of courage-to move in the opposite direction.” Best Regards Marcos Rebelo 2010/10/7 Gianluca Casati casati_gianl...@yahoo.it: I would use more $DBI::errstr after a prepare, an execute or a connect. Something like $dbh = DBI-connect( $NZ_SOURCE , $NZ_USER , $NZ_PASSWORD ) or die

Re: [Milan-pm] New note on page5notebook

2010-10-07 Thread marcos rebelo
hours/week. Best Regards Marcos Rebelo On Thu, Oct 7, 2010 at 12:08 PM, Oha o...@oha.it wrote: On 10/07/2010 11:27 AM, marcos rebelo wrote: but for such a simple query, I would prefer eval {    my $ss = SmartSelect-new($dsn, $user, $password);    my $hash = $ss-select_document_by_id($id)-[0

New note on page5notebook

2010-10-05 Thread marcos rebelo
Hi all I did one more note at: http://perl5notebook.oleber.com/objects/smart-selects-with-dynamic-response-to-undefiend-method-calls One example of the use of AUTOLOAD, to do some SQL dinamically. Comments are well come Best Regards Marcos Rebelo -- Marcos Rebelo http

The site of Perl Recipes/Notebook is alive, just moved to a sorter address

2010-09-15 Thread marcos rebelo
Hi all I moved all the content of http://sites.google.com/site/oleberperlrecipes/ to a more more appealing address http://perl5notebook.oleber.com and I added some more recipes in there. Best Regards Marcos Rebelo -- Marcos Rebelo http://oleber.freehostia.com Milan Perl Mongers leader http

Re: How to test Output when using IPC::Open3

2010-08-29 Thread marcos rebelo
? or this: trap {shell_run('perl', '-E', 'print STDERR TEXT IN')}; is( $trap-stdout, TEXT IN); Thanks Marcos On Mon, Aug 30, 2010 at 6:32 AM, C.DeRykus dery...@gmail.com wrote: On Aug 28, 10:42 pm, ole...@gmail.com (marcos rebelo) wrote: the idea is to process the STDOUT ad the STDERR. open

How to test Output when using IPC::Open3

2010-08-28 Thread marcos rebelo
IN);' executing ok, instead of that I have the test 'is( $trap-stdout, );'. I need to test the output inside the loop in there, I have tried allot of solution but I just don't get it How do I do it? Thanks for your help Best Regards Marcos Rebelo -- Marcos Rebelo http

Re: How to test Output when using IPC::Open3

2010-08-28 Thread marcos rebelo
the idea is to process the STDOUT ad the STDERR. open don't do it Best Regards Marcos Rebelo On Sun, Aug 29, 2010 at 6:08 AM, John W. Krahn jwkr...@shaw.ca wrote: C.DeRykus wrote: Since you mention simplifying the code, do you actually need IPC::Open3 ?  In your sample code, you're only

A new recipe as arrived

2010-07-24 Thread marcos rebelo
...@googlegroups.com Best Regards Marcos Rebelo -- Marcos Rebelo http://oleber.freehostia.com Milan Perl Mongers leader http://milan.pm.org Webmaster of http://sites.google.com/site/oleberperlrecipes/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail

Re: A new recipe as arrived

2010-07-24 Thread marcos rebelo
On Sun, Jul 25, 2010 at 12:33 AM, Jeff Pang pa...@arcor.de wrote: 2010/7/25 marcos rebelo ole...@gmail.com: Hi all Trying to make exceptions handling a little more clear, or much more frightening. http://sites.google.com/site/oleberperlrecipes/recipes/06-error-handling/00---simple-exception

Re: how to sort in perl where the key is the 2nd of 3 components of a string where a dash is the separator?

2010-07-23 Thread marcos rebelo
{ $a-[0] cmp $b-[0] } map { [ $compute-(), $_ ] } @_; } schwartzian_transform { (split /-/, $_)[1] } @array; More information on: http://sites.google.com/site/oleberperlrecipes/recipes/01-variables/02-arrays/03-sort-arrays?pli=1 Best regards Marcos Rebelo -- Marcos Rebelo http

I don't wont to create more lines of code then the necessary

2010-07-09 Thread marcos rebelo
lines of code? Note: I didn't do the prototype subroutine Best Regards Marcos Rebelo -- Marcos Rebelo http://oleber.freehostia.com Milan Perl Mongers leader http://milan.pm.org Webmaster of http://sites.google.com/site/oleberperlrecipes/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

Re: I don't wont to create more lines of code then the necessary

2010-07-09 Thread marcos rebelo
The idea is really to count the lines, This will run in a test and seems to me the most clear code. the original code is +-: is( scalar( split( /\n/, $trap-stdout ) ) ), 15); The lines have no special order. Best Regards Marcos Rebelo On Fri, Jul 9, 2010 at 3:42 PM, Chas. Owens chas.ow

Re: A recipe was rewritten

2010-07-06 Thread marcos rebelo
On Sat, Jul 3, 2010 at 4:00 PM, Dr.Ruud rvtol+use...@isolution.nl wrote: marcos rebelo wrote: There was some discussion in the recipe, so I rewrite it: http://sites.google.com/site/oleberperlrecipes/recipes/05-io/02-slurp-a-file Please comment this ore any other recipe. Remember that you

Re: [Milan-pm] A recipe was rewritten

2010-07-06 Thread marcos rebelo
and the Programming Perl books. Telling the truth, even with almost exclusive 10 years Perl experience, having the Perl Cookbook at my side was always useful. Now this book is outdated and the website may help in this point. Best Regards Marcos Rebelo Of course, we may always discusse evrything

A recipe was rewritten

2010-07-03 Thread marcos rebelo
Hy all There was some discussion in the recipe, so I rewrite it: http://sites.google.com/site/oleberperlrecipes/recipes/05-io/02-slurp-a-file Please comment this ore any other recipe. Remember that you may also propose some other useful recipe. Best Regards Marcos Rebelo -- Marcos Rebelo

Re: One new Recipe has arrived: When shall we use default variables?

2010-06-28 Thread marcos rebelo
the intentions more clear. Now setting shift inside logic, I clearly say: please add the @_ and make clear that you know the array that you are using, make clear your intentions. Best regards Marcos Rebelo On Mon, Jun 28, 2010 at 4:15 PM, Shlomi Fish shlo...@iglu.org.il wrote: Hi Shawn

Re: One new Recipe has arrived: When shall we use default variables?

2010-06-28 Thread marcos rebelo
at some time. Note: 90% of the times, in this cases, I use shift and I don't create the @data variable, I use the @_ directly. @_ has a clear meaning. Best Regards Marcos Rebelo On Mon, Jun 28, 2010 at 6:12 PM, Randal L. Schwartz mer...@stonehenge.com wrote: marcos == marcos rebelo ole

Re: One new Recipe has arrived: When shall we use default variables?

2010-06-28 Thread marcos rebelo
On Sun, Jun 27, 2010 at 11:55 PM, John W. Krahn jwkr...@shaw.ca wrote: marcos rebelo wrote: Hi all Hello, This time, it's much more a personal opinion than a recipe. http://sites.google.com/site/oleberperlrecipes/recipes/01-variables/04---misc/01-when-shall-we-use-default-variables

One new Recipe has arrived: When shall we use default variables?

2010-06-27 Thread marcos rebelo
Hi all This time, it's much more a personal opinion than a recipe. http://sites.google.com/site/oleberperlrecipes/recipes/01-variables/04---misc/01-when-shall-we-use-default-variables Opinions are always welcome in perl-reci...@googlegroups.com Best Regards Marcos Rebelo -- Marcos Rebelo

Is this a feature or a bug?

2010-04-29 Thread marcos rebelo
, , , the second 'any' should have returned a true value or not, and why??? Best Regards Marcos Rebelo -- Marcos Rebelo http://oleber.freehostia.com Milan Perl Mongers leader http://milan.pm.org -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h

Re: Is this a feature or a bug?

2010-04-29 Thread marcos rebelo
With all this solutions, seems that I may use: 'our $_' or '$::_' But it is really crazy in designers of perl to make this. If this isn't a major bug, Damian needs to write some new rule in is book. Best Regards Marcos Rebelo On Thu, Apr 29, 2010 at 5:56 PM, marcos rebelo ole...@gmail.com

busy_handler in sqlite

2009-03-19 Thread marcos rebelo
Hi all I'm a Perl programmer (not a complete beginer) using SQLite. I want to retry to execute every command automatically, until the DB is not locked. In C seems that I need to set the busy_handler. How do I do this with DBD in Perl? Thanks for any help Best Regards Marcos Rebelo -- Marcos

Re: Can't install CDB_File

2008-01-25 Thread marcos rebelo
Hy all I'm using the last Ubuntu. What shell I ask to the apt? Thanks for the help Marcos On Jan 25, 2008 1:38 PM, Chas. Owens [EMAIL PROTECTED] wrote: On Jan 25, 2008 1:39 AM, marcos rebelo [EMAIL PROTECTED] wrote: Hi all I'm having all this problems, can someone help me? Best

Can't install CDB_File

2008-01-24 Thread marcos rebelo
of 'unary *' CDB_File.c:1041: error: invalid type argument of 'unary *' make: *** [CDB_File.o] Error 1 /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible -- Marcos Rebelo http

Collect the output of a shell command and set it in a file

2007-04-03 Thread marcos rebelo
can use IPC::open3 but the order of the output, how can I do that part??? Please post the script if it is simple Thanks for the help. Marcos -- Marcos Rebelo http://oleber.freehostia.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

writing a file in IIS

2007-01-26 Thread marcos rebelo
: . time()); print xx: . time(); close $file; Probably I need to do something in the IIS server, but what? Thanks for any help -- Marcos Rebelo http://oleber.awardspace.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: writing a file in IIS

2007-01-26 Thread marcos rebelo
Windows XP Pro and IIS 5.1 (the one comming in the Windows XP CD). Please help, I really need this on monday. Note: I'll just contact you toorow Thanks Marcos On 1/26/07, Bill Jones [EMAIL PROTECTED] wrote: [off list] On 1/26/07, marcos rebelo [EMAIL PROTECTED] wrote: - I install IIS

Re: Java 1.6 support to Perl

2007-01-15 Thread marcos rebelo
in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. -- Marcos Rebelo http://oleber.awardspace.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Java 1.6 support to Perl

2007-01-12 Thread marcos rebelo
Hy all It seems that Java 1.6 isn't supporting Perl, :'( bad sun. When will this be fix? Thanks Marcos -- Marcos Rebelo http://oleber.awardspace.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Jobs in Rome/Italy

2006-08-14 Thread marcos rebelo
Hy Perl's This is a little out of the scope of this place but I really need help I'm moving to Rome and I'm trying to find some contacts of enterprises using Perl (I need a job) in there. Can I've your support? thanks -- Marcos Rebelo http://oleber.awardspace.com/ -- To unsubscribe, e-mail

Re: Next

2006-07-06 Thread marcos rebelo
explain what it means? !defined($rt_nearest) or $dh$dist or next; Kind regards, Geetha -- Marcos Rebelo http://oleber.awardspace.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

substring

2005-08-17 Thread marcos rebelo
If I'm not wrong, Changing this lines: my @col = grep(!/\t/, split(/(\t)/, $line)); push(@col, ) if $line =~ /\t$/; by $line .= \t; my @col; my $lastIndex = 0; foreach my $actualIndex

Re: substring

2005-08-17 Thread marcos rebelo
On 8/17/05, Paul Johnson [EMAIL PROTECTED] wrote: On Wed, Aug 17, 2005 at 06:26:16PM +0100, marcos rebelo wrote: If I'm not wrong, Changing this lines: my @col = grep(!/\t/, split(/(\t)/, $line)); push(@col, ) if $line =~ /\t

Backup of a subroutine

2005-08-03 Thread marcos rebelo
I need to redefine localy one subroutine and have it correctlly after. Who do I do it? sub myPrint () { print Teste 1\n; } sub test { no strict refs; no warnings; my $str = ::myPrint; #my $backup = $main::{myPrint}; my $backup = *$str; *$str = sub() {

Re: Backup of a subroutine

2005-08-03 Thread marcos rebelo
, marcos rebelo [EMAIL PROTECTED] wrote: I need to redefine localy one subroutine and have it correctlly after. Who do I do it? sub myPrint () { print Teste 1\n; } sub test { no strict refs; no warnings; my $str = ::myPrint; #my $backup = $main::{myPrint}; my

Re: Read output from script line by line

2005-06-09 Thread marcos rebelo
This way works open(my $FH, 'script.sh |') or die ...; while (my $line = $FH) { ... } close($FH); On 6/9/05, Tielman Koekemoer (TNE) [EMAIL PROTECTED] wrote: Hello all, Is there a way you read input from a script line by line. I'd rather parse output line by line than do: @out =

Re: XML::LibXSLT on Cygwin

2005-05-23 Thread marcos rebelo
This email has already sent but is about the XML::XSLT It is possible to install this Perl module in the Cygwin. When I do 'perl Makefile.pl' the script blows up and creats the file 'perl.exe.stackdump' I changed the code of the Makefile.pl inside the 'sub backtick' from open(STDOUT,

XML::LibXML on Cygwin

2005-05-22 Thread marcos rebelo
It is possible to install this Perl module in the Cygwin. When I do 'perl Makefile.pl' the script blows up and creats the file 'perl.exe.stackdump' I changed the code of the Makefile.pl inside the 'sub backtick' from open(STDOUT, $DEVNULL); open(STDERR, $DEVNULL); my $results =

installing XML::Xerces in Perl

2005-05-01 Thread marcos rebelo
I'm getting crazy I have the Xerces (I think) installed on Cygwin. Now I have to set some variables but I dont know to what, can someone help me XERCES_LIB XERCES_INCLUDE XERCESCROOT XERCES_CONFIG Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

PERL and XML

2005-04-18 Thread marcos rebelo
For the Universaty Project, I dicided to make a study about the use of Perl and XML. I have already found somethings to read in google but they seem to be desactualized (2002, 2003). So I would like to have your help to find new articles about the Perl support to the XML and all the tecnologis

RE: Regex against a scalar

2005-03-28 Thread Marcos Rebelo
I'm lost with this question, but try to run: print(abcd =~ /(b.)/) Is this what you need? Marcos -Original Message- From: Perl [mailto:[EMAIL PROTECTED] Sent: quinta-feira, 24 de Março de 2005 1:42 To: Beginner Perl Subject: Regex against a scalar Hi. I would like to search a

Create unexistent directories by FTP

2005-03-28 Thread marcos rebelo
I have a program that is supposed to send files throw FTP. And I'm using the Net::FTP. I have a destiny path and I need to create the directories if they don't exist. How do I check if a Directory exist? Actual code +-: sub fput($$$) { my ($ftp, $orig, $dest) = @_; return if $orig =~

Re: Create unexistent directories by FTP

2005-03-28 Thread marcos rebelo
Mar, marcos rebelo wrote: I have a program that is supposed to send files throw FTP. And I'm using the Net::FTP. I have a destiny path and I need to create the directories if they don't exist. Locally or remotely? How do I check if a Directory exist? -e $dir for local purposes

Re: Simplify perl -e '$a = [1,2,3,4,7]; print $a-[$#{@$a}]'

2005-03-14 Thread marcos rebelo
] wrote: -Original Message- From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED] Sent: Thursday, March 10, 2005 8:55 AM To: Marcos Rebelo Cc: Perl Beginners Subject: Re: Simplify perl -e '$a = [1,2,3,4,7]; print $a-[EMAIL PROTECTED]' Marcos Rebelo wrote: This is correctly

Simplify perl -e '$a = [1,2,3,4,7]; print $a-[$#{@$a}]'

2005-03-10 Thread Marcos Rebelo
This is correctly printing '7' but '$a-[EMAIL PROTECTED]' seems to be encripted code. Can I write this in a cleaner way? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

RE: Simplify perl -e '$a = [1,2,3,4,7]; print $a-[$#{@$a}]'

2005-03-10 Thread Marcos Rebelo
This really works, I didn't now that. Thanks Marcos Rebelo -Original Message- From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED] Sent: quinta-feira, 10 de Março de 2005 14:55 To: Marcos Rebelo Cc: Perl Beginners Subject: Re: Simplify perl -e '$a = [1,2,3,4,7]; print $a-[EMAIL PROTECTED

Reading and writing to a program

2005-02-25 Thread Marcos Rebelo
I need to do some commands in another machine, I will try something like 'rlogin machine'. I'm not allowed to install new packages in the machine :'( To simplifey I tried to run a simple command in perl to simulate a 'more' command. use IPC::Open2; use IO::Handle '_IOLBF'; My $pid = open2(my

Re: Reading and writing to a program

2005-02-25 Thread marcos rebelo
, Marcos Rebelo wrote: My $pid = open2(my $RDRFH, my $WTRFH, perl, -e, while () {print}); Using 'use warnings' should have told you that 'My' is broken here. What messages do you get when you try to run the program? -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED

Circular References, Self Referenced memory ang Garbage Collection

2005-01-04 Thread Marcos Rebelo
Some time ago I read one article about this Consider that you have: { # make $a point to itself my $a; $a = \$a; } Or { # make $a and $b point to each other my ($a, $b); $a = \$b; $b = \$a; } This memory will be free just at the end of the

Perl Presentation Slides

2004-12-14 Thread Marcos Rebelo
Hy all My next assignement is to do a presentation of Perl begginers (from zero) in 4 days :'( Actually I have already 71 slides and I would like to see other persons work in this matter. Someone know where to find or can give some Slides similar to the ones I'm doing. Thanks Marcos -- To

RE: assign operator as variable

2004-10-25 Thread Marcos Rebelo
the conventional symbol with other variable eg $AND_operator so that the following statement is valid if ($cond1 $AND_operator $cond2) Thanks On Mon, 25 Oct 2004 10:44:19 +0100, Marcos Rebelo [EMAIL PROTECTED] wrote: Maybe this can help $a = 1 or 0; print eval($a); -Original

Receve and forward email

2004-10-10 Thread marcos . rebelo
Hi all This is my first question. One part of my job is to read one e-mail from Pop3 and do a forward of that e-mail with SMTP to +- 1000 users, just changing the from and the to. There is something that can eseally do this? How to do this? Probably there is some modules that can do this work

RE: Data comparision analysis

2004-08-18 Thread Marcos . Rebelo
Gunnar Hjalmarsson wrote: David Greenberg wrote: #!/usr/bin/perl use strict; open (GROUPFH, File1); my @groups = (); while (my $line = GROUPFH) { chomp ($line); push (@groups, $line); } close (GROUPFH); open (USERFH, File2); my %group_to_users = (); while (my

RE: Trying To write a script

2004-08-09 Thread Marcos . Rebelo
-Original Message- From: Singh, Harjit [mailto:[EMAIL PROTECTED] Sent: Monday, August 09, 2004 4:05 PM To: [EMAIL PROTECTED] Subject: Trying To write a script I am trying to write a script that would be able to read a file. The file is broken into number of segments and each

E-mail Parsing

2004-08-04 Thread Marcos . Rebelo
I'm have a email in a text file. From this file I would like to get the sender information, the attached files and the body of the e-mail. Is there something simple to do this? Marcos -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Help on output formatting

2004-08-02 Thread Marcos . Rebelo
maybe you can do something like: ($text) = ($text =~ /([0-9]+)/); Before printing the text. -Original Message- From: sudhindra k s [mailto:[EMAIL PROTECTED] Sent: Monday, August 02, 2004 10:52 AM To: [EMAIL PROTECTED] Subject: Help on output formatting   Hi I have a

RE: CGI script just stops...

2004-07-22 Thread Marcos . Rebelo
Some time ago I had a similar error because I has not in the suposed directory. 1º try whith the full path. 2º see which is the directory where you really are. For getting the script directory you can use the use File::Spec; use FindBin; open(LISTFILE, .File::Spec-join($FindBin::Bin, $listfn))

RE: Pattern matching line by line

2004-06-16 Thread Marcos . Rebelo
why not to split the String first something like foreach my $line (split(/\n/, $a)) { if ($line =~ /whatever/) { print $line; } } shall do the trick Marcos -Original Message- From: bzzt [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 1:33 PM To: [EMAIL

RE: Any wrong?

2004-06-01 Thread Marcos . Rebelo
-Original Message- From: Jame Brooke [mailto:[EMAIL PROTECTED] Sent: Sunday, May 30, 2004 6:10 PM To: [EMAIL PROTECTED] Subject: Any wrong? Friend, anybody have idea regarding this problem. Assume I want know where the word call fish locate in which line number, and this

RE: Question of memory management in Perl

2004-05-26 Thread Marcos . Rebelo
-Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 25, 2004 8:08 PM To: [EMAIL PROTECTED] Subject: RE: Question of memory management in Perl From: [EMAIL PROTECTED] I don't know for sure the effect of: @out_array_bin =

RE: Question of memory management in Perl

2004-05-25 Thread Marcos . Rebelo
Probably you notice that you have +- 1kb for each hexa values. This seems that you have some global variables that are not necessary. Usually the solution is having the variables scoped to the minimum code area possible. Module 'strict' can help. for instance if you have something like. my

RE: array output

2004-05-24 Thread Marcos . Rebelo
Doing a fork shall help. Child runs the system command and exit. Pather creats a new child for the rest. foreach my $cmd (@cmds) { if (fork() == 0) { # child system($cmd); exit(0); } } Is this what you need? Marcos -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

get hash from array

2004-05-24 Thread Marcos . Rebelo
sub xpto { my %a = map {$_ = undef} (@_); return \%a; } or sub xpto { return {map {$_ = undef} (@_)}; } I'm using this code but shall exist someting clearner without map. Can you help me? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: get hash from array

2004-05-24 Thread Marcos . Rebelo
-Original Message- From: James Edward Gray II [mailto:[EMAIL PROTECTED] Sent: Monday, May 24, 2004 3:00 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: get hash from array On May 24, 2004, at 7:46 AM, [EMAIL PROTECTED] wrote: sub xpto { my %a = map {$_ =

Perl Coding Standarts

2004-05-19 Thread Marcos . Rebelo
I'm looking for Perl coding standards. I found some in the net but seems they are just web pages not really in use. I was looking for really in use perl coding standards and some opinions about them. I would also like to know if there is tools checking for this standards. For know I'm using

Install epic plugin in the eclips

2004-05-19 Thread Marcos . Rebelo
I don't have access to the internet from my computer. How do I set the epic working for me? Thanks MArcos -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

RE: Project Advice Wanted

2004-03-30 Thread Marcos . Rebelo
1) Now the problem is to chose. ASP, PHP, Pyton, ... 2) If you consider to be free from OS use the DBD/DBI for DB. There is already installed module in Win32 package for ODBC if you just need Windows. 3) In the Template area I use HTML::Template. Marcos -Original Message- From: Steve

bug in XML::Simple ?

2004-03-24 Thread Marcos . Rebelo
I did this shell command perl -e 'use XML::Simple qw(:strict); use Data::Dumper; print Dumper(XMLin(xxx_ab/_a/xxx, 'ForceArray' = 1, KeyAttr = []))' delete.txt And the output was $VAR1 = { '__a' = [ 'b' ] }; I was aspecting $VAR1 =

RE: Overriding 'die' Functions

2004-03-22 Thread Marcos . Rebelo
I'm working in a project that shall have +- the time of the Internet has we now it today. Sometimes my script throw a die and I just know the line where was throw. What I want is to have the all stack, something like java. Since changing the code would be a very expancive work, I would prefer to

Overriding 'die' Functions

2004-03-19 Thread Marcos . Rebelo
I would like to add some text each time someone calls die. in my books says this shoud work *CORE::GLOBAL::die = sub { ... } can someone give me a example? MArcos -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Some java some perl

2004-03-11 Thread Marcos . Rebelo
I'm doing one interface in java that will call some perl scripts. I need to catch the output and I don't know how to do it. If I execute the 'ls' command my java program finnish if I call the perl my program don't finnish. What am I missing? import java.io.DataInputStream; import

RE: Some java some perl

2004-03-11 Thread Marcos . Rebelo
I did this question in here because I was aspecting that I was not the first crazy man doing something like this. I'm a perl programmer not a java programmer. I know that I'll have problems calling one from the other like this. Probabli the final release will be a Server/Client application to

RE: Appending an small array into a larger array in a foreach lo op.

2004-03-03 Thread Marcos . Rebelo
foreach (@files) { @smallarray = ('$value1',$value2','$value3'); push(@largearray, [EMAIL PROTECTED]); } or foreach (@files) { push(@largearray, ['$value1',$value2','$value3']); } -Original Message- From: Jim Canfield [mailto:[EMAIL PROTECTED] Sent: Tuesday,

  1   2   >