http://qs321.pair.com?node_id=11144131

sherab has asked for the wisdom of the Perl Monks concerning the following question:

Monks, I come seeking wisdom and am confused by a statement I see.... I inherited a perl code project, and this statement in this foreach loop is confusing me... $chapter will end up being something like "5","7", and "11V"....

foreach my $chapter (.....){ ( $chapter =~ /5/ ) and ( $chapter = 5 ); ...... ...... }
The second part of the "and" seems to be assigning "5" to $chapter but I'm normally used to the first part as being "If $chapter matches 5 then do something". Please accept my apologies ahead of time because this may be crazy simple but what is this statement doing?