http://www.perlmonks.org?node_id=123137
User since: Nov 04, 2001 at 10:14 UTC (22 years ago)
Last here: Apr 11, 2016 at 03:08 UTC (8 years ago)
Experience: 6228
Level:Vicar (15)
Writeups: 757
Location:CA, USA
User's localtime: Apr 16, 2024 at 08:34 -07
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";