PERL: clearing the screen


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting PERL: clearing the screen
# 1  
Old 05-27-2003
PERL: clearing the screen

I would like to clear the screen in perl scripts without having to use system(). Is there a way to do this?
# 2  
Old 05-27-2003
Yes, but why would you want to?

Anyway, see the link for different commands already done (including clear).



Perl - unix reconsruction project
# 3  
Old 05-27-2003
I was hoping there would be a backslash option so I would not have to resort to brute force. Oh well, I'll work with what's available.
# 4  
Old 05-28-2003
you dont have to do system(clear) you can also just do `clear` but either way i dont see how this is brute force.
# 5  
Old 05-28-2003
One of the suggestions in the link was:
Quote:
print "\n" x 1000
That's what I meant when I said brute force. Additionally, I am working on a windows platform. Sorry for the confusion.
# 6  
Old 05-28-2003
then use the `cls` or system(cls) commands.
# 7  
Old 05-28-2003
See the man page

man perlfaq8

and search it for clear.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Accidentally made a screen within a screen - how to move it up one level?

I made a screen within a screen. Is there a way to move the inner screen up one level so that it is at the same level as the first screen running from the shell? (2 Replies)
Discussion started by: phpchick
2 Replies

2. Shell Programming and Scripting

Clearing part of screen in Korn Shell

Hi, I am writing a menu driven Korn script where I am getting some input from the users (host details, like Hostname, HBA WWN, Devices etc...). I face a challenge when the number of input lines goes past my window size. For this reason, I am planning to use a part of the screen for user input, say... (3 Replies)
Discussion started by: lasko
3 Replies

3. Red Hat

command line tool to disable screen lock and/or screen saver

Hi, I have a simple question : how to disable screen lock and/or sreen saver with command line with RHEL5.4 ? (1 Reply)
Discussion started by: albator1932
1 Replies

4. Shell Programming and Scripting

PERL - printing a hash of hashes to screen

Hi there I have a hash of hashes made up of the following data bge0|100|half|10.36.100.21 bge1|1000|full|10.36.100.22 bge2|1000|full|10.36.100.23 which when i turn into a hash, would look like this inside the system bge0 -> nic_speed -> 100 nic_duplex -> half ... (6 Replies)
Discussion started by: hcclnoodles
6 Replies

5. UNIX for Advanced & Expert Users

How to disable the clearing of the first page when executing screen tool

Hi Guy, In order to monitor the user sessions, I have put the screen tool in the .profile in order to record the whole session. However, when the user logs in, the screen command is executed and the screen is first cleared, then the command prompt appears. so, I basically want to disable the... (2 Replies)
Discussion started by: saad26
2 Replies

6. Programming

Clearing screen in Python using curses?

Hi guys, I've got the following code for clearing the screen in my Python shell using curses: import curses scrn = curses.initscr() scrn.clear() However, upon execution, my shell crashes. Would appreciate a pointer in the right direction. Thanks. :D (4 Replies)
Discussion started by: sadistik_exec
4 Replies

7. Shell Programming and Scripting

perl : stdout is not return to screen

Hello All, I have a perl script , and the STDERR and additional FH is redirected to the STDOUT like below: open STDOUT ,">>$log" or die "$! :: $log\n"; open STDERR ,">&STDOUT" or die "$! :: Can redirect STDERR to STDOUT\n"; select STDERR; $|=1; open LOG ,">&STDOUT" or die "$! :: Can... (2 Replies)
Discussion started by: Alalush
2 Replies

8. Shell Programming and Scripting

perl: howto print to screen & filehandle

Hello, I need to print messages both to screen and to file handle in perl , like tee does in unix . Any suggestions ? Thanks (2 Replies)
Discussion started by: Alalush
2 Replies

9. Shell Programming and Scripting

perl - print to a log file and screen

as the title suggests, i need to print a user message to a log file and the screen using perl. in unix i set up a function using 'tee' like so function Display_Message { echo "$*" | tee -ai $LOGFILE } the following command then obviously displays to the screen and prints to a log... (6 Replies)
Discussion started by: mjays
6 Replies

10. Shell Programming and Scripting

Simple Perl Script to Screen Display

$number_clients++; print("Creating client $number_clients\r"); I have been using the above to increment on the screen as the script increments throughout a while loop. What I would like to know is what is the trick to keep the last one on the screen without printing it again? Ie ... (1 Reply)
Discussion started by: Shakey21
1 Replies
Login or Register to Ask a Question