Monday, May 14, 2012

Execute and Share Your Perl Code on a Remote Server


Code sharing sites like Pastebin.com have been around for quite some time now, but in recent years they have begun to become much more sophisticated in that they now support features like syntax highlighting for a variety of different languages.  I recently ran across two such sites that take things one step further and even allow for server side execution of code.  One such site is codepad.org and the other is Ideone.com.   Both allow Perl scripts to be executed on their server and may be useful to anyone who is not near a locally installed Perl interpreter, but has that idea they just need to try right now.  One of the main differences between the two as far as Perl programming is concerned is that codepad uses Perl v5.8 whereas Ideone makes use of Perl v5.12.1 and also has support for Perl6.  Both sites support the use of some Perl modules and there are likely differences in the modules supported by each site, so it may pay to keep both sites in mind.  If your code fails to execute due to lack of installed modules on one platform, perhaps they may execute on another platform.  Of course there are some additional restrictions as well as neither site allows scripts to establish network connections and reading and writing to files are also prohibited. 

For those considering using the sites for other languages, codepad supports C, C++, D, Haskell, Lua, OCaml, PHP, Perl, Python, Ruby, Scheme, and Tcl.  Ideone supports >40 languages in all, including all of the ones supported by codepad as well as popular languages like Java, JavaScript, C#, and Objective-C. 

No comments: