Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: passing delimiters on command line

by Crian (Chaplain)
on Sep 13, 2004 at 09:32 UTC ( #390520=note: print w/ replies, xml ) Need Help??


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.


Comment on Re: passing delimiters on command line

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://390520]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (16)
As of 2014-10-23 16:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (126 votes), past polls