in reply to strict refs usage

Use references instead:

use strict; use warnings; my @testlist=(\&test1, \&test2); foreach (@testlist) { #call test $_->(); } sub test1 { print ("dear user test1 is currently running\n"); #test1 code print "test1...done\n"; } sub test2 { print ("dear user test2 is currently running\n"); #test2 code print "test2...done\n"; }

Perl is Huffman encoded by design.

Replies are listed 'Best First'.
Re^2: strict refs usage
by gwowi (Acolyte) on Sep 26, 2005 at 14:16 UTC
    I finally used this method, it fit the way I want to run/add/remove my tests.

    Thanks for all your replies