in reply to help with s/// inside map

I'd skip the grep: it's redundant:
my @delete_list = map /^delete_check_(.*)/, keys %session;
This works because the regex match is in a list context. If it matches, you get back $1. If it fails to match, you get an empty list. And it disappears. {grin}

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: help with s/// inside map
by blackjudas (Pilgrim) on May 15, 2002 at 00:36 UTC
    Yes very true merlyn I was just using it as an example for the person I was teaching, explaining how to make one function feed another a list.

    BlackJudas