Created
November 5, 2010 01:00
-
-
Save unixpickle/663487 to your computer and use it in GitHub Desktop.
detect weather python is better than perl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
$_ = "the quick brown fox jumps over the lazy dog."; | |
$mstr = "python"; | |
s/( ?)[a-z]+/\1${mstr}/g; | |
$i = length($_); | |
$_ = "the quick brown fox jumps over the lazy dog."; | |
$mstr = "perl"; | |
s/( ?)[a-z]+/\1${mstr}/g; | |
$i1 = length($_); | |
unless ($i1 > $i) { | |
print "Python is greater or equal to perl.\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment