Re: Write a plugin for an IRC bot

2016-03-29 Thread pablo baez
Thanks Brandon! -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Write a plugin for an IRC bot

2016-03-15 Thread pablo báez
0 the bot must reply Hi foo! after 20 seconds. How could I do that? I don't know how to trigger an event after a specified amount of time. Thanks in advance for any suggestions. Pablo. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginner

`perldoc -f` doesn't work for me

2015-05-23 Thread Pablo
/bin/perldoc => Pod::Perldoc v3.25 Attempting to drop privs... 'add_translator: translator for 'es' loaded 'process: 'find_good_formatter_class: Formatter class Pod::Perldoc::ToTerm version 3.25 successfully loaded! 'find_good_formatter_class: Will format with

Re: numeric comparison always returning true!

2009-09-25 Thread pablo
me. I'll use the pragma from now on. Pablo -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: numeric comparison always returning true!

2009-09-25 Thread pablo
7;s the benefit of using the 'use warnings' pragma vs. the '#!/usr/bin/perl -w' line? Thanks again, Pablo -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: numeric comparison always returning true!

2009-09-24 Thread pablo
On Thu, Sep 24, 2009 at 02:16:05PM -0400, Uri Guttman wrote: > >>>>> "p" == pablo writes: > > p> I have a script that tells me the largest file (in bytes) for each > p> extension. I store the largest size in a hash, keyed by the extension.

numeric comparison always returning true!

2009-09-24 Thread pablo
58880 is larger than 512342016 728705024 is larger than 616058880 6008832 is larger than 728705024 Notice that last line? Am I missing something obvious, or is there something wrong here? Pablo -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Search in LDAP using Perl

2009-08-07 Thread Juan Pablo Feria Gomez
e/7086 Is your LDAP directory running? If after reading that article, you still have problems, post your code (remove access information (binding passwords/valid ips) off course ) Good luck Juan Pablo... -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands,

Re: How to print errors to both STDERR & a file?

2009-06-24 Thread pablo
On Wed, Jun 24, 2009 at 09:41:10PM +0400, Roman Makurin wrote: > On Wed, Jun 24, 2009 at 09:25:05AM -0700, pa...@compugenic.com wrote: > > I'd like to automatically have my script's errors and warnings sent to > > both STDOUT (console) and a log file. What is the proper way of doing this? > > pri

Re: redirecting STDERR with IO::Tee

2009-06-24 Thread pablo
filehandle in a 'select' statement to set it as the default. But because this is STDERR I am not sure if this is possible with Perl. My goal is to learn something new about Perl and do this the right way, as this task will be quite common for me. There are a lot of script I run vi

How to print errors to both STDERR & a file?

2009-06-24 Thread pablo
I'd like to automatically have my script's errors and warnings sent to both STDOUT (console) and a log file. What is the proper way of doing this? Pablo -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

redirecting STDERR with IO::Tee

2009-06-22 Thread pablo
? Any help would be appreciated. Pablo -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: prob w/anonymous array

2009-05-20 Thread pablo
he ability to read. > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > Thanks to all for the suggestions. The suggestion by Chas (and others) to enclose the array reference in

prob w/anonymous array

2009-05-20 Thread pablo
12. My question is what am I doing wrong? How to I loop over each element in my anonymous array to process it? I've read the data structure tutorials and tried different things, but just can't seem to get this to work. Any suggestions would be highly appreciated. Pablo -- To uns

Re: FW: Bundle-Expect

2009-02-20 Thread pablo
> > Hi All, > > Another thing I found is, when I try the command "perldoc Bundle::Expect", it > displays the documentation. So it should be installed. But when I try with > "perldoc Expect", nothing is displayed. Is there any problem in the > installation? Is there any way to install? > > Reg

Re: breaking-apart and printing an input file

2009-02-20 Thread pablo
> > Your data is perfect for the paragraph mode* of readline: > Ahh, I forgot about paragraph mode. > #!/usr/bin/perl > > use strict; > use warnings; > > my $user = shift; > my $regex = qr/\A$user/; > > local $/ = ''; > while (my $record = ) { > chomp $record; > if ($record =~ /$

Re: how to do this in one line (with map?)

2009-02-20 Thread pablo
On Wed, Feb 18, 2009 at 10:12:44AM -0800, John W. Krahn wrote: > > my @ids = map /^\w/ ? (split)[0] : (), `mailq`; > thanks, this was just what I was looking for. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.

breaking-apart and printing an input file

2009-02-19 Thread pablo
I have a single input file with entries as follows: --snip-- USER1 [20090101] note bla bla bla bla bla bla USER2 [20090104] note bla bla bla bla bla bla --snip-- What I'm trying to do is create a single-argument script which displays all entries for a given user. So calling it as 'filter.pl us

how to do this in one line (with map?)

2009-02-18 Thread pablo
push @ids, (split)[0]; } I know it can be done with one line. Here's what I've got so far: my @ids = map {chomp; (split)[0] if /^\w/} `mailq`; This 'kinda' works, but it also adds a bunch of blank elements to the @ids array. What am I doing wrong? Thanks, Pablo -

Re: expect error

2008-10-21 Thread Juan Pablo Feria Gomez
> use strict; > use warnings; > use Expect; > use IO::Tty; > > $host = "192.168.1.72"; > $passwd= "xyz"; > $user = "xyz"; > > $t= "file.txt"; > my $connect = Expect->spawn("scp $t [EMAIL PROTECTED]:/work/$user/"); > $connect->expect(30,"\s") ||die "junk1"; > print $connect $passwd."\n"; Do you

Re: using ssh to do remote audit of machines

2008-09-10 Thread Juan Pablo Feria Gomez
>If you really need to do a ssh operation in Perl, see "perldoc Net::SSH". >For database oepration, see "perldoc DBI". Expect-perl can be another useful tool to record each program response... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://

Re: Consult about XS

2008-08-13 Thread Pablo Zea Aranibar
Aug 13, 2008 at 1:52 AM, Rob Dixon <[EMAIL PROTECTED]> wrote: > Pablo Zea Aranibar wrote: > > > > Hi, realy i need your help with this algorithm. > > what I need is another algorithm in order to improve my own. > > > > example: > > > > my $firsSet =

Re: Consult about XS

2008-08-12 Thread Pablo Zea Aranibar
; $counter++; }; }; }; @result = @{$temp}; }; print "@result\n"; But, both are still too slow. So, can you give me an idea to improve it?. someone tell me about mask, and bit operations. but i really dont know how to do it. so.. any suggestion?. there was a thread in a forum (here<http://forums.devshed.com/software-design-43/algorithm-design-536480.html>), but the solution was for python (recursive using "yield"). Thanks for your answer. Regards, Pablo Zea Aranibar Student from University UNSAAC Cusco - Peru

Consult about XS

2008-08-07 Thread Pablo Zea Aranibar
T I hope you can help me. Thanks for your time, Regards, Pablo Zea Aranibar Student from University UNSAAC Cusco - Peru

Re: Perl Expect help

2008-05-06 Thread Juan Pablo Feria Gomez
Here's a tiny code to get the prompt, hope it helps $actualprompt=''; $rootexpect->send("\n"); my $shpromvrfy = $rootexpect->expect(750,'#','>','$'); my $match=$rootexpect->match(); my @outp = split /\n/, $rootexpect->exp_before(); $actualprompt= "$o

Re: sourcing one perl file from another

2007-10-22 Thread Juan Pablo Feria Gomez
Great "howto" Jeff... Thanks :) On 10/22/07, Jeff Pang <[EMAIL PROTECTED]> wrote: > There are some ways to 'source' a config file like under unix shell. > Just show 3 ways below: > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.per

Re: How to install perl Expect module under cygwin

2007-09-23 Thread Juan Pablo Feria Gomez
Try installing manually IO::Pty before... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: perl script to modify LDAP.

2007-07-26 Thread Juan Pablo Feria Gomez
For multiple users, you need to 1. Open the file with the users names/password 2. Read that file 3. loop through the above command So I will let you tidy this up open (my $USERS,"<", "/file/of/users-password") or die ..; while (<$USERS>){ chomp; my ($user, $password) = split; #(I guess)

Running perl program at startup

2007-06-07 Thread Juan Pablo Feria Gomez
Hi all, I need to start a perl daemon at an BSD's startup (rc.local, not interactive), i found the way to run the script as a daemon, but i want: a) Send all the output to an tty , say, go to tty6 (ctrl+alt+F6) and see the output of my perl daemon b) Interact (if possible) on that TTY with the d

Help parsing a txt by blocks...

2006-10-04 Thread Juan Pablo Feria Gomez
I want to parse a big cisco configuration on TXT and create arrays per each configuration block... The script will know when each section begins/end with the "!" character I'm stuck.. :( Can someone give me any pointers on the documentation? Thanks in advance... Here is a fragment of a config

Re: Extract digits from string

2006-09-08 Thread Juan Pablo Feria Gomez
> my @array = $data =~ /\((\d+)\)/g; And what does this means ^^ ? is not an ^, is / next to a \(/\) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: "system" command help

2005-11-09 Thread Pablo Wolter
'm not in a box with perl to test this but something like that could work. Pablo. On 11/9/05, heena s <[EMAIL PROTECTED]> wrote: > > hi, > > is there any mistake in the script: > > #ADDING A TOOL GROUP > system("$addgroup \"$group\"") ==

Re: using system to run ssh $host command

2005-08-25 Thread Pablo Wolter
Hi: Try this: = `rsh -l 'command arg1 arg2 ..`; This works for me, I don't know if this is the best way or if it the more secure way to run a command in a remore machine, try to search CPAN for a module that can do something similar. Pablo. On 8/24/05, grover mitchell <[EM

Logger output behavior not wanted

2005-06-27 Thread Pablo Wolter
); use IO::File; $timeStamp=`date '+%m%d%Y:%H%M'`; chomp($timeStamp); $hostName=`/bin/uname -n`; chomp($hostName); $makeBackup="/home/pwolter/cstools/bin/makeBackup"; $errorCode=0; $errorLog="/home/pwolter/pablo/tools/bin/geoDbBackup"; chomp($errorLog); $errorLogFi

Re: Matching records in columns

2005-06-24 Thread Pablo Wolter
Chris Devers wrote: >On Fri, 24 Jun 2005, Pablo Wolter wrote: > > > >>I was searching how to do this but I have no idea if it is possible in >>perl. >> >> > >All things are possible :-) > >Well okay maybe not *all*, but if you can descr

Matching records in columns

2005-06-24 Thread Pablo Wolter
if there is data. I don't have to extract col4 row1, col2 row 2 for example. Is this possible with Perl and wich book/guide/tutorial I should read to learn to do this? Code will be welcome but I want to lear this technique if it is possible. Thanks in advance. Pablo. -- To unsubscribe, e

Re: @array =to=> $array

2005-06-09 Thread Pablo Wolter
[EMAIL PROTECTED] wrote: > Hi All > >Prob: I want to convert all the elememts of an array to ascalor variable that >I can use latter on in my code >e.g. > >my @array=qw/balli johney bobby/; >now here i need 3 different variable with the above values i.e. >my $name1=balli ; >my $name2=johney ;

Re: Help working/searching fields in 3 files

2005-03-25 Thread Pablo Wolter
[EMAIL PROTECTED] wrote: - Original Message - From: Pablo Wolter <[EMAIL PROTECTED]> Date: Thursday, March 24, 2005 3:43 pm Subject: Help working/searching fields in 3 files Hi, Hello, I need some ideas because I'm just trying and error programming. I have some .dat files t

Help working/searching fields in 3 files

2005-03-24 Thread Pablo Wolter
, $pointCodeId, $nodeType, $desc, $monitored) = split(' ')) if ($_ !~ /^#/); #This is to not consider the # at the begining of the .dat file foreach $pcError (@pcError) { print ("\t\t$name\n"); } closeAll(); But I don't know how to do it to test for the

Re: Effective Perl Programming - Still valid, dated 1998?

2005-02-15 Thread Pablo Wolter
production server and caution is not a bad practice :-) Thanks in advance for the help. (o_ Pablo A. Wolter N. //\ Usuario Registrado #284649 V_/_ Linux Debian Sid Kernel 2.6.8 "Piensoluego instalo Linuxentonces existo." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

reading an integer value from file?

2005-02-05 Thread pablo wablo
I'm trying to parse an avi header and I'm having problems getting the actual values of the integer data in the file. Here's what I do: open(INHANDLE, "tesmovie.avi.mp3") || die("can't open file"); my $line = ; my $datarate = substr($line, 4, 4) - 0; print "$datarate\n"; What I'm trying to do

RE: Search And Replace

2005-01-07 Thread pablo wablo
sorry sent it out ot the list if it's just V you want to replace you can try $something =~ s/V/v/g; --- "Adamiec, Larry" <[EMAIL PROTECTED]> wrote: > > > > -Original Message- > > From: William Black [mailto:[EMAIL PROTECTED] > > > Sent: Friday, January 07, 2005 08:42 > > To: begi

Re: Trouble with compound regular expression matching

2004-12-06 Thread pablo wablo
note that I only used a pair of //... --- pablo wablo <[EMAIL PROTECTED]> wrote: > > --- Jeffrey Paul Burger <[EMAIL PROTECTED]> wrote: > > > I tried everything I could think of to get this to > > work before pleading for > > help! > > > >

Re: Trouble with compound regular expression matching

2004-12-06 Thread pablo wablo
--- Jeffrey Paul Burger <[EMAIL PROTECTED]> wrote: > I tried everything I could think of to get this to > work before pleading for > help! > > I need to check if a file is either a TIFF or JPEG > graphics file. > (Case-insensitive variations of qualifying suffixes > would be .tif, .tiff, > .jpg

built-in switch statement?

2004-12-06 Thread pablo wablo
I'm just wondering what is the reason that switch is not built-in in perl... I can do a switch statement by using the Switch module, but I'm wondering why it's not already builtin with the interpreter. thanks __ Do You Yahoo!? Tired of spam? Yahoo

How's a simpler way to do this? (pattern)

2004-12-04 Thread pablo wablo
Hello, I'm new to perl. I'm trying a regular expression that accepts register format for assembly. (r0 - r31) I have this regexp $in =~ /\b[rR] ( ([0-9]) | ( [12][0-9] ) | ( 3[01] ))\b/x; it works fine but I'm not satisfied with it.. (too long!) I have something in mind but I dont know th

Re: Installing Perl DBI and Oracle DBD in AIX 5.1

2004-10-19 Thread Pablo Salinas
Hi, Thanks for your help. I searched the cc_r compiler in my AIX system, then copied the path to the Makefile and everything runned smoothly. After that, I installed the Oracle DBI by following the README instructions. thanks again, Pablo Salinas --- Wiggins d Anconia <[EM

Installing Perl DBI and Oracle DBD in AIX 5.1

2004-10-15 Thread Pablo Salinas
7 (S) "struct random_data" is undefined. make: 1254-004 The error code from the last command is 1. Stop." Can somebody help me to get the job done? thanks in advance, Pablo Salinas _ Do You Yahoo!? In

adding path to $PATH

2003-12-10 Thread Pablo Cusnir
path:$PATH I tried using: system("setenv ."); and also: system ("csh setenv ."); Thanks, Best regards, Pablo -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Single and Double quotes in SQL

2003-09-18 Thread Pablo Fischer
Hi! I need to save some HTML text in a DataBase (MySql, using DBI). However some HTML text will have single and double quotes, so.. how can I save them?, for example: It's so funny Thanks! Pablo -- Pablo Fischer Sandoval (pablo -arroba- pablo.com.mx) http://www.pablo.com.mx

Re: DBI Query rows Benchmark

2003-09-07 Thread Pablo Fischer
Thanks!!! El día Sunday 07 September 2003 7:59 a Bob Showalter mandó el siguiente correo: > Pablo Fischer wrote: > > Hello! > > > > I have a questionto those lovers of DBI and Databases: which method > > is faster to know the number of rows of a query: > > >

DBI Query rows Benchmark

2003-09-07 Thread Pablo Fischer
records, not with 12,000 (or more) that will be the real size of the table. Thanks! -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C Firma URL: http://www.pablo.com.mx/firmagpg.

WWW::Mechanize and Cookies

2003-09-02 Thread Pablo Fischer
uot;user_id", "username"); #Llenamos el campo de password $agent->field("password", "password"); #Le damos ENTER $agent->submit(); Then to enter another website (in the same domain), I jsut: $agent->get("otherurl_of_the_same_domain"); Tha

ProcMail with Perl and MailAudit

2003-08-31 Thread Pablo Fischer
d its been filtering with procmail and with my perl filter?, I need to return a special number code? Thanks! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C Firma

Re: MailSender Quotes Problem

2003-08-26 Thread Pablo Fischer
I think it was the hour and time.. Cause now im checking what does $this->{SERVER_IP} contains and it contains an ip 192.168.1.43 and I dont have that computer (just from .1 to .4) and thats why I was hanging up :-( Sorry and thanks! Pablo El día Monday 25 August 2003 11:51 a Pablo Fisc

MailSender Quotes Problem

2003-08-26 Thread Pablo Fischer
uot;7bit", ctype => "$tipo", }) or die("chale"); $sender->SendLineEnc($mensaje) or die("$Mail::Sender::Error\n"); $sender->Close() or die("$Mail::Sender::Error\n"); Thanks! Cya! Pablo --

Re: [solved again] Parse a big HTML text

2003-08-25 Thread Pablo Fischer
I cant believe it.. Every message that I send I get an obvious answer by my self. Thanks and sorry I need to $var =~ s/$s1/$s2/g The cheat its in the 'g'. Thanks! El día Sunday 24 August 2003 7:44 a Pablo Fischer mandó el siguiente correo: > Hi! > > I have in $myvar a BI

Parse a big HTML text

2003-08-25 Thread Pablo Fischer
Hi! I have in $myvar a BIG HTML Text. I need to change some values to others. For example, in one part I have Come and discover the OpenSource ###1### I need to change all the ###1### values for $name, so It will be: Come and discover the OpenSource pablo if the content of $name its "

Re: [solved] Matching String

2003-08-24 Thread Pablo Fischer
Again.. Solved.. duh case /^mailaddr/i, just add a ^ before the matched string. thanks! El día Sunday 24 August 2003 5:00 a Pablo Fischer mandó el siguiente correo: > Hi again! > > Im saving some data of a configuration file in scalar var. > > My configuration file has some

Matching String

2003-08-24 Thread Pablo Fischer
; } case /replymailaddr/i { $envio_reply = $valor; } } However Im finding a problem here, cause its stopping twice in replymailaddr. (I think that it sounds like mailaddr) So, how can I fix this?, that in each 'case statement' it will mix mailaddr with replymailaddr? Thanks!

Re: [Solved] Save data in array from DB

2003-08-24 Thread Pablo Fischer
I solved it :-) @array = split("\n", get_data()); foreach(@array) { parse $_; } Now I can parse each line. Thanks! El día Sunday 24 August 2003 3:44 a Pablo Fischer mandó el siguiente correo: > Hi! > > I would like to parse data from a Field of a table (from a

Save data in array from DB

2003-08-24 Thread Pablo Fischer
to save this field and start parsing (selecting data) from each line, like: foreach(@result) { parse $_; } How can I do this? thanks! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C

Re: Extract Array Element

2003-08-24 Thread Pablo Fischer
Thanks!! El día Sunday 24 August 2003 7:11 a Paul Johnson mandó el siguiente correo: > On Sun, Aug 24, 2003 at 02:01:48PM +0000, Pablo Fischer wrote: > > I have an array of 15 elements, however I dont want the fifth element. > > So, how can I extract it from the array so I would h

Extract Array Element

2003-08-24 Thread Pablo Fischer
HI! I have an array of 15 elements, however I dont want the fifth element. So, how can I extract it from the array so I would have 14 elements? Thanks! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA

Re: Benchmark times

2003-08-24 Thread Pablo Fischer
Thanks to all! Im going to check the requirements (memory, CPU, etc). Thanks! El día Sunday 24 August 2003 1:45 a Pablo Fischer mandó el siguiente correo: > Hi! > > This maybe its not a Perl question. > > I have a system (with 3 classes), that works in this order: > > >

Benchmark times

2003-08-24 Thread Pablo Fischer
and order them * Parse File by File, and save the parssed file in a DB (MySql) * Check to see if I need a backup of the Zip File * Finish How good its to do this in 10 seconds? Exists a website with benckmark running times in Perl? Thanks! -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http

Split NewLines

2003-08-18 Thread Pablo Fischer
Hi! I have in $string something like: $string="1 blabla"; When Im printing $string I get a new line between 1 and blabla, now I needt o split that.. in my($number, $real_string) = split... How can I split it? Thanks! Pd. Its a scalar variable Pablo -- Pablo Fischer Sandov

Removing after a string

2003-08-17 Thread Pablo Fischer
ver=192.168.1.1"; thanks! -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C Firma URL: http://www.pablo.com.mx/firmagpg.txt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

Localtime minutes before or after

2003-08-17 Thread Pablo Fischer
, how can I calculate this?. For example If I add 5 minutes to 030817145, I need to get: Sun Aug 17 14:10:21 2003 Thanks!! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C Firma

Questions of OOP in Perl

2003-08-14 Thread Pablo Fischer
m confused if I need to use $this for public and private methods or no.. 2. Exists an special nomenclature, like Arrays need to be in capital letters and scalar variables not. Thanks! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG Fin

Schedule::Cron clean timetable

2003-08-14 Thread Pablo Fischer
ple simple examples, (open a file and print something in it, and close it)... and re-running the script but just with this: my $cronometro = new Schedule::Cron(\&dispatcher); $cronometro->clean_timetable(); And the same, it continuse running.. Thanks! Pablo -- Pablo Fischer Sandoval ([EM

System or Modules?

2003-08-14 Thread Pablo Fischer
? The final project could be running in two years (or maybe never) in Windows or BSD (Im working in Linux) Yeah, that's my Perl Question :-) thanks! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8

MailSender LineEnc or SendEnc

2003-08-12 Thread Pablo Fischer
.168.1.1', from => 'Pablo <[EMAIL PROTECTED]>', priority => 1, debug => 'errors.txt', to => '[EMAIL PROTECTED]', subject => $subject, }) or die("$Mail::Sender::Error\n"); $sender->Open({ ctype => 'text/ht

Re: Questions of OOP in Perl

2003-08-09 Thread Pablo Fischer
27;private' methods? Thanks! -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C Firma URL: http://www.pablo.com.mx/firmagpg.txt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For ad

[New Question] Large file line by line

2003-08-07 Thread Pablo Fischer
Hi! Reading all these message about reading a 'big' file (I know that 180MB its not a big file), but what's the difference from reading like this: @file = ; foreach (@file) { print $_; } and with a While? Thanks!! -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://w

Procmail with ProcMail Module

2003-08-03 Thread Pablo Fischer
good, but before using it, I would like to know the opinions of somebody, and how does the process works in the filter. Thanks! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C

What's Better?

2003-07-31 Thread Pablo Fischer
. Save each file in row of a table of my Database (using MySql, so I need to use DBI), and when Its time to use it, connect to the database, and retrieve row by row. Thanks! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip

Re: [solved but..] Push first 9 elements

2003-07-30 Thread Pablo Fischer
ush @lista_final, splice(@correos_l, 0, 1); push @lista_final, splice(@correos_t, 0, 1); push @lista_final, splice(@correos_s, 0, 1); push @lista_final, splice(@correos_o, 0, 1); } Thanks! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.

Re: [solved but..] Push first 9 elements

2003-07-30 Thread Pablo Fischer
this for Im adding them as: 9 of A, 9 of B, 9 of C, 9 of B So, how can I start selecting one of each one? and complete 9, and again.. and again.. Thanks! -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7

Re: [solved but..] Push first 9 elements

2003-07-30 Thread Pablo Fischer
splice(@correos_t,0,8); splice(@correos_s,0,8); splice(@correos_o,0,8); } Correct? And now, How can I remove duplicate elements from a list or array. I know that this answer its in perldoc -q duplicate, but I didnt understand the doc. Some examples? Thanks! El día Wednesday 30 July 2003 1

Re: Push first 9 elements

2003-07-30 Thread Pablo Fischer
Hi again; Sorry I forgot to said that when I finish to take the first 9 elements of arr7, I need to restart in the ARr1. thats Why I need to remove those elements. Thanks! El día Wednesday 30 July 2003 11:09 a Pablo Fischer mandó el siguiente correo: > Hi! > > I need to make an arra

Push first 9 elements

2003-07-30 Thread Pablo Fischer
t 9 of Arr6, push them to the BIG ARRAY and remove this 9 from the 'subarray' Take First 9 of Arr7, push them to the BIG ARRAY and remove this 9 from the 'subarray'. How can I do this? does push and pop allows me to choose the first 9 elements and push them? Thanks! Pablo

Re: Printing an Array

2003-07-30 Thread Pablo Fischer
correo); print $host."\n"; $|=1; sleep 1; } $count++; } ;-), However, thanks Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C

Printing an Array

2003-07-30 Thread Pablo Fischer
r print $correo add print " "; and it prints! Why sleep its ?")#$)"$ my foreach? :-( What it prints without sleep or with the other 'print' is: [EMAIL PROTECTED]@[EMAIL PROTECTED]@domain4.com and ... thanks! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED])

Re: Zip archives

2003-07-30 Thread Pablo Fischer
; into one text file all in the current directory. What Rob told you, its exactly what you need, sorry :-) Cya! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C Firma URL: htt

Re: Zip archives

2003-07-30 Thread Pablo Fischer
', $this->{DIR_DESCZIP}."/"); #Exit of Zip, just undef $zip (its not necessary) $zip = undef; } And thats all, Your files will be in DIR_DESCZIP, now open the file, and write it to other file (OPEN ">"), (OPEN "<"). Pablo -- Pablo Fischer Sando

Re: Pipe Delimited File

2003-07-29 Thread Pablo Fischer
print "Fulanos: $fulanos\n"; > print "Time: $tiempo\n"; > print "Subject: $subject\n"; > print "BodyHTML: $bodyhtml\n"; > print "BodyTXT: $bodytxt\n"; > print "Attachment: $attach\n"; > print "Date: $fech

Re: Pipe Delimited File

2003-07-29 Thread Pablo Fischer
ing an array to load the FILE :-( MOVER.CPO 3|Archivo1, Archivo2, ARchivo3|13|COMOESTAS| Special Promotions | Special Promotions |/home/unmada/Programacion/Perl|20030408 Thanks! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerT

Re: Pipe Delimited File

2003-07-29 Thread Pablo Fischer
nd after the last |. Obviously the first word just have an | AFTER it, and th elast, BEFORE it. I think that I need to use split, but see.. no what I need :-( Thanks! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4

Re: Pipe Delimited File

2003-07-29 Thread Pablo Fischer
bject | $attach | $fechaenvio\n"; 1 | Env7371.txt(6) | 1 | 1 | Sales | | 20030408 If subject is Sales, there's no attachment, and $fechaenvio its 20030408. Thanks! -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4

Pipe Delimited File

2003-07-29 Thread Pablo Fischer
36 | | | | | I tried to change the split, to split(/|/,@file);, but the same, no good results :-( What could I bee doing bad? Thanks! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9

Mail Parser?

2003-07-28 Thread Pablo Fischer
to know if exists a module that could parse mails, I need to identify the reasons of WHY a mail couldnt be delivered. I found Mail::Box and Mail::Box::Grep (If I remember fine), but exists a module that check only the headers of the messages? Thanks! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTEC

Undef or Destroy?

2003-07-28 Thread Pablo Fischer
ke to delete the last FILE_ZIP, so, whats better before loading the filename in FILE_ZIP: $this->{FILE_ZIP} = undef; or delete $this->{FILE_ZIP} Thanks! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 89

Destroy Object?

2003-07-28 Thread Pablo Fischer
ut, could I do this just like: delete $dbf? or in a simple and quickly way? Thanks! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C Firma URL: http://www.pablo.com.mx/firmagpg.txt

Re: Local variables

2003-07-27 Thread Pablo Fischer
use local. Wasn't that easy? funny XD. No, really, now I understand. thanks Steve! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C Firma URL: http://www.pablo.com

Local variables

2003-07-27 Thread Pablo Fischer
"bajo") { print "My alias it $person->{NOMBRE}\n"; } } And obviously, 'local $name', was 'my $name' and it was working so nice.. So is it necesary to declare the variables as local vars? Cause Im getting errors :( THankss! Pablo -- Pablo Fisc

Case Statement

2003-07-26 Thread Pablo Fischer
($string == "match2") && do { actions.. last CASE; }; and a lot more.. } The question, where does the 'default' case starts?. The last 5 years I have been programming in C/C++/C#/Php.. C-styles languages, so in Perl, where does the 'defa

Save a connection inside an object?

2003-07-26 Thread Pablo Fischer
$basedatos_usuario,$basedatos_password); bless($dDB, $clase); return $dDB; } The big question, is it valid to save the 'link connection', inside $dDB->{LINK}?, so I can use it in other methods. Thanks!!! Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx

Split FileName

2003-07-25 Thread Pablo Fischer
Hi! I have a string (its an array, the array has the values that $ftp->ls("dir) returns), so $array[1] contains this: -rw-r--r-- 1 pablo pablo 18944 Jul 16 21:14 File28903.zip What I would like to do is: get the date (Jul 16), the time (12:14) and the FileName, each

Mail Sender in Perl

2003-07-08 Thread Pablo Fischer
http://www.cs.cf.ac.uk/Dave/PERL/node180.html] Pablo Fischer -- Pablo Fischer Sandoval ([EMAIL PROTECTED]) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C Firma URL: http://www.pablo.com.mx/firmagpg.txt -- To unsubscribe, e-mail: [EMAIL PROT

  1   2   >