Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted by Inver ( 17 years ago )
#!/usr/local/miniperl/miniperl

$text = <STDIN>;
print $text;
@arr_text = split " ",$text;
$result='';
foreach $word (@arr_text){
    $per = substr($word,0,1);
    substr($word,0,1)='';
    $pos = substr($word,-1);
    if ($pos == ',' or $pos == ','){$pos = substr($word,-2,2); substr($word,-2,2) = '';}
    else{ substr($word,-1)='';}

    @buk = split //,$word;
    @sbuk = sort {lc($a) cmp lc($b)} @buk;
    
    $w = '';
    foreach $simbol (@sbuk){
        $w = $w.$simbol; 
    }    
    $w = $per.$w.$pos;
    $res =$res.$w.' '; 
}
print $res;

 

Revise this Paste

Children: 9390 9391
Your Name: Code Language: