C to Perl converter

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Convert C sources into Perl scripts.

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

// 1. hello world

#include <stdio.h>
#include <stdlib.h>

main(){
    printf("Hello, world!\n");
    exit(0);
}

Sample output:

# 1. hello world





printf("Hello, world!\n");
exit(0);

Sample input:_

// 19. fibonacci numbers

#include <stdio.h>
#include <stdlib.h>

main(){
    int a=1;
    int b=0;
    int i;
    for(i=1;i<=46;++i){
        printf("%d\n",a);
        a=a+b;
        b=a-b;
    }
    exit(0);
}

Sample output:

# 19. fibonacci numbers





my $a=1;
my $b=0;
my $i;
for($i=1;$i<=46;++$i){
    printf("%d\n",$a);
    $a=$a+$b;
    $b=$a-$b;
}
exit(0);

Sample input:_

// 34. fizzbuzz

#include <stdio.h>
#include <stdlib.h>

main(){
    int i;
    for(i=1;i<=100;++i){
        if(i%3==0){
            printf("Fizz");
        }
        if(i%5==0){
            printf("Buzz");
        }
        if(i%3!=0&&i%5!=0){
            printf("%d",i);
        }
        printf("\n");
    }
    exit(0);
}

Sample output:

# 34. fizzbuzz





my $i;
for($i=1;$i<=100;++$i){
    if($i%3==0){
        printf("Fizz");
    }
    if($i%5==0){
        printf("Buzz");
    }
    if($i%3!=0&&$i%5!=0){
        printf("%d",$i);
    }
    printf("\n");
}
exit(0);

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1mitchs730.03902015/05/06 07:27:110B / 25B / 41B
2Histocrat750.03402015/04/27 04:35:550B / 22B / 47B

Perl _

RankUserSizeTimeDateStatistics
1mitchs580.03382015/04/25 09:04:580B / 19B / 33B
2teebee580.03272015/04/26 01:38:010B / 19B / 33B
3tails580.04092015/04/27 14:35:320B / 19B / 33B
4llhuii580.03322015/04/30 23:39:400B / 19B / 33B
5whio600.03392015/04/23 05:17:480B / 20B / 34B
6%20670.03322015/04/22 16:17:040B / 20B / 40B
7BioFALSE670.03392015/04/28 22:47:150B / 25B / 40B
8MG1050.03362015/04/30 05:36:530B / 33B / 70B
9jonathan camacho1280.03272015/04/26 03:35:300B / 43B / 73B

Python _

RankUserSizeTimeDateStatistics
1mitchs1070.09242015/05/05 03:35:280B / 49B / 52B
2llhuii1130.09392015/05/05 21:12:460B / 55B / 53B
3xsot1180.08612015/05/05 14:25:100B / 50B / 63B
4rolf1510.09032015/04/23 01:46:150B / 69B / 67B

Python3 _

RankUserSizeTimeDateStatistics
1mitchs1040.15672015/05/05 03:36:390B / 46B / 53B
2llhuii1100.19942015/05/05 22:51:030B / 51B / 55B

Scheme _

RankUserSizeTimeDateStatistics
1kaki1180.13322015/04/22 22:32:080B / 50B / 64B

JavaScript _

RankUserSizeTimeDateStatistics
1FizzyTea1100.05092015/04/26 05:58:290B / 39B / 67B

AWK _

RankUserSizeTimeDateStatistics
1llhuii680.03142015/05/02 03:51:320B / 23B / 40B
2teebee680.03182015/05/02 04:49:400B / 21B / 42B

sed _

RankUserSizeTimeDateStatistics
1mitchs480.03242015/04/25 07:00:560B / 17B / 22B
2clock480.03222015/04/25 20:28:160B / 17B / 22B
3teebee490.03192015/04/26 11:12:080B / 16B / 24B
4llhuii490.03172015/04/27 21:17:060B / ?B / ?B
5whio520.03382015/04/25 03:41:440B / 19B / 24B
6%20610.03192015/04/22 21:11:480B / 18B / 35B

xgawk _

RankUserSizeTimeDateStatistics
1llhuii650.03272015/05/02 03:50:060B / 23B / 38B
2teebee650.03562015/05/02 06:40:430B / 22B / 39B
3mitchs (teebee,llhuii)640.03272015/05/06 16:13:530B / 18B / 42B

Vim _

RankUserSizeTimeDateStatistics
1FizzyTea450.04252015/05/05 20:43:241B / 25B / 18B

Language Ranking_

RankLangUserSizeScore
1VimFizzyTea4510000
2sedmitchs489375
3Perlmitchs587758
4xgawkmitchs (teebee,llhuii)647031
5AWKllhuii686617
6Rubymitchs736164
7Python3mitchs1044326
8Pythonmitchs1074205
9JavaScriptFizzyTea1104090
10Schemekaki1183813

return top