Is it possible to substitue 1 value with 'n' number of values???

Discussion in 'Perl' started by newbie_10, Jul 26, 2011.

  1. newbie_10

    newbie_10 New Member

    Joined:
    Jun 6, 2011
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    student
    Example:

    Input:
    FRSVTu_ORT_TRU

    Output:
    FRSVT0_ORT_TRU
    FRSVT1_ORT_TRU
    FRSVT2_ORT_TRU
    FRSVT3_ORT_TRU

    is there a way to do this using perl scripting?
     
  2. ansh batra

    ansh batra New Member

    Joined:
    Jan 17, 2010
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    student
    $a='FRSVTu_ORT_TRU';
    $a=~ //;
    for($i=0;$i<5;$i++)
    {
    print"$`$i$'\n";
    }
    everything is posible in perl :)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice