Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CMD commands in PERL PROGRAM ?

Status
Not open for further replies.

xoddam

Programmer
Mar 10, 2007
4
SK
Hello,

i am new to perl, programming some easy stuff but one question is very hot atm for me. Can i use CMD (like command line commands) in a PERL programm? because PERL works with CMD and because of that i am interested if its real?

EXAMPLE: If i open CMD and type EXIT, the window od CMD closes. And i want that this "EXIT" command will be at the end of my perl programm, so that the window closes at the end. Do you know what i mean?

The question is if i can write commands into a *.pl data and than run it and it will do the commands in cmd? :)

Thank you
 
Well, hmmm i tryed as hard as i can but i did not get any information of the link you posted, ty for it.

Maybe some advice for a NOVICE? I am quite new ... Please try to not use the programming-language because i have no idea :)

So again :) is there any option to put cmd commands into perl document? :)

And if not, or the WAY is long and hard as hell than tell me some command to CLOSE_PERL_WINDOW :) ty
 
Hello xoddam.

Kevin is quite correct, the system() function is the one you need to look at. You use it like this:

system('xcopy');

The command in the quotes can be anything you can type at the CMD commeand line.

To answer your second question, you close a perl script with the exit command.

Mike

Hardware is that part of a computer which, when you remove electrical power, doesn't go away.

Want great answers to your Tek-Tips questions? Have a look at faq219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top