Underline

Discussion in 'Perl Misc' started by Henrik Johansson, Jul 16, 2004.

  1. 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
    Henrik Johansson, Jul 16, 2004
    #1
    1. Advertising

  2. Henrik Johansson

    Anno Siegel Guest

    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
    Anno Siegel, Jul 16, 2004
    #2
    1. Advertising

  3. 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
    Sherm Pendley, Jul 16, 2004
    #3
  4. 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.
    Scott W Gifford, Jul 16, 2004
    #4
  5. > 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.
    Henrik Johansson, Jul 19, 2004
    #5
  6. 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.
    Henrik Johansson, Jul 19, 2004
    #6
  7. Henrik Johansson

    Anno Siegel Guest

    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
    Anno Siegel, Jul 19, 2004
    #7
  8. 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.
    Scott W Gifford, Jul 19, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sunil
    Replies:
    1
    Views:
    419
    Nicolas LeBlanc
    Jul 15, 2003
  2. Jag
    Replies:
    2
    Views:
    8,395
    Randy Rahbar
    Nov 14, 2003
  3. Music Lover

    Bold Italic UnderLine in TextBox

    Music Lover, Nov 26, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    819
    Teemu Keiski
    Nov 26, 2003
  4. ALok Gupta via .NET 247
    Replies:
    2
    Views:
    1,115
    John Saunders
    Aug 9, 2004
  5. KatB
    Replies:
    4
    Views:
    19,015
    prashant205
    Aug 24, 2007
Loading...

Share This Page