Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2015-07-30 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls