Need help with variables

2006-03-03 Thread Jaime Teng
Hi, In my current web project, I group common functions and global variables into a separate file; my problem is, I could not seem to be able to access these variables ## common.pm use strict; use DBI; my $HTTP; my $DBH = DBI->connect ( "DBI:mysql:database=sample; host=127.0.0.1",

I need your opinion: perl vs php

2006-02-26 Thread Jaime Teng
Hi, I am in the process of planning a huge project. It will be web based with heavy database accesses. Since I am have more programming experience with Perl, I prefer using it. However several people have suggested using PHP + MySQL + Apache combo. If you are given the choice, what will you ch

Need SSL Help

2006-02-10 Thread Jaime Teng
Hi, Which Perl module or library is needed to perform HTTPS/SSL communication? I tried the command line cURL but its giving me errors. The parameters to the website are passed as a QUERY STRING within the URL. BTW. I am using win32 machines. regards, Jaime _

Re: Need help with Perl GUI

2005-08-02 Thread Jaime Teng
Hi, I am currently comparing Tk with Win32::GUI. Seeing that I'll be programming for Win32, protability (to unix/mac) is not needed. In just a short time (with win32::GUI) i was able to write simple windows already. albeit crude, at least it took me a lot less time than with Tk. Perlapp and GUI

(no subject)

2005-08-01 Thread Jaime Teng
In WinXP, we can open Task Manager and specify application's priority. >From within a perl script, is there a way for my script to force window to assign a higher/lower priority? If so, how? I like to make my script AboveNormal priority during Night, Normal during Morning and Afternoon, and Bel

Need help with Perl GUI

2005-07-31 Thread Jaime Teng
Hi, I've been learning Perl Tk for the past few weeks and honestly, I find it very difficult to learn Tk. Secondly, according to a friend who had worked on Perl GUI before, "Tk run slower than most other Perl GUI". Seeing that I am having hard time learning Tk, I sure would like to learn other "B

need help witn perflib

2004-09-19 Thread Jaime Teng
Hi, Lately, some of my perl scripts are giving me 100% CPU. I could not trace which is causing it. So I went to add some crude performance checks for all subroutine something like: $TIME{'Foo'} -= time; Foo(); $TIME{'Foo'} += time; However, this gives me only a counter that is based on time, 'sl

assembly codes inside perl?

2004-06-23 Thread Jaime Teng
Hi, Has anyone done some Assembly Language Programming inserted into Perl scripts? If so, can you show a sample? I am in need of speeding up a very recursive function; in perl, it took almost an hour; in C++, it took a few seconds. I wanted more speed. thanks. Jaime Email Advisory==

need help printing data tree structure

2004-06-22 Thread Jaime Teng
Hi, I am trying to write a routine that would print out the value(s) of the entire variable either it be scalar, hash or array: sub ShowValue { my $i = shift; my $v = shift; my $r = shift; if (ref($r

BerkeleyDB vs MLDBD

2003-03-24 Thread Jaime Teng
Hi, I have been trying to install BerkeleyDB on my Perl 5.6.1 (win32) installation and could not find it. I have in the past used MLDBD but I do not have any experience with BerkeleyDB to know the difference. Can anyone tell me the difference between the two? I am trying to port bayesian spam

forcing perl to use a different IP Address

2003-03-06 Thread Jaime Teng
Hi, I have NT/2K with 2 IP Addresses. Currently, my script sits on these machines communicating with external machines. However, it is important that my script SHOULD use the IP address where the external machines talked to. ie, 1. machine has IP1 and IP2, 2. external machine opened a tcp port

Re: [PMX:#]

2002-09-22 Thread Jaime Teng
At 01:18 PM 9/23/2002 +0800, anurag sharma wrote: I am using following code to split the strings in PERL: open(IN,"D160l6r.dat") || die "could not open: $!"; while(){ s/\r\n/\n/; my(@F) = split(//); # print @F; print "$F[120]$F[121] $F[122]$F[123] $F[124]$F[125] $F[126]$F[127]\n

PPM eating too much memory

2002-05-01 Thread Jaime Teng
Hi, I just recently installed an NT 4 on an old P166 with 64MB ram. I installed IIS3, MySQL and latest version of perl. I was wondering why PPM (not PPM3) would eat up about 150+MB of memory (physical + virtual). Is there something wrong with PPM? I never had this problem before with older Per

help converting a mysql statement to perl

2002-04-12 Thread Jaime Teng
Hi, Im running into a simple problem with Perl and MySQL. How do I do the following MySQL statement on Perl? SELECT * FROM events WHERE source in ('ERROR','SYSTEM','LOGOFF'); This doesnt work: ## $source = "'ERROR','SYSTEM','LOGOFF

any workk perl on voice modem out there?

2002-04-06 Thread Jaime Teng
Hi, Has anyone made any work on Perl doing voice on voice modems? Specifically, I am looking for perl modules or any literature on working with voice modems. I am planning on working on a simple voicemail - voice query applications similar to most mobile phone companies' prepaid account query

Re: Validating an email address with the server that would receive it.

2002-04-02 Thread Jaime Teng
> >Accoprding to your specs you would need to use Net::DNS to find the >primary MX and then use Net::SMTP to talk to that box. The SMTP >command you're looking for would be "VFRY" - however, you should be >aware that nowadays many mail relays either respond OK to any VRFY >query, or don't implemen

still have problem with rmdir on w2k

2002-02-27 Thread Jaime Teng
Hi, Please find below the whole perl-script I am using to cleanup empty folders: use strict; sub CLEANUP { my ($FOLDER,$EXPIRATION,$PURGE) = @_; my $expire = time - $EXPIRATION*86400; my $DIR; opend

help with Perl DNS and RBL

2002-02-23 Thread Jaime Teng
Hi, I am writing a script for checking IP Addresses against the RBL list. ## use Net::DNS; sub InRBL { my $ip = shift; $ip =~ s/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/$4.$3.$2.$1/; my $res = new Net::DNS::Resolver;

HOW: Perl as Service on Win95/98

2001-12-01 Thread Jaime Teng
Hi, How do you make Perl scripts to run invisibly on Windows 95/98 similar to NT Service? thanks. Jaime ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Q: Accessing Window's Printer drivers

2001-11-22 Thread Jaime Teng
Hi, Where can I get documentations regarding interfacing perl scripts with Window's printers. I'd like to print forms and tables generated from perl. Sending out printer specific commands through the printer port isnt a good idea - one had to change the syntax of printer commands each time one c

RE: regex problem

2001-06-26 Thread Jaime Teng
Hi, For whatever reason, this script *sometimes* work sometimes it does not work. Is it maybe because of IO::File? the way it opens/read files in binmode that causing the problem? I could not afford to open the file in text mode as reading the file line-per-line would be too slow. Jaime >> ##

RE: regex problem

2001-06-25 Thread Jaime Teng
>> # >> 1 $SESSION{$port}{file} = new IO::File "> 2 binmode $SESSION{$port}{file}; >> . >> . >> . >> 10 my $data; >> 11 if ($SESSION{$port}{file}->read($data,1)) >> 12 { >> 13 $data =~ s/\cM\cJ\.\cM\cJ/\cM\cJ \cM\cJ/gs; >> 14 >> 15 $SESSION{$

RE: Whats wrong here?

2001-06-24 Thread Jaime Teng
ling that for whatever reason, the three liner works on a separate program, yet it does not work on the same program. I am using mysql database on a win2000 machine. jaime At 01:17 PM 6/24/01 -0600, Joe Schell wrote: > > >> -Original Message- >> Behalf Of Jaime Teng

help with fork, socks, DBI

2001-06-08 Thread Jaime Teng
Hi, I have a perl POP3 Server script that uses IO::Socket and IO::Select to handle iterative 'pseudo-non-blocking" socket io between several clients. It uses MySQL for username/password database and NT2000 IIS' built in SMTP for send/receive email transport. It is working well. In view of makin

SOCK's send bug

2001-06-06 Thread Jaime Teng
Hi, I have mentioned this before in 1999 and havent gotten a concrete answer. Below are two perl scripts: server.pl and client.pl How come Perl's "SEND" function sends 1 character less? The client.pl sends the string 'HELLO THERE!' which is 12 characters long. But the server receives it as 11

very rare error with IO::Socket

2001-06-06 Thread Jaime Teng
I have encountered in the past and then a yesterday a very rare problem (and maybe a possible bug). # use IO::Socket; use IO::Select; my $LiSTEN = new IO::Socket::INET(LocalPort=> 110, Proto => 'tcp', Listen=>10); my $SERVER = new IO::Select($LISTEN); while(1) { my @

help with regex

2001-05-29 Thread Jaime Teng
Hi, Below is a test script im working on: ## $input = '[EMAIL PROTECTED]'; $line = '(.*)@abc.com=$[EMAIL PROTECTED]'; ($left,$right) = split '=', $line,2; $input =~ s/$left/$right/; print $input; results -> \[EMAIL PROTECTED] <- wrong it should be [EMAIL PROTECTED]

Help with Win32::EventLog

2001-05-28 Thread Jaime Teng
hi, Below is my Eventlog script. And I dont know exactly what each of the $hash entry is suppose to be. ### use Win32::EventLog; $hash->{Computer} = $ENV{ComputerName}; $hash->{Source} = "FTP"; $hash->{EventType} = EVENTLOG_ERROR_TYPE; $hash->{Category} = "ACCESS"

Re: question on regex's {}

2001-05-19 Thread Jaime Teng
Hi, >> $line = "12345.123.129683.129837.7263.128." >> $x = 3; >> $line =~ s/^(\d+\.){$x}/\1/; I was expecting $line to be 12345.123.129683. Jaime ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/per

Re: Threads

2001-05-06 Thread Jaime Teng
At 01:00 AM 5/6/01 +1000, Rob wrote: >Howdy all! > >I am mostly a java person; I have only been working with perl (and Linux >too) for a few months. > >Threading a is a big issue! :) > >I looked up in my ActivePerl docs and there is a Thread package. It says >this though: > >DESCRIPTION >WARNI

Re: problem with IO::Socket and UDP

2001-04-27 Thread Jaime Teng
>> >> Hi, >> >> >> >> How come this keeps on dying on me? >> >> >> >> my $LISTEN = new IO::Socket::INET(Listen => 10, LocalPort => 1812, Proto >> >=> >> >> 'udp' ); >> >> >> >> but if i change "Proto => 'udp'" into "Proto => 'tcp'" it runs now why >> >> it wont >> >> run on udp? >> >> >> >> re

Re: how to make a perl script a NT service

2001-04-27 Thread Jaime Teng
Hi, You can use SRVANY.EXE to hide your perl. Jaime At 01:12 PM 4/27/2001 -0700, Ted Zeng wrote: >Hi, I realize this topic came up a short while ago. >I looked at the solution people told here: PerlSvc. >It seems to me it is for a machine that doesn't >install Perl. > >I just want to turn a Pe

Re: s/\'\`\"//g;

2001-01-29 Thread Jaime Teng
Hi, for one thing.. >s/\'\`\"//g; will match only strings containing the three chars in sequence ie TRUE:'`"aaa FALSE: aa'aa`das" FALSE: '' FALSE: "" etc.. to make it chomp ' or ` or ": s/\'|\`|\"//g; jaime At 09:56 PM 1/29/01 -0700, Jose Quesada wrote: >Dear All, > >