raja567 has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I have a piece of code, which reads a table and fetches a value which is nothing but the path "$P2KTMP/data". I need to write o/p data to that particular path, but my code is failing to do so. Someone please help to fix this :(
my $sysParmSQL = "select sys_vale from system_data where sys_n +ame = 'OUT_DIR'"; my $consolidatedPath = $dbh->selectrow_array($sysParmSQL,undef +); if($consolidatedPath) { $outputPath = $consolidatedPath; if ( -d $outputPath ) ==> the path exists but it is faili +ng here and trying to go to else block { } else { print " Directory not found, Creating the directory ! +!! : $outputPath \n"; system ("mkdir $consolidatedPath"); } } else { print "WARNING : Directory System Parameter OUT_DIR not fo +und !!! Please configure the parameter \n"; exit 0; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Reading environment variables in perl
by Discipulus (Canon) on Feb 25, 2015 at 11:36 UTC | |
Re: Reading environment variables in perl
by Anonymous Monk on Feb 25, 2015 at 11:38 UTC | |
Re: Reading environment variables in perl
by crusty_collins (Friar) on Feb 25, 2015 at 14:40 UTC | |
Re: Reading environment variables in perl
by soonix (Chancellor) on Feb 26, 2015 at 12:21 UTC |