How to check in Perl if symbolic link error? <p>The following bit errors out:</p> <pre><code># Only Execute on Prod Stagesif ($stage eq 'Prod') { if ($stage eq "Prod") { # If /mysql symlink exists, exit0 immediately if ( -l "/mysql" ) { exit(0); } elsif { die "Did not meet expected system disk configuration"; } } exit (0); </code></pre> <p>with:</p> <pre><code>syntax error at ./010MySQLDataDirectoryCheck.pl line 16, near "elsif {" syntax error at ./010MySQLDataDirectoryCheck.pl line 19, near "}" Execution of ./010MySQLDataDirectoryCheck.pl aborted due to compilation errors. </code></pre> <p>What exactly did I miss?</p>