All Forums |
Register |
Login |
Search |
Subscriptions |
My Profile |
Inbox |
Tool Warehouse |
FAQs |
Resources |
Help |
Member List |
Address Book |
Logout |
|
|
running windows perl script in SFU.
|
Logged in as: Guest |
Users viewing this topic: none |
|
Login |
|
|
running windows perl script in SFU. - Dec. 17, '05, 8:43:02 AM
|
|
|
anshu_321
Posts: 13
Joined: Oct. 6, '05,
Status: offline
|
I am facing problem in executing perl scrits, that are windows specific, in Interix. In my perl script I have a command
use Win32::OLE
When I try to run the perl script it says “Can't locate Win32/OLE.pm in @INC”.
I have cross checked that I have installed ActiveState perl in SFU custom installation.
Any help would be appreciated.
|
|
|
RE: running windows perl script in SFU. - Dec. 18, '05, 12:28:53 AM
|
|
|
Rodney
Posts: 3387
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
I think it needs to be determined that you are running the Perl you think you are.
There is an Interix version of Perl and a Win32/ActiveState Perl.
From your message it looks like the Interix Perl is running.
The ActiveState Perl is a standalone thing.
If you want to run the AS-Perl from Interix then you will need to do some configuration out of the norm.
- remove the Interix Perl
- create an interfacing script (a la /usr/contrib/win32/bin scripts) to AS-Perl
|
|
|
RE: running windows perl script in SFU. - Dec. 18, '05, 1:45:27 AM
|
|
|
anshu_321
Posts: 13
Joined: Oct. 6, '05,
Status: offline
|
The SFU setup comes with ActiveState Perl in it. So while installing the SFU i choose custom installation and then i choose both Unix Perl & ActiveState Perl.
I am able to run perl scripts that are not using any windows related modules (like Win32::OLE) but when i execute any perl script having any such windows related modules, it throw errors.
Now my question is if AS Perl is coming with SFU and i am not installing it seperate then why i need to make an interface script to it.
Another question is, why i cann't live with both Unix and AS Perl at the same time.
|
|
|
RE: running windows perl script in SFU. - Dec. 18, '05, 11:22:31 PM
|
|
|
markfunk
Posts: 640
Joined: Mar. 31, '03,
Status: offline
|
First of all, you probably do NOT want to use the active state perl
that ships with SFU3.5. It is very old.
Go to the Active State web site and download the latest version.
Remember, SFU is a collection of UNIX software components.
Some of it is Win32 based software. (like NFS client and AS Perl).
Some of it is Interix based software. Interix is a UNIX subsystem that runs
on top of Windows. It is a completely separate subsystem from Win32.
In the Interix environment you use UNIX conventions and you expect
UNIX behaviour.
In the Win32 environment, you use Windows conventions and you expect
Windows behaviour.
If you are a Windows person and you want to run in the Windows environment
(e.g cmd.exe), then you need to stick to running Win32 programs
and for the most part, avoid any Interix programs.
If you want to run in a UNIX environement, then you should
stick to running Interix applications. (like the ksh and csh that you installed
from SFU3.5 distribution) and avoid using Win32 programs unless
you completely understand their differences.
If you want to run Win32 programs from the UNIX environment, you can.
But you have to realize these are very different environments and each
behaves differently. Running a Win32 program requires you to
provide it with the expected Win32 syntax arguments and to expect
the Win32 behaviour (which can be different that what you'd expect
in a UNIX environment)
This is what the /usr/contrib/win32/bin directory contains - scripts that
provide easy access to Win32 programs.
In your case, when you run "perl", you need to understand which Perl is
being executed. If you are in an Interix shell (like ksh or csh), then
very likely you are executing the Interix based Perl.
This Perl distribution does not come with any Win32 modules.
Only the basic UNIX ones. And these are fairly old.
A newer version of Interix perl is available in the interopsystems tool warehouse.
To check which perl you are executing, do "perl -v"
The Interix one will return something like:
quote:
This is perl, v5.6.1 built for x86-interix-thread
Copyright 1987-2001, Larry Wall
If you want to run the Win32 version of Perl, then the easiest thing
to do is run it from a cmd.exe shell window.
If you want to run it from an Interix shell, then you'll have to
type something like:
/Perl/bin/perl.exe
(or where-ever SFU installs it).
As I said before, you probably do not want this Win32 version of perl.
You really want to download a much newer version from ActiveState directly.
|
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
|
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts |
|
|
|