Created
January 12, 2011 08:47
-
-
Save sharifulin/775890 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
use common::sense; | |
my $n = 1.229; | |
my $n = 4; | |
say 1 + $1 if $n =~ /(\d+)\./; # simple and good! | |
say $n =~ /(\d+)\./ && $1 + 1; # not pretty :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment