For Programmers: Free Programming Magazines  


Home > Archive > PERL Programming > October 2004 > Filled fields with constant text - is it possible?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Filled fields with constant text - is it possible?
ugly

2004-10-15, 8:55 pm

Hello,

When using filled fields in perl (the ^<<<<< notation), a ~~ at the
beginning of the line will suppress it if the line is otherwise blank.
However, what if I wanted to have a constant text in the lines? How could
I keep the script from looping forever? And note: the length of the
filled text is not a constant.

Example:

A user provides a text file that is read in by the script. I want to
insert it into a rectangle like so:

format WHATEVER =
____________________
~~ | ^<<<<<<<<<<<<<<<<< |
$text
--------------------
..

Ugly, I know, but you get the point.

Any suggestions would be appreciated.

Thanks,

ugly
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com