Re: Just to know why ?: is not working here

2005-06-15 Thread Randal L. Schwartz
Oliver == Oliver Schnarchendorf [EMAIL PROTECTED] writes: Oliver You want the following: Oliver $str_codetoreturn Oliver ? print $cgi_this-header().$str_codetoreturn Oliver : print $cgi_this-redirect(-url=$str_redirectto); Definitely *not*. That's using ?: in a void context,

RE: Perl SQL not doing what's expected...

2005-06-15 Thread Thomas Bätzler
Jez [EMAIL PROTECTED] wrote: My perl code looks like this; use DBI; use warnings; You should probably use strict; aswell and declare your variables before/when you use them with my. #open connection to Access database $dbh = DBI-connect('dbi:ODBC:Deliveries'); #construct SQL statement

bareword test on ebcdic.

2005-06-15 Thread Rajarshi Das
Hi, Following is a snapshot of a bareword test : -- use utf8; my %hash = (#1090;#1077; = 123); is($hash{#1090;#1077;}, $hash{'#1090;#1077;'}); --- It runs on ascii and passes but fails on ebcdic (z/OS, ibm-1047) with perl-5.8.6. The above two

Re: bareword test on ebcdic.

2005-06-15 Thread John W. Krahn
Rajarshi Das wrote: Hi, Following is a snapshot of a bareword test : -- use utf8; my %hash = (#1090;#1077; = 123); is($hash{#1090;#1077;}, $hash{'#1090;#1077;'}); --- It runs on ascii and passes but fails on ebcdic (z/OS, ibm-1047) with

RE: ???UNSURE??? RE: need help with regular expression

2005-06-15 Thread Sugrue, Sean
There is a program called a regular expression coach http://www.weitz.de/regex-coach/ which is a big help with difficult Expressions. -Original Message- From: Tim Johnson [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 14, 2005 7:34 PM To: Praedor Atrebates; Wagner, David --- Senior

Re: ???UNSURE??? RE: need help with regular expression

2005-06-15 Thread Praedor Atrebates
On Wednesday 15 June 2005 09:16 am, Sugrue, Sean wrote: There is a program called a regular expression coach http://www.weitz.de/regex-coach/ which is a big help with difficult Expressions. [...] Thank you! I'll take a look. When you say a series ... 3 to 5 characters in length, do you mean

Re: ???UNSURE??? RE: need help with regular expression

2005-06-15 Thread jm
On 6/14/05, Praedor Atrebates [EMAIL PROTECTED] wrote: On Tuesday 14 June 2005 16:37, Wagner, David --- Senior Programmer Analyst --- WGO wrote: [...] I have this (pertinent) code in my script: $dnakmotif ='[KRH][L{3,}V{3,}I{3,}F{3,}Y{3,}A{3,}][KRH]; $dnakmotif

Re: hashes and loops

2005-06-15 Thread Dave Gray
On 6/14/05, Karyn Williams [EMAIL PROTECTED] wrote: Below is code that I found on the web that I slightly modified. I am trying to create a script to remove from a file (tlist) the items in another file (tnames). This works but I have multiple files (tlist) I need to check against. I'm not

Re: hashes and loops

2005-06-15 Thread John W. Krahn
Karyn Williams wrote: [snip] So, first question is why is this happenning ? Then how do I fix it ? What is happening that you didn't want to happen? What is NOT happening that you did want to happen? http://www.catb.org/~esr/faqs/smart-questions.html Also, there are just a handful

Perl Expect .. getting output of command

2005-06-15 Thread Ramprasad A Padmanabhan
I am using perl Expect to spawn a shell, run date and get its output .. I am not getting the full output of date Here is the script, can someone tell me where am I going wrong ? #!/usr/bin/perl use Expect; my $exp = Expect-spawn('bash'); print $exp-send(date\r); $exp-expect(1); my $str =

Re: hashes and loops

2005-06-15 Thread Karyn Williams
At 07:42 AM 6/15/05 -0700, you wrote: Karyn Williams wrote: Also, there are just a handful of files BUT they are ever changing, so I would like to not list the statically in the code. but this would work: chomp( my @lists = qx(ls /usr/local/dir) ); But this would work a lot better: my

Re: hashes and loops

2005-06-15 Thread John W. Krahn
Karyn Williams wrote: At 07:42 AM 6/15/05 -0700, you wrote: Karyn Williams wrote: Also, there are just a handful of files BUT they are ever changing, so I would like to not list the statically in the code. but this would work: chomp( my @lists = qx(ls /usr/local/dir) ); But this would

help with BerkeleyDB::ENV

2005-06-15 Thread [EMAIL PROTECTED]
Greetings I am a little problem that I just can't figure out at this stage. Please see the following code: #!/bin/perl # # # use strict; use BerkeleyDB; my $password = password1; my $base = /test; my $log_file = $base . /log/db.log; my $db_filename = $base . /joe.db; my $db_env = new

Re: Perl Expect .. getting output of command

2005-06-15 Thread Randal L. Schwartz
Ramprasad == Ramprasad A Padmanabhan [EMAIL PROTECTED] writes: Ramprasad $exp-expect(1); This means wait at most 1 second for *any* output. Do you really want to do that? Perhaps you should be waiting for a newline or something. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. -

Re: bareword test on ebcdic.

2005-06-15 Thread Rajarshi Das
I posted it on all three lists assuming that the audience in all the three are different and higher the chances that someone posts a reply. Please let me know if this is an incorrect assumption, and also if this qn specifically is outside the scope of the beginners mailing list (or all ebcdic