Sorry - I gave you some wrong information. The use command does not return the true value that require returns. So you need to throw out the second line that contains did not return a true value of my code:
use strict; if ($^O =~ /MSWin32/) { my $res = eval "use Win32::Service"; die $@ if $@; # do Windows code } else { # Assume Unix, even though there are other platforms # do Unix code };
In reply to Re^3: Can we do "use Win32:Service" on Unix ?"
by Corion
in thread Can we do "use Win32:Service" on Unix ?"
by ajith
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |