• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

make a for loop for the following in perl

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*'))");

0
smita2004
Asked:
smita2004
1 Solution
 
manav_mathurCommented:
WHat do you want to put inside the for loop??

0
 
kanduraCommented:
something like

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

maybe?
0
 
ozoCommented:
Did you want a "DIN" on only the first $user_info->retrievekeys ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now