Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Underline

Reply
Thread Tools

Underline

 
 
Henrik Johansson
Guest
Posts: n/a
 
      07-16-2004
Hello,

I want to have underlined output in a shell. How is it done? I've tried
the man pages for print, printf and sprintf, but...

Regards, Henrik

 
Reply With Quote
 
 
 
 
Anno Siegel
Guest
Posts: n/a
 
      07-16-2004
Henrik Johansson <> wrote in comp.lang.perl.misc:
> Hello,
>
> I want to have underlined output in a shell. How is it done? I've tried
> the man pages for print, printf and sprintf, but...


In a shell? Wrong newsgroup.

If you want to do it in Perl, look at ANSIColor (yes, it supports
underline too).

Anno
 
Reply With Quote
 
 
 
 
Sherm Pendley
Guest
Posts: n/a
 
      07-16-2004
Henrik Johansson wrote:

> I want to have underlined output in a shell. How is it done?


It depends on the shell you're using. You might want to look at the Curses,
Term::ANSIScreen, and Win32::Console::ANSI modules on CPAN.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
 
Reply With Quote
 
Scott W Gifford
Guest
Posts: n/a
 
      07-16-2004
Henrik Johansson <> writes:

> I want to have underlined output in a shell. How is it done? I've
> tried the man pages for print, printf and sprintf, but...


Very old scripts do this by printing a letter, then a backspace, then
an underscore character, like this:

perl -le'print "h\b_i\b_";'

Whether this works will depend on your terminal. For a more portable
solution, see the modules that others have recommended.

----ScottG.



 
Reply With Quote
 
Henrik Johansson
Guest
Posts: n/a
 
      07-19-2004
> Very old scripts do this by printing a letter, then a backspace, then
> an underscore character, like this:
>
> perl -le'print "h\b_i\b_";'
>
> Whether this works will depend on your terminal. For a more portable
> solution, see the modules that others have recommended.


Ok. It didn't really work out on my terminal. I did get underlined blank
spaces, but I couldn't figure out how to get anything else underlined.

I'll try the recommended modules. Thanks people.

 
Reply With Quote
 
Henrik Johansson
Guest
Posts: n/a
 
      07-19-2004
Anno Siegel wrote:

<cut>

> In a shell? Wrong newsgroup.
>
> If you want to do it in Perl, look at ANSIColor (yes, it supports
> underline too).


In a shell, using Perl.

 
Reply With Quote
 
Anno Siegel
Guest
Posts: n/a
 
      07-19-2004
Henrik Johansson <> wrote in comp.lang.perl.misc:
> Anno Siegel wrote:
>
> <cut>
>
> > In a shell? Wrong newsgroup.
> >
> > If you want to do it in Perl, look at ANSIColor (yes, it supports
> > underline too).

>
> In a shell, using Perl.


*sigh*

If you use Perl to generate and print text, the properties of your
shell are irrelevant. The properties of your terminal emulation
may matter.

Anno
 
Reply With Quote
 
Scott W Gifford
Guest
Posts: n/a
 
      07-19-2004
Henrik Johansson <> writes:

> > Very old scripts do this by printing a letter, then a backspace, then
> > an underscore character, like this:
> > perl -le'print "h\b_i\b_";'
> > Whether this works will depend on your terminal. For a more portable
> > solution, see the modules that others have recommended.

>
> Ok. It didn't really work out on my terminal. I did get underlined
> blank spaces, but I couldn't figure out how to get anything else
> underlined.


Those aren't really underlined blank spaces, just the underscore
character.

> I'll try the recommended modules. Thanks people.


Good luck!

-----ScottG.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Underline words Joan Microsoft Certification 0 09-09-2003 05:47 PM
sorting and datagrid and underline sunil ASP .Net 1 07-15-2003 09:26 PM
Firebird - html underline probs Thanks AC Firefox 0 06-25-2003 09:01 PM
Re: Firebird - html underline probs Kriss Watt Firefox 0 06-24-2003 11:41 PM
Re: Firebird - html underline probs Gnomalarta Firefox 0 06-24-2003 07:39 PM



Advertisments