make a for loop for the following in perl

Posted on 2005-04-12
Last Modified: 2010-03-05
i was wondering if someone can show me how to put this in a for loop

$deleted_keys = $user_info->retrievekeys("999*DIN");
is              ((scalar @$deleted_keys), 0, "retrievekeys('999*'))");

$deleted_keys = $user_info->retrievekeys("888*");
is              ((scalar @$deleted_keys), 0, "retrievekeys('888*'))");

$deleted_keys = $user_info->retrievekeys("777*");
is              ((scalar @$deleted_keys), 0, "retrievekeys('777*'))");

$deleted_keys = $user_info->retrieve_keys("666*");
is              ((scalar @$deleted_keys), 0, "retrievekeys('666*'))");

Question by:smita2004
    LVL 16

    Expert Comment

    WHat do you want to put inside the for loop??

    LVL 18

    Accepted Solution

    something like

        foreach (qw/ 999 888 777 666 /) {
            $deleted_keys = $user_info->retrievekeys("$_*");
            is              ((scalar @$deleted_keys), 0, "retrievekeys('$_*'))");

    LVL 84

    Expert Comment

    Did you want a "DIN" on only the first $user_info->retrievekeys ?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
    I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now