Perl windows to linux conversion

Discussion in 'Perl Misc' started by Master, Apr 29, 2005.

  1. Master

    Master Guest

    i want to convert my windows perl script code to linux.Please help me
    in finding the links for the same
    thanks
    saravan
     
    Master, Apr 29, 2005
    #1
    1. Advertising

  2. Master

    Scott Bryce Guest

    Master wrote:

    > 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.
     
    Scott Bryce, Apr 29, 2005
    #2
    1. Advertising

  3. Master

    Henry Law Guest

    On 29 Apr 2005 09:15:18 -0700, (Master) wrote:

    >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!
     
    Henry Law, Apr 29, 2005
    #3
  4. Master

    ein_ingenuir Guest

    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/
     
    ein_ingenuir, Apr 29, 2005
    #4
  5. 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/
     
    ich_bin_Ingenieur, Apr 29, 2005
    #5
  6. On 2005-04-29, ein_ingenuir scribbled these
    curious markings:
    > 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
    --
    I abhor a system designed for the "user", if that word is a coded
    pejorative meaning "stupid and unsophisticated". -- Ken Thompson
    If you ask the wrong questions, you get answers like "42" and "God".
    Unix is user friendly. However, it isn't idiot friendly.
     
    Christopher Nehren, Apr 29, 2005
    #6
  7. Master

    Joe Smith Guest

    Master wrote:
    > 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
     
    Joe Smith, Apr 30, 2005
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dpackwood
    Replies:
    3
    Views:
    1,811
  2. Eli Sidwell
    Replies:
    7
    Views:
    2,697
    Gavin Williams
    Jun 24, 2004
  3. , India
    Replies:
    2
    Views:
    478
    Fraser Ross
    Sep 15, 2009
  4. Krishna Chaitanya
    Replies:
    1
    Views:
    142
    Krishna Chaitanya
    Feb 27, 2009
  5. Dilbert
    Replies:
    0
    Views:
    844
    Dilbert
    Nov 10, 2011
Loading...

Share This Page