Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
so inside the script I would like to set the $" to do some interpolation on a list like this :./script.pl "\t" ARG1 ARG2
but with any of the backslashed characters what prints is something like this :my $delim = shift @ARGV; $" = $delim; ... print "@list";
and not what I am going for which is to have the line print tab-delimited, in this case :list_item1\tlist_item2\tlist_item3
I don't understand why this happens because if I set the delimiter in the script like this :list_item1 list_item2 list_item3
everything is fine. I have tried every kind of escaping or quoting I can think of and nothing seems to work.$" = "\t"
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: passing delimiters on command line
by Joost (Canon) on Sep 13, 2004 at 09:54 UTC | |
Re: passing delimiters on command line
by ikegami (Patriarch) on Sep 13, 2004 at 09:52 UTC | |
by Anonymous Monk on Sep 13, 2004 at 16:01 UTC | |
Re: passing delimiters on command line
by thor (Priest) on Sep 13, 2004 at 10:55 UTC | |
Re: passing delimiters on command line
by Crian (Curate) on Sep 13, 2004 at 09:32 UTC | |
Re: passing delimiters on command line
by BrowserUk (Patriarch) on Sep 13, 2004 at 09:57 UTC | |
Re: passing delimiters on command line
by Anonymous Monk on Sep 13, 2004 at 13:34 UTC |