Computing.Net > Forums > Programming > Perl OutFile Operators

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Perl OutFile Operators

Reply to Message Icon

Name: Joseph
Date: May 13, 2003 at 14:07:21 Pacific
OS: Solaris
CPU/Ram: PIII 450, 256 mb
Comment:

Does anyone know how to run a C++ program from PeRl? Like what is the syntax involved. And, how to send an entire textfile to the MAIL pipeline?

Thanks,

Joe
O, if anyone can recommend a good beginners to PERL book but not programming that would be great too thanks much.



Sponsored Link
Ads by Google

Response Number 1
Name: FishMonger
Date: May 13, 2003 at 23:40:55 Pacific
Reply:

To run an external program from Perl, you use the exec() or system() functions. The fist one will end/exit the Perl script and run the external command and the second will pause the Perl script while the external command is running.

exec "rm *.bak";
system "rm *.bak";

You can also use backquotes to capture the output of an external command.

$now = `date`;
@dir = `ls`

I'm not sure what you mean by "a good beginners to PERL book but not programming". Perl is a scripting/programming laungage so you won't be able to find a Perl book that doen't envolve programming. Take a look at (O'Reilly) Learning Perl by Randal Scwartz & Tom Phoenix. It a very good beginners Perl book. Also look at Perl in a Nutshell, and Programming Perl. http://perl.oreilly.com/


0

Response Number 2
Name: Joseph
Date: May 14, 2003 at 09:58:05 Pacific
Reply:

Hi,

Thank you very much. Woops, missed type that I meant a Perl book for beginners but not to programming.

Ill look into those books you recommended.

Best,

Joseph


0

Response Number 3
Name: Joseph
Date: May 14, 2003 at 13:50:03 Pacific
Reply:

Ok. I got the program to run but it doesnt actually run the program. The text appears but none of the analyzes output is done.
I am running a c++ program from a perl script in windows XP.

thanks,

joseph


0

Response Number 4
Name: FishMonger
Date: May 15, 2003 at 17:15:18 Pacific
Reply:

Which of these are you saying:

a) The Perl script is not executing the c++ program.

b) The c++ program is not producing output.

c) Perl is not capturing the output of the c++ program.

Can you post or email me the script, at least, starting with the portion that calls the c++ program through the portion that accepts its output?

This is a poor forum for posting code because it doesn't easily allow the posting of certain types of code fragments. Also I never receive notification when you responded to my posting. www.experts-exchange.com is much better for this purpose.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Need difference Need help 2 develop my C+...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Perl OutFile Operators

perl: eq vs == and www.computing.net/answers/programming/perl-eq-vs-and-/5449.html

Bitwise operations in perl & mysql www.computing.net/answers/programming/bitwise-operations-in-perl-amp-mysql/11890.html

Perl problem www.computing.net/answers/programming/perl-problem/3108.html