[Israel.pm] Simple terminal manipulation
Madani, Srikanth, VF-DE
Srikanth.Madani at vodafone.com
Thu Feb 2 03:18:33 PST 2006
Hi all,
I wonder if anyone knows of a module/technique through with I can print
two lines (or variable text - the output of a fortune program, say).
>./my_program.pl
Hello World
It was nice.
and then "delete" these two lines, and replace them with the output of
another print statement:
>./my_program.pl
What are you doing?
>
Counting the length of existing text, and "back-spacing" over it using
\b works, but only for a single line.
I also want to use a similar construct in the context of:
Number of rows inserted: 1003
and then keep replacing 1003 with the actual number of rows inserted
etc.
Am on a Unix machine, using Perl v5.8.1.
Pointers much appreciated!
Cheers,
Srikanth Madani
More information about the Perl
mailing list