![]() |
system "PAUSE";
hello. I have some basic experience in c/c++, but when it comesto perl I am a newb.I was wondering if experienced perl programmers object to using system "PAUSE"; at the end of their programs to eliminate having to run them from a command line. Thnx in advance
|
Yes. A huge chunk (I'd say over 95%) of Perl code is run on *nix systems, where no such pause command is available. You could try using getc:
:
print "pausing...\n"; |
Is that like getchar() in C? if so, if you use that to get a char will it seice to be able to pause the program like in C? Also, what is nix*?
|
Yes, it does the same thing as getchar() - waits until a character is input, and then returns it.
*nix collectively refers to Unix, Linux, Mac OS X, every OS considered Unix-like - so almost everything but Windows. ;) |
I see
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
Quote:
BTW, usually the interupt on the systems is sent by hitting ctrl-c. However on SEO linux (and possabily on other linux systems, most should be setup as ctrl-c though) the interupt is tied to the delete key. |
| All times are GMT -5. The time now is 2:00 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC