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

Re^4: Retain first 4 characters of a string

by Anonymous Monk
on Aug 24, 2012 at 10:14 UTC ( #989479=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    say "BUT YOU CAN USE LESS OF THEM :) OR LEARN FROM s/// ";
    $trim = join '-',  $orig =~ m{(\w{1,4})\w*}g;
    say Dumper $want, $trim ;
    
  2. or download this
    BUT YOU CAN USE LESS OF THEM :) OR LEARN FROM s///
    $want = 'Appl-iPho-4-Blac-Cove';
    $trim = 'Appl-iPho-4-Blac-Cove';
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2014-08-20 17:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (120 votes), past polls