RE: setting and importing ENV from within PERL

2001-07-26 Thread Venkat Mohan
$ENV{MY_VAR} = "test"; will set the env var MY_VAR -Venkat -Original Message- From: perl newbie [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 26, 2001 3:22 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: setting and importing ENV from within PERL I am trying to figure

RE: if in a list

2001-07-26 Thread Venkat Mohan
One thing When you compare strings use "eq" string comparition operator. Not "=" -Venkat -Original Message- From: Jennifer Pan [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 26, 2001 11:55 AM To: [EMAIL PROTECTED] Subject: if in a list I want to test if "AF1" is in my list @myli

RE: appending to file?

2001-07-26 Thread Venkat Mohan
You can use signal handlers $::SIG{__DIE__} = \&cgi_die; This will be invoke cgi_die sub when ever the script dies You can also look at perldoc sigtrap Same signal names used in unix signal used here. I suggest to look at sigtrap perldoc - Venkat -Original Message- From: David Fr

RE: appending to file?

2001-07-26 Thread Venkat Mohan
EMAIL PROTECTED]] Sent: Thursday, July 26, 2001 4:38 AM To: Venkat Mohan Cc: 'David Freeman'; [EMAIL PROTECTED] Subject: Re: appending to file? Lightning flashed, thunder crashed and Venkat Mohan <[EMAIL PROTECTED]> wh ispered: | --_=_NextPart_001_01C1155C.C049A170 | Con

RE: appending to file?

2001-07-25 Thread Venkat Mohan
Are you closing the APPEND file at the end of the process? -Original Message- From: David Freeman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 3:51 PM To: [EMAIL PROTECTED] Subject: appending to file? ok last question on this script for today. According to the book i sho

RE: fetchrow_array problem with DBI

2001-07-25 Thread Venkat Mohan
Simple, After you prepare the sql statement you must execute the statement. See the non indented line of code below. my $dbh=DBI->connect($db, ,$username,$password) or die "Couldn't connect".DBI->errstr; my $sth=$dbh->prepare('SELECT * FROM tbl_clients')

RE: foreach question

2001-07-24 Thread Venkat Mohan
There are some functions that can return arrays and users can write subs that return arrays. Take this example. my $($string, $token); $string = "Tom is not confused any more"; foreach $token (split ' ', $string) { print "$token\n"; } This will return Tom is not confused any more In the

RE: output of a command to a file

2001-07-24 Thread Venkat Mohan
This will work. open outfile ">>outfile.txt"; open cmdoutput " $command |"; while() { print outfile; } close cmdoutput; close outfile -Original Message- From: Tyler Longren [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 24, 2001 12:48 PM To: Perl Beginners Subject: output of a comman

RE: date help

2001-07-24 Thread Venkat Mohan
This page might help in future. http://www.cpan.org/modules/INSTALL.html If you are using perl in Windows environment try active perl www.activestate.com They have an excellent PPM program which helps a lot. Thanks, Venkat -Original Message- From: Sascha Kersken [mailto:[EMAIL PROTECT