1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

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