use if $^O !~ /MSWin/, 'Proc::Daemon'; use if $^O =~ /MSWin/, 'Win32::Daemon'; print "$INC{'Proc/Daemon.pm'}\n"; exit; __END__ Too few arguments to 'use if' (some code returning an empty list in list context?) at /home/ubuntu/perl5/perlbrew/perls/perl-5.22.1/lib/5.22.1/if.pm line 7. BEGIN failed--compilation aborted at /home/ubuntu/perl5/perlbrew/perls/perl-5.22.1/bin/bbtester line 6.