>    I used this instruction to clear the screen on NT
>
>    system(cls);
>    print "Hello";
>
>   the same instruction is not working on unix. I modified the
instruction to
>
>   system(clear);
>   print "hello";
>
> This works fine on unix. Is there any instruction in perl to perfom
clear screen and it works on both windows and Unix
>
> Thanks in advance,

Would this:

    clear;

assuming an earlier:

    sub clear { system($^O =~ 'win' ? 'clear':'clr') }

be ok?

A more general solution for this sort of problem
(portable standard utilities) is to use Perl Power Tools:

    http://language.perl.com/ppt/

but they haven't (yet?) been nicely bundled on cpan.

Reply via email to