|
Sharp shell programmers should take note of the following:
- The backtick operator does variable interpolation without regard to the presence of single
quotes in the command.
- The backtick operator does no translation of the return value, unlike csh.
- Shells (especially csh) do several levels of substitution on each command line.
Perl does substitution in only certain constructs such as double quotes, backticks, angle
brackets, and search patterns.
- Shells interpret scripts a little bit at a time. Perl compiles the entire program before
executing it (except for
BEGIN blocks, which execute at compile time).
- The arguments are available via @ARGV, not $1, $2, etc.
- The environment is not automatically made available as separate scalar variables.
|
|