in reply to question about "split" function

Line feed is \l, not \f.

Update: It's not...

Replies are listed 'Best First'.
Re^2: question about "split" function
by roboticus (Chancellor) on Dec 11, 2007 at 21:39 UTC
    moritz:

    I always thought \l lowercased, and \n was newline....

    ...roboticus

Re^2: question about "split" function
by kyle (Abbot) on Dec 11, 2007 at 21:47 UTC

    On my system, "\l" isn't anything.

    printf "\\l = %d\n", ord "\l"; printf "\\f = %d\n", ord "\f"; print "\\l: [\l]\n"; __END__ \l = 0 \f = 12 \l: []
      kyle:

      Try this:

      $ perl -e 'print "\lTook \LNow Is The Time\E For All Good Men\n";' took now is the time For All Good Men
      ...roboticus

      Update: I finally found that reference table. It's in perlop. Quick recap:

      The following escape sequences are available in constructs that interpolate and in transliterations. \t tab (HT, TAB) \n newline (NL) \r return (CR) \f form feed (FF) <<<snip snip snip>>> The following escape sequences are available in constructs that interpolate but not in transliterations. \l lowercase next char \u uppercase next char \L lowercase till \E \U uppercase till \E \E end case modification \Q quote non-word characters till \E If "use locale" is in effect, the case map used by "\l", "\L", "\u" and "\U" is taken from the current locale. <<<snip snip snip>>>