in reply to passing delimiters on command line
I use to pass a tab (or other) delimiter to a Perl script too. There I give the delimiter as the last parameter and don't escape it at all (it works at least under Win2k).
The output is delimited by tabs as I wanted it.
Perhaps the difference is, that I don't use $" = "\t", I print out the delimiter I got from the user between each data "per hand" in the print statement, as print $data1, $delimiter, $data2, $delimiter, ..., $datan, "\n";.
If you want to put the delimiter into $", you could use sprintf to print it into that variable. That may be safer than eval.
The output is delimited by tabs as I wanted it.
Perhaps the difference is, that I don't use $" = "\t", I print out the delimiter I got from the user between each data "per hand" in the print statement, as print $data1, $delimiter, $data2, $delimiter, ..., $datan, "\n";.
If you want to put the delimiter into $", you could use sprintf to print it into that variable. That may be safer than eval.
|
---|
In Section
Seekers of Perl Wisdom