- or download this
#!/usr/bin/perl -l
...
__END__
- or download this
#!/usr/bin/perl -l
...
__END__
Tom=HASH(0x18d0b48)
Can't locate object method "out" via package "Tom" at safetest.pl line
+ 17.
- or download this
perl -le'print 2**38'
- or download this
perl -le'$_="@ARGV";tr/a-z/c-zab/;print' "text"
- or download this
perl -pe's/[\W_]//g' file
- or download this
perl -ne'print $1 while /(?<![A-Z])[A-Z]{3}([a-z])[A-Z]{3}(?![A-Z])/g'
+ file
- or download this
#!/usr/bin/perl -wl
...
print;
($_)= /(\d+)$/g
}
- or download this
import pickle
print pickle.load(open('banner.p','r'))
- or download this
python script.py | perl -e'$_=eval <STDIN>;for (@$_) { while(($a,$b
)=splice(@$_,0,2)) {print $a x $b}print $/}'
- or download this
#!/usr/bin/perl -wl
...
}
print $comment
- or download this
#!/usr/bin/perl -w
...
}
print $/;
- or download this
perl -le'print map chr, @ARGV' numbers
- or download this
#!/usr/bin/perl
...
binmode $x;
print $x $i->jpeg();
close $x;
- or download this
perl -le'$_=1; s/((.)\2*)/length($1).$2/ge while $a++ < 30; print leng
+th $_'
- or download this
#!/usr/bin/perl
...
binmode $x;
print $x $i->jpeg();
close $x;
- or download this
perl -ne'BEGIN{undef$/;$a=shift;@ARGV=q[evil2.gfx];binmode(STDOUT)}for
+(;defined($x=substr($_,$a,1));$a+=5){print$x}' number > out.type
- or download this
perl -MRPC::XML::Client -le'print RPC::XML::Client->new(q[http://www.p
+ythonchallenge.com/pc/phonebook.php])->send_request(qw[phone Bert])->
+value'
- or download this
#!/usr/bin/perl
...
binmode $w;
print $w $n->jpeg(100);
close $w;
- or download this
perl -MDateTime -le'print for grep { $a=DateTime->new(year=>$_,month=>
+1,day=>26);$a->day_of_week == 1 and $a->is_leap_year } map { sprintf
+q[1%02d6], reverse 0..99 }'
- or download this
- or download this
Table Items:
itemid | name
...
Foreign key itemid -> Items.itemid
- or download this
my $iter = (
DBSchema::ShoppingCart->only_fields("name_on_cart")
+ DBSchema::Items->where(name => [ qw(Teddies Trampolines) ]
)->execute;
- or download this
SELECT ShoppingCart.name_on_cart from ShoppingCart where ShoppingCart.
+cartid IN (SELECT ShoppingCartItems.cartid from ShoppingCartItems inn
+er join Items on ShoppingCartItems.itemid = Items.itemid where Items.
+name in ('Teddies','Trampolines'))
- or download this
my $iter = (
DBSchema::ShoppingCart->only_fields("name_on_cart")
...
+ DBSchema::Items->where(name => "Trampolines")
- DBSchema::Items->where(name => ["!=", [ qw(Teddies Trampolines) ]
+] )
)->execute();
- or download this
SELECT ShoppingCart.name_on_cart from ShoppingCart where ShoppingCart.
+cartid IN (SELECT ShoppingCartItems.cartid from ShoppingCartItems inn
+er join Items on ShoppingCartItems.itemid=Items.itemid where Items.na
+me = 'Teddies') AND ShoppingCart.cartid IN (SELECT ShoppingCartItems.
+cartid from ShoppingCartItems inner join Items on ShoppingCartItems.i
+temid=Items.itemid where Items.name = 'Trampolines') AND ShoppingCart
+.cartid NOT IN (SELECT ShoppingCartItems.cartid from ShoppingCartItem
+s inner join Items on ShoppingCartItems.itemid=Items.itemid where Ite
+ms.name NOT IN ('Teddies','Trampolines'))
- or download this
SELECT DISTINCT ShoppingCartItems.cartid from ShoppingCartItems inner
+join Items on ShoppingCartItems.itemid=Items.itemid where Items.name=
+'Teddies';
...
- collects results, calculates the intersection from first two and the
+n the difference of the intersection and the third query -
SELECT ShoppingCart.name_on_cart from ShoppingCart where ShoppingCart.
+cartid=2;
- or download this
package Attribute::Scary;
...
}
1;
- or download this
#!/usr/bin/perl -l
...
FLAGS = 0x0
PADLIST = 0x816724c
OUTSIDE = 0x811b2ac (MAIN)
- or download this
sub randChar {
my ($chars,$len,$inc,$exl) = split /-/, shift;
...
my @map = keys %map or return;
join "",map $map[rand @map],1..$len
}
- or download this
use Scalar::Util "weaken";
use vars qw(%STORE);
...
}
...
- or download this
my $var = 1;
$_string = $var;
...
MatchVars->string($var);
$var = 2;
print $_string; # prints 2
- or download this
package MatchVars;
...
print "3: $_prematch | $_match | $_postmatch" if $var3 =~ /=\w+=/;
# this | =shows= | up