in reply to Re^2: A Perl vs. Java fight brews
in thread A Perl vs. Java fight brews
The equivalent code in Java must be in a method of some class. That's overkill in this case and it buys nothing except tedious typing, which is why we make the charge and it sticks.print "driver starting\n"; `call_system_util1`; `call_system_util2`; print "driver finished\n";
There are two subtle bits of syntatic sugar here. First, Perl puts things in the main package by default. Second, code does not have to appear in a method/sub/function/whatever. It can just go in a driving script. Perhaps these differences seem small, but they are real.
Phil
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: A Perl vs. Java fight brews
by ikegami (Patriarch) on Jul 24, 2006 at 18:01 UTC | |
by Fletch (Bishop) on Jul 24, 2006 at 18:11 UTC | |
by ikegami (Patriarch) on Jul 24, 2006 at 18:23 UTC | |
by iguanodon (Priest) on Jul 25, 2006 at 01:04 UTC |