in reply to m{} within grep{} causing problems? (code)
You are confusing perl. According to perldoc -f grep, you
have two choices:
Your usage is a hybrid of the two, as the curly braces indicate the beginning of a block. Both of these two forms workgrep BLOCK LIST grep EXPR,LIST
orscalar( grep m[\d{3}-\d{3}], values %batch_ids ) == 6;
scalar( grep { m[\d{3}-\d{3}] } values %batch_ids ) == 6;
|
---|
In Section
Seekers of Perl Wisdom