* or x ?

Discussion in 'Perl Misc' started by vjp2.at@at.BioStrategist.dot.dot.com, May 21, 2004.

  1. Guest

    * or X ??

    perl -pe 'if ($.%4==2){$_.="-" x 37} elseif {$.%4==0) {$_.="=" x 37} $_.="\n"' < %1 >%1


    I want to stick blank or (tribar) striped lines in between text





    - = -
    Vasos-Peter John Panagiotopoulos II, Columbia'81+, Bio$trategist
    BachMozart ReaganQuayle EvrytanoKastorian
    http://ourworld.compuserve.com/homepages/vjp2/vasos.htm
    ---{Nothing herein constitutes advice. Everything fully disclaimed.}---
    [Homeland Security means private firearms not lazy obstructive guards]
    [Health Reform means abolishing FDR's insurance tax exemption]
    [To stop SPAM, Charge net-postage] [Abolish 16th (Inc Tx) Amendment]
     
    , May 21, 2004
    #1
    1. Advertising

  2. gnari Guest

    <> wrote in message
    news:c8lfsh$g5f$...
    > * or X ??
    >
    > perl -pe 'if ($.%4==2){$_.="-" x 37} elseif {$.%4==0) {$_.="=" x 37}

    $_.="\n"' < %1 >%1

    apart from the syntax errors,

    a) why don't you try it ?
    b) you want to use -i, it seems
    c) please use correct Newsgroups line

    gnari
     
    gnari, May 21, 2004
    #2
    1. Advertising

  3. In article <c8lfsh$g5f$>,
    <> wrote:
    :* or X ??

    :I want to stick blank or (tribar) striped lines in between text

    'x' is the string repetition operation. '*' is [unless overloaded]
    the arithmetic multiplication operator.
    --
    Everyone has a "Good Cause" for which they are prepared to spam.
    -- Roberson's Law of the Internet
     
    Walter Roberson, May 21, 2004
    #3
    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.

Share This Page