Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Yoda Speak Translator

by ChOas (Curate)
on May 02, 2002 at 10:23 UTC ( #163496=note: print w/ replies, xml ) Need Help??


in reply to Yoda Speak Translator

Very, VERY cool!!!!

As the master said: "More than one way to do it there is" :

sub yoda { my ($sentence) = @_; my $Pivot=join '|',qw/is be will show do try are teach have/; # Move along, nothing to see here return $sentence unless ($sentence=~/\b$Pivot\b/); # Rearrange our words $sentence="$' $`$&"; # Clear leading spaces and Capitalise $sentence =~ s/^\s+//; $sentence = ucfirst(lc($sentence)); };


GreetZ!,
    ChOas

print "profeth still\n" if /bird|devil/;


Comment on Re: Yoda Speak Translator
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2014-10-22 22:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (122 votes), past polls