in reply to Does Perl 5 (or 6?) need another built-in variable for the -F switch?
The join($F, @F) looks a bit evil, but hey.export F="\t" perl -F$F -line "munge(@F); print join($F, @F);" file
Sadly, this doesn't work:
Presumably because the prefixed env var doesn't apply to the shell's expansion of the line.F="\t" perl -F$F -line "munge(@F); print join($F, @F);" file
Does anyone know a trick to make this (shorter) approach work?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Does Perl 5 (or 6?) need another built-in variable for the -F switch?
by Anonymous Monk on Nov 03, 2006 at 09:43 UTC | |
by jbert (Priest) on Nov 03, 2006 at 10:01 UTC | |
by Anonymous Monk on Nov 03, 2006 at 11:47 UTC | |
by jbert (Priest) on Nov 03, 2006 at 12:30 UTC |