in reply to Re^2: time and mem usage of pgm
in thread time and mem usage of pgm

how is it possible to test in perl if the program is running on win or linux?

Simply:

if( $^O eq 'MSWin32' ) { ## Do the windows thing } else { ## else do something else }

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". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

Replies are listed 'Best First'.
Re^4: time and mem usage of pgm
by Anonymous Monk on Mar 11, 2015 at 08:16 UTC

    Does this consider only 32-bits or 64-bit architecture, too?

      The documentation for this is both explicit and helpful - even going so far as to recommend a module for further tests.

        The doc gives the impression that MSWin32 doesn't include windows7 nor windows8. If it is the case, any way to consider these two versions, too?

Re^4: time and mem usage
by Anonymous Monk on Mar 11, 2015 at 20:15 UTC

    I don't know why I got the locale settings problem even if I don't add the proposed code:
    perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US:en", LC_ALL = (unset), LC_PAPER = "fr_FR.UTF-8", LC_ADDRESS = "fr_FR.UTF-8", LC_MONETARY = "fr_FR.UTF-8", LC_NUMERIC = "fr_FR.UTF-8", LC_TELEPHONE = "fr_FR.UTF-8", LC_IDENTIFICATION = "fr_FR.UTF-8", LC_MEASUREMENT = "fr_FR.UTF-8", LC_TIME = "fr_FR.UTF-8", LC_NAME = "fr_FR.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C").

      Looks to be a linux problem, which I know next to nothing about.


      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". I'm with torvalds on this
      In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked