Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: printing out tabs between each element in an array

by haoess (Curate)
on Feb 18, 2008 at 13:29 UTC ( #668532=note: print w/replies, xml ) Need Help??

in reply to printing out tabs between each element in an array

I would like to print out a tab character between each element in the array

There is a builtin special variable $":

local $" = "\t"; my @a = qw(1 2 3); print "@a"; __END__ 1 2 3

-- Frank

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://668532]
[choroba]: So an old friend is back...
[choroba]: he just forgot his password, it seems.
[Your Mother]: Still… Old… Friend…!
[Your Mother]: Is your guess as good as mine?
choroba winks.

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2017-02-28 02:19 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (394 votes). Check out past polls.