Skip to content

Instantly share code, notes, and snippets.

View churib's full-sized avatar

Timo Grodzinski churib

View GitHub Profile
#!/usr/bin/env perl
use strict;
use warnings;
for ( 1 .. 2 ) {
my $var = 0 if 0;
$var++; # no warning/error?
print "$var\n";
}
#!/bin/sh
perl -pe 's/(\[.*?\] ){3}(.*?), referer.*/$2/'
#!/usr/bin/env perl
use strict;
use warnings;
package Foo;
sub new {
my( $class, $hash ) = @_;
return bless $hash, $class;
#!/usr/bin/perl
# Author: Todd Larason <[email protected]>
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $
# use the resources for colors 0-15 - usually more-or-less a
# reproduction of the standard ANSI colors, but possibly more
# pleasing shades
# should look like https://forums.freebsd.org/threads/urxvt-tmux-256-colors.38399/
#/usr/bin/env perl
use warnings;
use strict;
use List::Util 'all';
sub foo {
print "before: @_\n";
all { print "in all block: @_\n" } qw( bar );
print "after: @_\n";