|
A Clear Screen Function
|
Email
|
| Submitted on: |
2/9/2003 8:31:12 PM |
| By: |
Jaime Muscatelli
|
| Level: |
Beginner |
| User Rating: |
By 15 Users |
| Compatibility: |
5.0 (all versions), Active Perl specific |
| Views: |
38826 |
|
(About the author) |
|
|
|
Hey, This is my first perl submission. I just started yesterday, and I found that there was no clear screen function (Like cls). Well, I figured out a way to do it (I think it only works in dos, but I think I know the way for unix too). KEYWORDS: CLEAR clear CLS cls Screen SCREEN screen Blank
|
| |
Terms of Agreement:
By using this article, you agree to the following terms...
- You may use
this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
- You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
- You may link to this article from another website, but ONLY if it is not wrapped in a frame.
- You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
|
system "cls"; # for DOS
system "clear"; # for Unix
#What this does is it actually uses the already existing clear functions that these OSs provide. Very short, simple, and it works ;-)
|
|
Report Bad Submission
|
Your Vote
|
| |
Other User Comments
|
2/27/2003 10:43:34 AM: serpent
unlucky (If this comment was disrespectful, please report it.)
|
4/8/2003 6:16:47 PM: Saffer Consulting
You've shown the mind of a true programmer with this code: you saw your tools didn't do something and you extended them to do it. It might not be the most sophisticated code on earth but it's a good start!! Keep up the good work. (If this comment was disrespectful, please report it.)
|
5/21/2003 6:44:50 PM: Andy H.
I agree. It is simple code, but it is a good start. (If this comment was disrespectful, please report it.)
|
7/17/2003 11:21:11 AM:
Simple. Clean. Effective. Good job! (If this comment was disrespectful, please report it.)
|
9/15/2004 11:01:54 PM:
you done good. (If this comment was disrespectful, please report it.)
|
1/3/2008 4:08:00 AM: Shyamkrishna
I am learning Ruby for now, and I have seen such codes . system(""),inside the double quotes , we have to fill in the system command,what ever be the DOS command it is exceuted. But in Ruby we have to include the command file and make use of this module or just use `` command in between these quotes.
thanks (If this comment was disrespectful, please report it.)
|
Add Your Feedback
Your feedback will be posted below and an email sent to
the author. Please remember that the author was kind enough to
share this with you, so any criticisms must be stated politely, or they
will be deleted. (For feedback not related to this particular article, please
click here instead.)
To post feedback, first please login.
|