|
|
| P is for Practical | |
| PerlMonks |
checking substring for numbersby dwatson06 (Friar) |
| on Aug 01, 2002 at 16:00 UTC ( [id://186912]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.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
|
|
||||||||||||||||||||||||||||||||||