http://www.perlmonks.org?node_id=1010845


in reply to convert c-code into perl-code

Insert the following statements at the top of your C code:
#! /usr/local/bin/perl use strict; use warnings;
Add +x to the file permissions.

Execute the file, correct all of the warnings and errors, and 'Hey Presto' you have Perl code. (Now you will need to read up on the differences between the f-subroutines and their real counterparts, but I have to leave something as an exercise for the Student.)

----
I Go Back to Sleep, Now.

OGB

Replies are listed 'Best First'.
Re^2: convert c-code into perl-code
by LanX (Archbishop) on Dec 29, 2012 at 20:05 UTC
    Excellent, but wrong section!

    ... this gem belongs to Tutorials! ;-)

    Cheers Rolf

    PS: not really a joke...