in reply to System Call for various serials in a for loop

from perldoc -f exec:

exec LIST exec PROGRAM LIST The "exec" function executes a system command and never returns-- u +se "system" instead of "exec" if you want it to return. [...] Since it's a common mistake to use exec instead of system, Perl warns +you if there is a following statement which isn't die, warn, or exit +(if -w is set - but you always do that).

You should always turn on -w flag or "use warnings" (moreover if you are trying to debug your code!)

perl -e 'use warnings;exec ("ls");print "Hello\n"' Statement unlikely to be reached at -e line 1. (Maybe you meant system() when you said exec()?)

citromatik