Hello all, I have the following simple procedure which works fine for the 15 other 
identical servers for not for this new server that I obtained:


#!/usr/bin/perl
use strict;
use DBI;
use DBD::Oracle;
use Mail::Sender;

sub create_file
#__________________________________________________________
{
 my ($file,$content)=@_;

if (!open(Q, "$file")) {
        open(Q, ">$file") ;
        print Q "$content";
        close(Q);

}else{
unlink("$file");
system ("chmod 777 ./$file");
open(Q, "> $file") ;
        print Q "$content";
        close(Q);
     }
system ("chmod 744 ./$file");
}

create_file("joel_test","hello");
0;



This script when run from the command line works fine but from the cron create the 
file empty!!!! Has anybody experienced this problem before, thanks.



/home/pythian/avail> perl -V 
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=linux, osvers=2.2.5-22smp, archname=i386-linux
    uname='linux porky.devel.redhat.com 2.2.5-22smp #1 smp wed jun 2 09:11:51 edt 1999 
i686 unknown '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O2 -m486 -fno-strength-reduce', gccversion=egcs-2.91.66 
19990314/Linux (egcs-1.1.2 release)
    cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
    ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
    stdchar='char', d_stdstdio=undef, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldl -lm -lc -lposix -lcrypt
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Built under linux
  Compiled at Feb  2 2000 15:35:58
  @INC:
    /usr/lib/perl5/5.00503/i386-linux
    /usr/lib/perl5/5.00503
    /usr/lib/perl5/site_perl/5.005/i386-linux
    /usr/lib/perl5/site_perl/5.005
---------------------------------------
Joel Laforest                   GMT -5
The Pythian Group         Ottawa Canada
(+1)613-565-8696 x226              voice
(+1)613-223-6104                     cell
---------------------------------------
    1-877-PYTHIAN or 1-877-798-4426
       Toll free in North America


Reply via email to