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
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
::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
= {
'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
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
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
for all your help
Marcos Rebelo
--
Marcos Rebelo
http://www.oleber.com/
Webmaster of http://perl5notebook.oleber.com
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
(@{$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
: 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
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
.
--
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
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
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
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
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
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
$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
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
-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
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
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
, $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
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
.
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
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
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
-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
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
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
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
?
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
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
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
...@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
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
{ $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
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
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
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
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
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
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
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
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
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
, , ,
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
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
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
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
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
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
: . 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
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
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
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/
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
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
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
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
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() {
, 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
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 =
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,
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 =
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
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
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
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 =~
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
] 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
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
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
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
, 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
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
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
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
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
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
-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
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]
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
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))
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
-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
-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 =
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
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
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
-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 {$_ =
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
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
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
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 =
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
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/
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
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
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 - 100 of 159 matches
Mail list logo