RE: [Perl-unix-users] Memo: DBD Oracle error

2003-01-06 Thread BWilson
If you haven't done so, export an environmental variable called SHLIB_PATH that contains the path to your system's ORACLE_HOME/lib directory. For me it looks like: export SHLIB_PATH=$ORACLE_HOME/lib:$SHLIB_PATH Hope this helps, Bryan -Original Message- From: [EMAIL PROTECTED] [mailto

RE: [Perl-unix-users] Multiple FTP Session

2003-01-03 Thread BWilson
Suresh, I am unsure of what you are trying to accomplish. If your flat file contains a list of files that need to be ftp'd and if you wish to perform these ftp jobs in parallel, you can use the fork function to spawn as many subprocesses as you need ( on Unix anyway, I am not sure of fork's perf

RE: [Perl-unix-users] trim trailing spaces

2002-10-18 Thread BWilson
$var =~ s/\s+$//; -Original Message- From: Terry Vaughn [mailto:tvaughn@;dakotagrowers.com] Sent: Friday, October 18, 2002 3:03 PM To: [EMAIL PROTECTED] Subject: [Perl-unix-users] trim trailing spaces Hello. What's the quickest way to trim trailing spaces from a variable ?? Terry ___

RE: [Perl-unix-users] Perl output different in crontab

2002-10-09 Thread BWilson
If you are running from the command line and your shell environment points to a version of perl that you have installed ( i.e. /opt/perl/5.6.1/bin ), you may have problems in crontab because whichever .profile script you are using will not be sourced when cron runs the job. For example, if you we

RE: [Perl-unix-users] Perl help

2002-09-30 Thread BWilson
Without being able to debug the code, I can only take an educated guess. You are declaring $string on the same line on which you are performing your pattern match. If the pattern does not produce a result, $string will remain ( or become ) uninitialized. This would produce the exact error that

RE: [Perl-unix-users] object is from which class?

2002-07-17 Thread BWilson
Try this: my $obj=MyClass->new(); my $class = ref($obj); Regards, Bryan -Original Message- From: Jo Geraerts [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 17, 2002 2:17 PM To: [EMAIL PROTECTED] Subject: [Perl-unix-users] object is from which class? Hello, If i create an object

RE: [Perl-unix-users] Changing values

2002-04-23 Thread BWilson
The regex below will replace the space with an underscore. my $value="View Data"; $value =~ s/ /_/; Bryan -Original Message- From: Johnno [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 7:55 AM To: [EMAIL PROTECTED] Subject: [Perl-unix-users] Changing values How

RE: [Perl-unix-users] extract the last character or a string

2002-04-11 Thread BWilson
Here is one way to do it... The regular expression checks to see if the last character (the one prior to $) is a slash. my $dir = 'd:/abs/fez:'; if ( $dir =~ m/\/$/ ) { print "Ends in a slash\n"; } else { print "No slash\n"; } -Original Message- From: [EMAIL PROTECTED] [

RE: [Perl-unix-users] Help on array

2002-02-20 Thread BWilson
Because you are not resetting @array1, which is the one you are printing. You've pushed two elements into @array1 and then you tell Perl to print both of them at the end. As usual, Perl does what you tell it to do. (-: Bryan -Original Message- From: AITHA, BHEEMSEN (SBCSI) [mailto

RE: [Perl-unix-users] Help on Array

2002-02-19 Thread BWilson
For seperating your array elements with a comma, use the join command. push ( @ar2 ,"123\t" ,join("," ,@ar1 )); If @ar1 is a list of letter groups, the following line will push into @ar2 the number + TAB followed by however many letter groups seperated by a comma. printing @ar2 results in: 12

RE: [Perl-unix-users] Joining Databases

2002-02-18 Thread BWilson
In Oracle, I believe that the answer to your question is yes ( I am not familiar with the others ). Here is a snippet of a .pm that I run using Oracle as the database, it is ugly but maybe it is what you are looking for. my $sth = $self->{'dbc'}->prepare("select c.TAG_NAME

RE: [Perl-unix-users] How to make a job dependent on another

2002-02-12 Thread BWilson
Assuming that you have good reason to keep your job2 separate from job1 (maybe you don't own job1 and the owner doesn't want you piggybacking on it), perhaps job1 could create a trigger file for your job2. Set your job2 in cron to run every hour (or whatever). The first thing you do is look for