in reply to passing delimiters on command line
> echo "\t" \t
Perl also doesn't interpret this input as a tab, because that would make it impossible to have strings with a literal "\t" sequence. \escape sequences are only interpreted in double quoted string literals (and regular expressions).
The way to pass special characters in bash is to use $'\code', ie $'\t' for tab:
> perl -e '$"=shift;print "@ARGV"' $'\t' a b c d e a b c d e
If you use another shell, look in its documentation.
Ofcourse you could also do $" = eval '"'.shift(@ARGV).'"'; but that would complicate matters if anyone needs to pass something that can't be put in double quotes.
update: fixed typo
|
|---|