Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: printing out tabs between each element in an array

by haoess (Curate)
on Feb 18, 2008 at 13:29 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2025-11-16 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (72 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.