Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Will Perl Scripts written on 64 Bit Windows run fine on 32 bit as well?

by Anonymous Monk
on Dec 03, 2011 at 18:16 UTC ( #941555=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I had tried learning Perl a while ago, but could not continue due to workload/Job pressure.

Trying to learn it again.

I have installed the 64 bit version of Perl 5.14 and plan to create some scripts to automate some tasks, extract information from XML files, do some text processing which will mostly be command line outputs....

I have a few questions and will be thankful if someone could help me.

1) Will Perl Scripts written on 64 Bit Windows run fine on 32 bit Windows as well or is it better to install 32 Bit Version of Perl?

2) If I have to read from/write to huge text files/XML Files/process a very large amount of command line output and format it, how well is Perl suited for that?

3) Perl generally runs on UNIX. Is it good for Windows too?

My apologies in advance if my questions appear un intelligent, but just trying to ensure that I have picked up the right tool for the right job.

Kindly help and guide.

  • Comment on Will Perl Scripts written on 64 Bit Windows run fine on 32 bit as well?

Replies are listed 'Best First'.
Re: Will Perl Scripts written on 64 Bit Windows run fine on 32 bit as well?
by BrowserUk (Patriarch) on Dec 03, 2011 at 20:07 UTC

    1. The only limitations I've encountered of 32-bit versus 64-bit is the former is restricted to 2GB of memory and (may) only support 32-bit integers.

      I cannot think of anything else that would prevent a script developed on a 64-bit build from running under a 32-bit version.

    2. Depending upon how huge the files are and how much memory you have installed, the 64-bit might allow you to work entirely in memory where the 32-bit may force you to process the file in chunks.

      Depending what you're doing with the files that may or may not be a problem.

    3. Perl works very well under windows, though there are some unix specific modules that don't compile there.

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      One area that I have discovered the hard way, 'pack/unpack' functions for 64 bit do not operate on 32 bit machines. This has made it difficulty for transferring large data files (like a database) between 32/64 bit machines.

      I was trying to put a floating point number into a "Q" format (64bit integer) but on the 32 bit machine it threw an exception.

      So maybe there are more functions, and maybe not!

      Thank you

      "Well done is better than well said." - Benjamin Franklin

        I have discovered the hard way, 'pack/unpack' functions for 64 bit do not operate on 32 bit machines.

        I thought I'd covered that with "and (may) only support 32-bit integers.".

        I was trying to put a floating point number into a "Q" format (64bit integer) but on the 32 bit machine it threw an exception.

        Putting a floating point number into an integer makes no sense to me at all?

        I'm surprised you got an "exception". If I try to use 'Q' on my 32-bit installation, it simply tells me that it is invalid:

        c:\test>\perl32\bin\perl -wle"print pack 'Q', -1" Invalid type 'Q' in pack at -e line 1. c:\test>\perl32\bin\perl -wle"print unpack 'Q', 'abcdefghijklmnop'" Invalid type 'Q' in unpack at -e line 1.

        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        The start of some sanity?

Re: Will Perl Scripts written on 64 Bit Windows run fine on 32 bit as well?
by mellon85 (Monk) on Dec 03, 2011 at 19:41 UTC

    1) I don't know, never tried it on 64bit windows, but i don't think it will be a problem (if you don't have to cope with prebuilt binary modules compiled for Win32)

    2) Perl seems suited for that, check the related modules on CPAN and see for yourself, expecially do some quick tests about the memory usage. I don't know what you mean by huge and what you have to do and on which hardware

    3) I used it from some web mechanizations (same script took from a linux box), and it worked as on the linux machines

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://941555]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2022-11-30 18:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?