The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-14-2007
mjays mjays is offline
Registered User
 

Join Date: Apr 2007
Location: london
Posts: 40
perl problem - another 'die' issue.

two things.
  1. why doesn't the 'die' message get displayed - "Error: release log directory creation failed..."?
  2. why does the script name and line number get displayed despite the inclusion of a '\n'. apparently adding a newline prevents this from happening.

Code:
if (! -d "$logdir") {
    use File::Path;
    mkpath "$logdir" || die ("ERROR: release log directory creation failed - $logdir: $!\n");
    print "\nINFO: Directory created - $logdir\n";
}
Code:
the result:

mkdir /build/cm_test_sharee: Permission denied at ./crm.prl line 122
Reply With Quote
Remove advertisements
!!
Forum Sponsor