http://qs321.pair.com?node_id=1060452

scripter87 has asked for the wisdom of the Perl Monks concerning the following question:

Hey monks, Got an issue that I would like help with if possible. I got this program that accepts arguments from the cl so say I typed perl mytest.pl test.html testb.html the program would do something with the arguments. The problem I have is that if I typed the arguments incorrectly say perl mytest.pl twst.html testb.html (they should both be as above) I want the program to report an error "warn" but continue and work with the correct argument. This is a snippet that I cant correctly use
foreach $_(@ARGV) { my $rename = $_; if (!-e $rename) { warn "$rename does not exist"; # previously I had this as die but +obviously that killed the program and did not continue with the corre +ct argument for(my $i=0;$i<$rename;$i++){ # I am not really sure if this loop +is the right idea #or what to put in it.. }