Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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?
[oiskuu]: E.g. Re^3: Big thank you to the Perl community. is surely dry humor (not mine). Don't they teach humor in german schools!?
[LanX]: you don't see the whole picture
[LanX]: But reu germans have no humor, better to refrain from this site till the troll is gone...
[LanX]: true

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2017-04-27 19:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (512 votes). Check out past polls.