Perl windows to linux conversion

M

Master

i want to convert my windows perl script code to linux.Please help me
in finding the links for the same
thanks
saravan
 
S

Scott Bryce

Master said:
i want to convert my windows perl script code to linux.Please help me
in finding the links for the same

With little exception, Perl is cross-platform. What exactly are you
having trouble with? Please post code. Have you read the posting
guidelines for this group?

Try running your script in a linux box. If there are problems, isolate
the problems in a short, but complete script that demonstrates the
problem, then post the code and ask specific questions.
 
H

Henry Law

i want to convert my windows perl script code to linux.Please help me
in finding the links for the same
thanks
saravan

Can I encourage you to think a bit more about this question? The
elements of the Perl language work perfectly in any operating system;
try

print "Hello world\n";

But modules that do specific Windows-ish stuff won't give the same
results in Linux; in fact they'll probably crash. Any of the
Win32::whatever modules, for example.

Other functions are different between Windows and Linux, so if your
Perl exploits them the results will be different. There's a section
in the ActiveState help that details a lot of them. "Windows
implementation quirks" is a good place to start.

Maybe someone is at this moment posting useful URLs for you to look
at; I hope so. If not then you'd be better to take a simple Perl
program from your Windows machine and run it in Linux and see what
happens! If you don't understand what happened, or can't work out how
to fix it, post again!
 
E

ein_ingenuir

The only problem I've had with porting Windows Perl to Linux Perl is
the bash line. I've learned that oftentimes if you have ActivePerl
installed on Windows, the bash line isn't critical, unless you're
running stand alone CGI scripts on your trusty Win32 machine. One
trick I've read is that you should install Perl on a perl/user/bin
folder, or however your Linux server has it, so that when you transfer
your scripts you don't have to fiddle with the bash line.

Are there any specific problems you are having?

#!/perl/bin/
 
I

ich_bin_Ingenieur

The only problem I've had with porting Windows Perl to Linux Perl is
the bash line. I've learned that oftentimes if you have ActivePerl
installed on Windows, the bash line isn't critical, unless you're
running stand alone CGI scripts on your trusty Win32 machine. One
trick I've read is that you should install Perl on a perl/user/bin
folder, or however your Linux server has it, so that when you transfer
your scripts you don't have to fiddle with the bash line.


Are there any specific problems you are having?


#!/perl/bin/
 
C

Christopher Nehren

The only problem I've had with porting Windows Perl to Linux Perl is
the bash line.

Uhm ... it's not a bash line. It's called a shebang. Please, for the
love of portability and dispelling Linuxisms (such as this example which
is making me physically ill), don't call it a bash line.

Remember, not everyone who runs Perl on something other than Windows or
Mac runs Linux (thankfully!), and not everyone who uses something other
than Windows uses the (Broken | Bloated) Again SHell (thankfully!).

Best Regards,
Christopher Nehren
 
J

Joe Smith

Master said:
i want to convert my windows perl script code to linux.

If your perl script was properly written, and does not use
any Windows-specific modules, simply converting from
Windows line endings ("\r\n") to Unix line endings ("\n")
and adjusting the shebang line should be sufficient.
-Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top