Wirklich komisch finde ich das Ergebnis einer “Addition von Arrays” in PHP. <?php $a = array(101,20,31); $b = array(19,42,300,101); $c = $a + $b; $d = array_merge($a,$b); echo ‘[a=(‘.implode(‘,’,$a).’)] + ‘. ‘[b=(‘.implode(‘,’,$b).’)] = ‘. ”.”\n”; echo ‘array_merge(a,b) = ‘. ‘[d=(‘.implode(‘,’,$d).’)]’.”\n”; ?>
Articles in Category "Technology"
Postfix “postqueue -p” (print queue) nett formatieren
11. Januar 2015 in Administration, Programming.
ist ganz einfach: postqueue -p | perl -ne ‘ /^[A-F09]+/&&do{ $a=<>; $b=<>; chomp($_,$a,$b); $a=~s/[\(\)]//g; $b=~s/ //g; $msg=$_.” to: “.$b.” message:”.$a; $msg=~s/[\t ]+/ /g; print “$msg\n”; } ‘