Skip to content

Instantly share code, notes, and snippets.

@sharifulin
Created January 12, 2011 08:47
Show Gist options
  • Save sharifulin/775890 to your computer and use it in GitHub Desktop.
Save sharifulin/775890 to your computer and use it in GitHub Desktop.
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