Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: trailing white spaces when pushing into array

by BillKSmith (Monsignor)
on Aug 23, 2018 at 19:26 UTC ( #1220949=note: print w/replies, xml ) Need Help??


in reply to trailing white spaces when pushing into array

The space you see is the default value of LIST_SEPARATOR ($"). Set it locally to a null string. See perldoc -v "LIST_SEPARATOR".
{ local $"=''; $content = ("$baseurl@list"); }
Bill

Replies are listed 'Best First'.
Re^2: trailing white spaces when pushing into array
by ikegami (Patriarch) on Aug 23, 2018 at 20:36 UTC

    yuck!

    $content = $baseurl . join("", @list);
    or
    $content = join("", $baseurl, @list);
      Much better. I only addressed the symptom, not the real problem.
      Bill
Re^2: trailing white spaces when pushing into array
by flieckster (Scribe) on Aug 23, 2018 at 20:06 UTC
    ohh, thanks! that worked great!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2022-07-01 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (98 votes). Check out past polls.

    Notices?