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; }
In reply to Reading environment variables in perl by raja567
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |