Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Spliting letters in a string

by KM (Priest)
on May 08, 2001 at 00:53 UTC ( #78650=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    %hash = map {$_ => $_} split //, $str;
    
    print qq{$_ => $hash{$_}\n} for sort keys %hash;
    
  2. or download this
    # ./t.pl
    a => a
    ...
    e => e
    f => f
    g => g
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2014-09-22 03:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (178 votes), past polls