rtlm has asked for the wisdom of the Perl Monks concerning the following question:
i am using this expression in many test conditions and i want to store it in a variable that is easier to read. for example instead of having to do...$content_array[$location] =~ m/\. $/s;
i want to be able to do...if ($content_array[$location] =~ m/\. $/s)
and then use it like this...$last_in_sentence = ($content_array[$location] =~ m/\. $/s)
orif ($last_in_sentence)
The above way does not work so i was just wondering if there was any other way i could do this.if (!($last_in_sentence)).
edit (broquaint): added formatting
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: expressions as constants
by broquaint (Abbot) on Jul 15, 2004 at 06:10 UTC | |
Re: expressions as constants
by purp (Novice) on Jul 15, 2004 at 06:16 UTC | |
by revdiablo (Prior) on Jul 15, 2004 at 18:20 UTC | |
Re: expressions as constants
by davidj (Priest) on Jul 15, 2004 at 06:06 UTC | |
Re: expressions as constants
by ercparker (Hermit) on Jul 15, 2004 at 05:56 UTC |