in reply to How to execute succcessful this Perl script in Linux, window and solaris?
update - been too dizzy this morning :-(
Turn the eval block into a string eval and wrap it in a BEGIN block. This way the eval is executed and the module loaded before the call to Win32::DriveInfo::DriveSpace is even compiled. I can't test, because I don't have a Windows box at hand.
Put this at the very beginning of your script:
BEGIN { if ($^O =~ /^(MS)?Win/) { eval "use Win32::DriveInfo"; die $@ if $@; } }
What happens if you turn the eval block into a string eval? I can't test, because I don't have a Windows box at hand.
--shmem
update: changed "require" to "use" in the string eval. Small negligence after copy & paste.
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Replies are listed 'Best First'. | |
---|---|
Re^2: How to execute succcessful this Perl script in Linux, window and solaris?
by esskar (Deacon) on Jun 29, 2006 at 06:09 UTC | |
by shmem (Chancellor) on Jun 29, 2006 at 06:48 UTC | |
Re^2: How to execute succcessful this Perl script in Linux, window and solaris?
by ikegami (Patriarch) on Jun 29, 2006 at 07:15 UTC | |
by shmem (Chancellor) on Jun 29, 2006 at 07:32 UTC | |
by ikegami (Patriarch) on Jun 29, 2006 at 07:41 UTC |