http://www.perlmonks.org?node_id=885910

abhi4.amity has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: vertcal tab
by ikegami (Patriarch) on Feb 03, 2011 at 08:37 UTC

    "NOTE: Unlike C and other languages, Perl has no \v escape sequence for the vertical tab (VT - ASCII 11), but you may use \ck or \x0b."

    If it did, \v in string literal would simply include character 0x0B in the resulting string. No more, no less.

Re: vertcal tab
by GrandFather (Saint) on Feb 03, 2011 at 08:39 UTC

    What is your reason for asking? As it stands your question doesn't make a great deal of sense. Perl doesn't recognise v as an escape character. However the ASCII VT (vertical tab, ctrl-k) character can be generated using \x0b.

    True laziness is hard work
Re: vertical tab
by davido (Cardinal) on Feb 03, 2011 at 08:44 UTC

    Here's one program, along with its output:

    use strict; use warnings; print "Hello\v world.\n"

    The output:

    Hellov world.

    I think that sums it up.

    Vertical tab, you say? perlop has a section called "Quote and Quote Like Operators", which you should have a look at to understand what escape sequences Perl recognizes.


    Dave

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: form feed
by cdarke (Prior) on Feb 03, 2011 at 12:29 UTC
    I noticed that you altered your question. Please, don't do that. If you have a different question then raise a new post.

    Although we welcome questions, this is meant as a Perl forum rather than basic computing questions. Don't push your luck with these questions, I hope you are not going to go through the entire character set.

    A form feed was originally used to throw a new page on a line-printer. On some terminal devices it also cleared the screen. Generally not used much these days.
Re: vertcal tab
by cdarke (Prior) on Feb 03, 2011 at 08:52 UTC
    It might have been in old versions of Perl, but not any more:
    print "<\v>";
    Gives:
    Unrecognized escape \v passed through at C:\gash.pl line 6. <v>
    perl 5.12.0

    Update: I rather like this: http://prog21.dadgum.com/76.html

    Interestingly it is still mentioned in the 5.12.2 version of perlre.

      perlre seems to be suggesting that regular expressions will recognize \v as vertical whitespace, in text that's being matched. But '\v' as a pattern is not the same as '\v' as a string escape sequence.


      Dave

Re: form feed
by Old_Gray_Bear (Bishop) on Feb 03, 2011 at 15:09 UTC
    A Form Feed (FF) is a skip-to-channel-twelve command for an IBM line printer. If your printer-control tape does not have a twelve-punch, this is the quickest way to empty a box of continuous form paper....

    ----
    I Go Back to Sleep, Now.

    OGB

Re: vertcal tab
by elef (Friar) on Feb 03, 2011 at 08:49 UTC
    This sounds an awful lot like homework and doesn't make much sense on top of that. "Send me a program related to a vertical tab"...? What for?
Re: form feed
by Anonymous Monk on Feb 03, 2011 at 18:13 UTC