Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Tutorial suggestion: split and join

by gmax (Abbot)
on Aug 28, 2003 at 22:54 UTC ( #287545=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    
    delimiter ' '
    <Bart><Lisa><Maggie><Marge><Homer>
    
  2. or download this
      As a special case, specifying a PATTERN of space
      ("' '") will split on white space just as "split"
    ...
      leading whitespace produces a null first field.  A
      "split" with no arguments really does a 
      "split(' ', $_)" internally.
    
  3. or download this
    perl -MO=Deparse -e '$_=" a b c ";print map {"<$_>"} split'
    $_ = ' a b c ';
    print map({"<$_>";} split(" ", $_, 0));
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2014-12-25 15:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls