How to run Perforce command from Perl script.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Raju Sathliya
    New Member
    • Jul 2008
    • 7

    How to run Perforce command from Perl script.

    Hi,

    I need to run Perforce command from perl script but it gives me error as per below:

    Can't locate P4.pm in @INC (@INC contains: C:\build\softwa re\Perl\perl5.0 0402\lib\site ......

    my perl script is as per below:
    --------------------------------------------------------------------------
    #!/usr/bin/perl
    use P4;

    $a = p4 describe -s '122305';
    print $a;
    --------------------------------------------------------------------------
    Please can anyone help me to resolve this.
    Or
    Is it possible to run Perforce command from Perl script?

    Thanks
    Raju
  • Raju Sathliya
    New Member
    • Jul 2008
    • 7

    #2
    Originally posted by Raju Sathliya
    Hi,

    I need to run Perforce command from perl script but it gives me error as per below:

    Can't locate P4.pm in @INC (@INC contains: C:\build\softwa re\Perl\perl5.0 0402\lib\site ......

    my perl script is as per below:
    --------------------------------------------------------------------------
    #!/usr/bin/perl
    use P4;

    $a = p4 describe -s '122305';
    print $a;
    --------------------------------------------------------------------------
    Please can anyone help me to resolve this.
    Or
    Is it possible to run Perforce command from Perl script?

    Thanks
    Raju
    Hey I got the answer after googling:

    Answer : we have to use system command to run the perforce Or any other tools command. Answer script is as per below.

    $a = system("p4 describe -s 122305");

    print $a;

    Thanks to me !!!!!

    Comment

    Working...