Hi!
What you need is closure. Closures are little anonymous functions that you can assign to a scalar and call repeatedly. You do that like so:
my $last_in_sentence = sub {return $content_array[$loc] =~ m/\.$/}; [...] if (&$last_in_sentence) { [...] }
Voila! Hope that helps.
--j
In reply to Re: expressions as constants
by purp
in thread expressions as constants
by rtlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |