Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Split Decision

by Aragorn (Curate)
on Jan 06, 2005 at 14:37 UTC ( #419930=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    my $string = "Bla\nBlo\nBloe";
    print join("|", split('\n', $string));
    
  2. or download this
    $ perl -MO=Deparse split.pl 
    my $string = "Bla\nBlo\nBloe";
    print join('|', split(/\n/, $string, 0));
    split.pl syntax OK
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://419930]
help
Chatterbox?
NodeReaper shudders
[Corion]: choroba: That chart is frustrating as it pits cold hard numbers against puttering around with an annoying problem :)
[choroba]: I only use it when I want to avoid a task...
[Corion]: choroboa: A good choice! ;)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2017-07-27 09:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (407 votes). Check out past polls.