Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


make a for loop for the following in perl

Posted on 2005-04-12
Medium Priority
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

ID: 13764934
WHat do you want to put inside the for loop??

LVL 18

Accepted Solution

kandura earned 200 total points
ID: 13765606
something like

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

LVL 85

Expert Comment

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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
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…
Six Sigma Control Plans
Suggested Courses

577 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