Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: How to split, join and trim leading / leading white space

by Anonymous Monk
on Sep 06, 2017 at 01:25 UTC ( [id://1198724]=note: print w/replies, xml ) Need Help??


in reply to How to split, join and trim leading / trailing white space

Next you'll be asking why there are two spaces between bytes instead of one. Here, maybe this will help.
use Data::Dump; my $banana = 'banana'; my @a = split /(..)/, $banana; dd(\@a); my @b = $banana =~ /(..)/g; dd(\@b); __END__ ["", "ba", "", "na", "", "na"] ["ba", "na", "na"]

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-04-16 09:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found