Re: Filtering contetn in a variable

2008-07-10 Thread luke devon
Thanks for every one who tried to help me. but all were unsuccessful and I would like to submit my tries for your consideration. This is how its done. $ip = substr($ip, 0, (length($ip)-2)); - Original Message From: Gunnar Hjalmarsson <[EMAIL PROTECTED]> To: beginners@perl.org Sent:

combo box+ Perl+JS

2008-07-10 Thread elavazhagan perl
Hello wisdoms, Please have a glance on my following querry and attached reference files. I need to make three combo box which are related to each other.When the user choose the Continents,the specified countries should be displayed in the pull down menu.For each countries we have facilities in the

Re: Can't locate ...

2008-07-10 Thread Ganesh Babu N
Download the module to the system and install it manually. On 7/10/08, protoplasm <[EMAIL PROTECTED]> wrote: > Somehow I screwed up my `Perl` and have no idea how to get out of this > mess. I attempt to run a program and get the following: > > @naiad ~/workspace/aestTest] ./aestTest --CbcDec > Can

RE: Count of number of rows returned in delete / update sql in Perl DBI ?

2008-07-10 Thread Ow Mun Heng
This is what I use eval { print "Executing DELETE\n" if ($verbose); my $del_rows = $dbh_pg->do($pg_query1) or die "prepare failed DBI::errstr"; if ($del_rows != 0) { print "Number of rows deleted: " . $del_rows . "\n"; } else { $del_rows = 0; } -Original M

Re: program fails to write some entries in log

2008-07-10 Thread icarus
On Jul 10, 8:36 am, [EMAIL PROTECTED] (John W. Krahn) wrote: > icarus wrote: > > what this does: it classifies a file based on its modification date. > > > example: xfile1 is dated July 9, 2008. If it doesn't exist, the > > program creates a > > directory structure 2008/July/09 and places xfile1 t

Re: using Expect.pm

2008-07-10 Thread Richard Lee
was able to make it work but not sure if I am doing the right thing. use warnings; use strict; use Expect; my $exp = new Expect; my $password = 'abc123'; my $user = 'userX'; my $host = '10.3.3.1'; # typical regex pattern for end of /bin/sh prompt: my $shell_prompt = qr/[\$\#]\s*$/; my $lo

Re: program fails to write some entries in log

2008-07-10 Thread Rob Dixon
John W. Krahn wrote: > Rob Dixon wrote: >> John W. Krahn wrote: >>> #extract year, month, day when $xfile was last modified >>> # eg 2008/July/9 >>> my $dir = strftime '%Y/%b/%-d', localtime( ( lstat $xfile )[9] ) >> I hoped that was what I was looking for, but the forma

Re: program fails to write some entries in log

2008-07-10 Thread John W. Krahn
Rob Dixon wrote: John W. Krahn wrote: #extract year, month, day when $xfile was last modified # eg 2008/July/9 my $dir = strftime '%Y/%b/%-d', localtime( ( lstat $xfile )[9] ) I hoped that was what I was looking for, but the format %- creates nothing and the 'd' is s

Re: program fails to write some entries in log

2008-07-10 Thread Rob Dixon
John W. Krahn wrote: > > #extract year, month, day when $xfile was last modified > # eg 2008/July/9 > my $dir = strftime '%Y/%b/%-d', localtime( ( lstat $xfile )[9] ) I hoped that was what I was looking for, but the format %- creates nothing and the 'd' is simply. >

Re: program fails to write some entries in log

2008-07-10 Thread John W. Krahn
icarus wrote: what this does: it classifies a file based on its modification date. example: xfile1 is dated July 9, 2008. If it doesn't exist, the program creates a directory structure 2008/July/09 and places xfile1 there. Then it creates a log with the steps done. So...in the system the resul

Re: program fails to write some entries in log

2008-07-10 Thread Rob Dixon
icarus wrote: > what this does: it classifies a file based on its modification date. > > example: xfile1 is dated July 9, 2008. If it doesn't exist, the > program creates a > directory structure 2008/July/09 and places xfile1 there. > Then it creates a log with the steps done. > > So...in the s

Re: Array indexing question

2008-07-10 Thread Brad Baxter
On Jul 10, 5:59 am, [EMAIL PROTECTED] (Anirban Adhikary) wrote: > Dear list > I want to capture the output of w and then I want to do some job as per the > o/p of w command in my linux system. So i have written the code as follows > > use strict; > use warnings; > > open (LS, "w|") or die "can't op

program fails to write some entries in log

2008-07-10 Thread icarus
what this does: it classifies a file based on its modification date. example: xfile1 is dated July 9, 2008. If it doesn't exist, the program creates a directory structure 2008/July/09 and places xfile1 there. Then it creates a log with the steps done. So...in the system the result is 2008/July/0

Can't locate ...

2008-07-10 Thread protoplasm
Somehow I screwed up my `Perl` and have no idea how to get out of this mess. I attempt to run a program and get the following: @naiad ~/workspace/aestTest] ./aestTest --CbcDec Can't locate Mac/Files.pm in @INC (@INC contains: /opt/local/lib/ perl5/5.8.8/darwin-2level /opt/local/lib/perl5/5.8.8 /op

Re: Array indexing question

2008-07-10 Thread Stephen Kratzer
On Thursday 10 July 2008 10:33:31 Jay Savage wrote: > On Thu, Jul 10, 2008 at 8:48 AM, Stephen Kratzer <[EMAIL PROTECTED]> wrote: > > Anirban, > > > > The output of 'w' is delimited by whitespace, not necessarily a single > > space. Try passing the pattern '\w+' to split. Something like this: > > I

Re: Count of number of rows returned in delete / update sql in Perl DBI ?

2008-07-10 Thread Amit Saxena
Hi ! I also referred to the CPAN page before posting this query. It's already working for me with Oracle 10g on Perl 5.8.4 on RHEL. Though somewhere on the web, I read a post by some perl developer that execute for him is not returning the number of rows affected. That's why, I asked the query.

Re: Using a Perl script in AIX / Unix

2008-07-10 Thread Rob Dixon
John W. Krahn wrote: > Rob Dixon wrote: >> Rob McGinness wrote: >>> die unless chdir >>> "/cert/ImpactServer-5_4/cl9/ctrl_sfm9/sfm9_sched/archives"; >>> >>> die unless opendir DIR, "."; >> I suggest you write something like the program below. >> >> >> #!/usr/bin/perl >> use strict; >> use warnings

Re: Count of number of rows returned in delete / update sql in Perl DBI ?

2008-07-10 Thread Rob Dixon
Amit Saxena wrote: > Hi all, > > I want to know how to get the count of number of rows returned in delete / > update sql in Perl DBI ? > > I have ready some articles on the internet and it states that the "execute" > function returns the number of rows affected though it's not confirmed to > wor

Re: Array indexing question

2008-07-10 Thread Rob Dixon
Stephen Kratzer wrote: > On Thursday 10 July 2008 05:59:36 Anirban Adhikary wrote: >> Dear list >> I want to capture the output of w and then I want to do some job as per the >> o/p of w command in my linux system. So i have written the code as follows >> >> use strict; >> use warnings; >> >> open

Re: Array indexing question

2008-07-10 Thread Jay Savage
On Thu, Jul 10, 2008 at 8:48 AM, Stephen Kratzer <[EMAIL PROTECTED]> wrote: > > Anirban, > > The output of 'w' is delimited by whitespace, not necessarily a single space. > Try passing the pattern '\w+' to split. Something like this: > I think you meant "the '\s+' pattern". -- j -

Re: Array indexing question

2008-07-10 Thread Jay Savage
On Thu, Jul 10, 2008 at 5:59 AM, Anirban Adhikary <[EMAIL PROTECTED]> wrote: > Dear list > I want to capture the output of w and then I want to do some job as per the > o/p of w command in my linux system. So i have written the code as follows > > open (LS, "w|") or die "can't open w: $!"; > my @ar

Re: Count of number of rows returned in delete / update sql in Perl DBI ?

2008-07-10 Thread yitzle
On Thu, Jul 10, 2008 at 7:44 AM, Amit Saxena <[EMAIL PROTECTED]> wrote: > Hi all, > > I want to know how to get the count of number of rows returned in delete / > update sql in Perl DBI ? > > I have ready some articles on the internet and it states that the "execute" > function returns the number o

Re: Array indexing question

2008-07-10 Thread Stephen Kratzer
On Thursday 10 July 2008 05:59:36 Anirban Adhikary wrote: > Dear list > I want to capture the output of w and then I want to do some job as per the > o/p of w command in my linux system. So i have written the code as follows > > use strict; > use warnings; > > open (LS, "w|") or die "can't open w:

Count of number of rows returned in delete / update sql in Perl DBI ?

2008-07-10 Thread Amit Saxena
Hi all, I want to know how to get the count of number of rows returned in delete / update sql in Perl DBI ? I have ready some articles on the internet and it states that the "execute" function returns the number of rows affected though it's not confirmed to work for all the database. Is there an

Array indexing question

2008-07-10 Thread Anirban Adhikary
Dear list I want to capture the output of w and then I want to do some job as per the o/p of w command in my linux system. So i have written the code as follows use strict; use warnings; open (LS, "w|") or die "can't open w: $!"; my @arr = ; close (LS); shift @arr; shift @arr; my($one,$two,$three