my $x = some_sub(); if ( $x > 2 ) { # do something here }