This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use feature 'say'; | |
use Data::Dumper; | |
# Pretty print a tree structure | |
# Constants for drawing lines and spaces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
=encoding utf8 | |
=head1 NAME | |
Pure perl pipe viewer | |
=head1 VERSION | |
Version 1.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use feature 'say'; | |
use utf8; | |
use open ':std', ':encoding(UTF-8)'; | |
use Data::Dumper; | |
$Data::Dumper::Sortkeys = 1; | |
$Data::Dumper::Indent = 2; | |
my $data = $ARGV[0] || '{"id":42}'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Process the XP defrag log file | |
# to defragment the "Files that cannot be defragmented" with SysInternals / defrag tool. | |
# | |
# Seki - 2014 | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
#~ use 5.10.1; #not compatible with my old 5.8.8, but I just need "say" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%token NAME NUMBER LPAREN RPAREN EQUAL PLUS MINUS | |
%token TIMES DIVIDE IF THEN ELSE | |
/* associativity and precedence: in order of increasing precedence */ | |
%nonassoc LOW /* dummy token to suggest shift on ELSE */ | |
%nonassoc ELSE /* higher than LOW */ | |
%nonassoc EQUAL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v5.10.01; | |
use strict; | |
use warnings; | |
my $rx = | |
qr{ | |
# match contain groups 'file' + 'line' | |
\bfile:? (?<file>.+) \s at \s line \s (?<line>\d+) | |
# match contain only 'line' | |
| \s at \s line \s (?<line>\d+) |