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

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

I am trying to search data from a file for a numeric value. If there is not one, default to four zeros.
I am trying this...
if(substr($AResp, 8, 4) =~ eq /\d\d\d\d/) {
my $shopID = substr($AResp, 8, 4);
}else{
my $shopID = "0000";
}
What am I doing wrong?
Thanks,
Daniel