A
atbusbook
#1 pronouns $_,@_,%_
#2 regular expresions
perl may look ugly but it true uglyness is building a languige on bad
ideas like pythons lambdas, that canot contain 1 measly expression.
pronouns or implisit variables lets take a standard perl idiom for
regurgitating lines
while(<>){
print;
}
# look ma no variables
that is a good idea becaus its terse
in java to do the same thing you would have to do this
class foo{
static BufferedReader stdin = new BufferedReader(new
InputStreamReader(System.in));
public static void main(){
while(String foo = stdin.readLine()!=""){
System.out.println(foo);
}
}
}
#2 regular expresions
perl may look ugly but it true uglyness is building a languige on bad
ideas like pythons lambdas, that canot contain 1 measly expression.
pronouns or implisit variables lets take a standard perl idiom for
regurgitating lines
while(<>){
print;
}
# look ma no variables
that is a good idea becaus its terse
in java to do the same thing you would have to do this
class foo{
static BufferedReader stdin = new BufferedReader(new
InputStreamReader(System.in));
public static void main(){
while(String foo = stdin.readLine()!=""){
System.out.println(foo);
}
}
}