in reply to Re^3: Run Perl script in windows
in thread Run Perl script in windows

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^5: Run Perl script in windows
by BrowserUk (Patriarch) on Apr 12, 2016 at 02:25 UTC
    Can you please help me

    We will, if you edit your posts so that they are readable.


    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.
Re^5: Run Perl script in windows
by GotToBTru (Prior) on Apr 14, 2016 at 12:42 UTC

    Convert the back slashes to forward slashes to help Perl interpret the path. Put backtics around the commands you want to execute. The output of the command will be returned.

    my @MEDIA; for (`C:/Program Files/Veritas/Netbackup/bin/admincmd>bpimagelist -A - +media -hoursago 24`) { s/\|/ /; my ($Image) = split; for (`C:/Program Files/Veritas/Netbackup/bin/admincmd>nbemmcmd -list +media -mediaid $Image`) { next unless m/Media ID|Data Expiration/i; push @Media, $_; } }

    Consolidate that last for loop:

    push @Media, grep { ! /Media ID|Data Expiration/i } `C:/Program Files + ...`;
    But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)