On Aug 9, 2004, at 3:36 PM, Singh, Harjit wrote:

The following code is what I used to check if item number could be
detected for the file I sent in the earlier email.  The code seems to
have failed and need a advise on it..


#!C:\perl\bin\perl5.6.1 $file1 = ' C:\perl\bin\dummy.txt' ;


open (INFO, "< $file1 ") or die "Can't open $file: $1";

while (<INFO>)
{

if ($test = ~ "/2\.2\./d+\./d+\./d+"){

In a Regular Expression, "one or more digits" is spelled:

\d+

Hope that helps.

James

 print " $test \n " ; }}

close (INFO);

It would be a great help if some feedback could be provided...


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to