# Thanks for the help here 'demerphq' and 'hiseldl' if (defined $beamable && ($beamable =~ /1|true|yes/i)) { $beamable = '--beamable'; $beamable_msg = "Yes, document is beamable"; } elsif (defined $beamable && ($beamable =~ /0|false|no/i)) { $beamable = '--not-beamable'; $beamable_msg = "No, document is copy-protected"; } else { $beamable_msg = "Unspecified, defaults to beamable"; } print LOG " Beamable: $beamable\n"; # Test for no_url_info = value in the template if (defined $no_url_info && ($no_url_info =~ /1|true|yes/i)) { $no_url_info = '--no-urlinfo'; $no_url_info_msg = "No, url information disabled"; } elsif (defined $no_url_info && ($no_url_info =~ /0|false|no/i)) { $no_url_info = (); $no_url_info_msg = "Yes, url information shown"; } else { $no_url_info_msg = "Unspecified, url information shown"; } print LOG " url Info: $no_url_info\n";