473,394 Members | 1,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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\software\Perl\perl5.00402\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
Jan 21 '10 #1
1 6482
@Raju Sathliya
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 !!!!!
Jan 21 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Ben Floyd | last post by:
It goes like this: Im converting a perl script that executes a command on each result of a directory listing. In perl, all is well. In Python, using approximately the same logic creates a...
42
by: Fred Ma | last post by:
Hello, This is not a troll posting, and I've refrained from asking because I've seen similar threads get all nitter-nattery. But I really want to make a decision on how best to invest my time....
1
by: Ruchika | last post by:
Hi, I am trying to automate the build process for which I need to run P4 commands from the Python script. After getting sources from Perforce, I need to build them using Visual C++ from the...
2
by: Paul Porcelli | last post by:
Hi folks, I have a perl one-liner embedded in a ksh script. perl -pi.bak -e "s/val/otherval/" inputfile I'd like to check the return code to know if the substitution was successful. If I...
2
by: kbperry | last post by:
Hi all, I am getting an error message when trying to use the P4 print command via the python api for perforce. Anytime that I run p4c.run("print","-q", eachFile), I keep getting an error...
0
by: Kim Bendtsen | last post by:
I'm trying to write a script in python that communicates with a perforce server. I can get the output from perforce by using -G and the popen command. I have a problem when I'm trying to send a...
1
by: ajay m | last post by:
hi.. i am new to perl, i need a perl script for adding a file from local machine to perforce version control.... plz help me....
5
by: ajay m | last post by:
hi, I need a perl script for get latest version file from perforce, and that file putting into local machine. pls help me.......
4
by: jram01 | last post by:
Hi Folks, I am facing problem to to execute .sql command in sql prompt using perl script. I am able to connect sql promt using " my $odbcinput = "odbcinput.txt"; my...
1
by: pramodkh | last post by:
Dear All, I am writting a PERL script in windows to test some test cases. The test result is captured both in command prompt and in the log file. But when the result is displayed on a windows...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.