Perl for the acquired taste

Perl for the acquired taste

Just read, try and enjoy ;-)

if ((not 0 && not 1)!=(!0 && !1))
  {print "I want what Larry and Tom smoke!\n";}


perl -e '$x="aaa";$x++; print "$x\n";'
perl -e '$x="aaz";$x++; print "$x\n";'
perl -e '$x="aa1";$x++; print "$x\n";'
perl -e '$x="aa.1";$x++; print "$x\n";'
perl -e '$x="a aa1";$x++; print "$x\n";'
perl -e '$x=" aa1";$x++; print "$x\n";'
perl -e '$x= ++ ($y="abaz"); print "$x\n";'
perl -e '@a = (1,2,3); for my  $b ( @a ) { $b=4; } print "$a[2]\n";'
 my $string = 'hallo willy bonker';
 my $ref = \( substr( $string, 6,5 ) );  ## creates ref to part of string!!
 print "$string\n";                      ## -> 'hallo willy bonker'
 $$ref = 'otto';                         ## change target of ref
 print "$string\n";                      ## -> 'hallo otto bonker'