#!/usr/bin/perl -w use strict; eval "use DBI"; if ($@) { runwithout(); } else { run(); }
Update: Looks like you do need to use a string to get the effect you want. Above code has been updated. Also added use strict
In reply to Re: Running a script if module is not installed
by sgifford
in thread Running a script if module is not installed
by yoda54
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |