![]() |
|
Don't ask to ask, just ask | |
PerlMonks |
checking substring for numbersby dwatson06 (Friar) |
on Aug 01, 2002 at 20:00 UTC ( #186912=perlquestion: print w/replies, xml ) | Need Help?? |
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
Back to
Seekers of Perl Wisdom
|
|