Hello world
#!/usr/local/bin/perl -w
END{print"world"}BEGIN{print"he"."l"x2 ."o"}print v32
Textfiles word reverser with backup
$ perl -pi.b -e's!\b\w+?\b!reverse$&!eg' *.txt
QuasiQuine with style
#!/usr/local/bin/perl -w # by Veky 2003 _,-=-,_
open 0 or die$!;print<0> # dedicated to Abigail
HighClass `cat` ;-)
$ perl -perl ~/.signature
ahrijev 1. zadatak sa ~skolskog
$ perl -le'$n=<>;$t[<>]=$_ for
1..$n*2;$t[++$i]?print$t[$i]:redo
for 1..$n'<svjece.in>svjece.out
Predzadnja znamenka umno~ska prvih 100 prostih brojeva
for$i(2..999){++$s[$i*$_]for#Zvone
2..31}++$i;for(0..100){0while$s[++$p];$i=$i*$p%100}print$i/10
Rje~senje jednog zadatka
by vsego
/(..)(.)/,$1+"$'$2"/2-sqrt||print for 1e3..1e4
One megabyte cat
$l=pop||2**20;syswrite STDOUT,$b,$l while sysread STDIN,$b,$l
GLAT 17
echo 2|perl -wlpe '$_++while$-+=1-y!1!!'
Lista 6-znamenkastih binarnih brojeva
#!/usr/bin/perl -wl
!/[2-9]/&&print for'0'x6..9x6;