Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Perl (http://www.go4expert.com/forums/perl/)
-   -   Is it possible to substitue 1 value with 'n' number of values??? (http://www.go4expert.com/forums/substitue-1-value-n-values-t26373/)

newbie_10 26Jul2011 22:43

Is it possible to substitue 1 value with 'n' number of values???
 
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?

ansh batra 3Aug2011 13:06

Re: Is it possible to substitue 1 value with 'n' number of values???
 
$a='FRSVTu_ORT_TRU';
$a=~ /[u]/;
for($i=0;$i<5;$i++)
{
print"$`$i$'\n";
}
everything is posible in perl :)


All times are GMT +5.5. The time now is 11:01.