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

Hello Monks,

I need to run a Perl script on windows. I have installed the compiler. Can someone please help me as I am still learning the code, below is the script which i need to run.

my @MEDIA; for (qx<sudo /usr/openv/netbackup/bin/admincmd/bpimagelist -A -media - +hoursago 24>){ s/\|/ /; my ($Image) = split; for (qx<sudo /usr/openv/netbackup/bin/admincmd/nbemmcmd -listmedia - +mediaid $Image>){ next unless m/Media ID|Data Expiration/i; push @MEDIA, $_; } } if(@MEDIA){ open(FF, "|/mailx -s 'Daily' mel.rupani@capgemini.com") or die $!; for (@MEDIA){ print FF $_ . "\n"; } close FF; }

Replies are listed 'Best First'.
Re: Run Perl script in windows
by BrowserUk (Patriarch) on Apr 12, 2016 at 00:06 UTC

    Unless you can find windows versions of the *nix programs:

    1. /usr/openv/netbackup/bin/admincmd/bpimagelist
    2. /usr/openv/netbackup/bin/admincmd/nbemmcmd
    3. /mailx

    You have no chance of running that script on windows.


    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 knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Is 'sudo' included in the SFU windows package? That would have to get replaced too if not.
        Is 'sudo' included in the SFU windows package?

        I don't know what that is, but runas takes care of most casual sudo-like purposes.


        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 knew I was on the right track :)
        In the absence of evidence, opinion is indistinguishable from prejudice.
      /usr/openv/netbackup/bin/admincmd/bpimagelist can be replaced with Program Files\Veritas\NetBackup\bin\admincmd\bpimagelist /usr/openv/netbackup/bin/admincmd/nbemmcmd can be replaced with Program Files\Veritas\NetBackup\bin\admincmd\nbemmcmd

        "Two outta three ain't bad!"

        Maybe this or this is an option for the third part.


        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 knew I was on the right track :)
        In the absence of evidence, opinion is indistinguishable from prejudice.
        A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Run Perl script in windows
by stevieb (Canon) on Apr 11, 2016 at 23:53 UTC