Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Break sentence into two part

by AnomalousMonk (Archbishop)
on Jan 24, 2015 at 23:02 UTC ( [id://1114398]=note: print w/replies, xml ) Need Help??


in reply to Break sentence into two part

More useless code:

c:\@Work\Perl>perl -wMstrict -le "my $sent = 'Perl 5 is a highly capable, feature-rich programming language with + over 27 years of development'; ;; my $len = int(length($sent) / 2); ;; my ($first, $second) = $sent =~ m{ (\A .{$len,}?) \s+ (.*) }xms; ;; print qq{'$first'}; print qq{'$second'}; " 'Perl 5 is a highly capable, feature-rich programming' 'language with over 27 years of development'


Give a man a fish:  <%-(-(-(-<

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-24 00:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found