Everything goes back to
Unix
- sed: s/// , tr/// , y///
- C: printf()
- awk: $NR
- shell: quoting and backticks, dollar signs, globbing
Larry's a linguist
- English-like constructions
- Multiple ways to say things depending on meaning
TMTOWTDI
- There's More Than One Way To Do It
- The following are all identical:
if ($cost < 0) { warn "Cost is negative"; }
($cost >= 0) or warn "Cost is negative";
($cost < 0) and warn "Cost is negative";
warn "Cost is negative" if ($cost < 0);
warn "Cost is negative" unless ($cost >= 0);
|
|
|