in reply to Running a script if module is not installed
#!/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
|
|---|