Hello Monks,
I am trying to pass a delimiter string via a command line argument like this :
./script.pl "\t" ARG1 ARG2
so inside the script I would like to set the $" to do some interpolation on a list like this :
my $delim = shift @ARGV;
$" = $delim;
...
print "@list";
but with any of the backslashed characters what prints is something like this :
list_item1\tlist_item2\tlist_item3
and not what I am going for which is to have the line print tab-delimited, in this case :
list_item1 list_item2 list_item3
I don't understand why this happens because if I set the delimiter in the script like this :
$" = "\t"
everything is fine. I have tried every kind of escaping or quoting I can think of and nothing seems to work.