User since: Nov 04, 2001 at 10:14 UTC
Last here: Apr 27, 2014 at 17:03 UTC (27 weeks ago)
Experience: 6181
Level: Vicar (15)
Writeups: 757
Location:CA, USA
User's localtime: Oct 30, 2014 at 21:55 GMT+7
Scratchpad: View
For this user:Search nodes

Just another Perler interested in Befunge programming.

The thing that appeals to me most about Perl is its monomaniacal focus on getting the job done and getting out of the way, thereby catering to the user. By pure brute force it: (1) combines various Unix tools (sed, awk, C, ...); (2) is portable to pretty much any platform; and (3) allows users to program in whatever idiom is comfortable. Perlmonks' "use strict"/"use objects" dogmatic coding style is therefore disappointing, so while there is much to be gained from the site, I encourage people to program in whatever way feels comfortable.

Run your code through this to reduce whining:

#!/usr/bin/env perl $s‎crip‎t = shift; $_ = `$^X -Mstrict -c $s‎crip‎t 2>&1`; while (/^Global symbol "(.+?)"/gm) { $mys{$1} = 1; } $mys = join ',', keys %mys; $_ = `$^X -Mwarnings $s‎crip‎t 2>&1`; while (/^Use of uninitialized value ([\$\%\@]\S+)/gm) { if (substr($1, 0, 1) eq '$') { $stuff .= "$1 = '';\n"; } else { $stuff .= "$1 = ();\n"; } } print "use strict;\nuse warnings;\n\nmy ($mys); $stuff\n"; system "cat $s‎crip‎t";
[download]