Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by usheikh

  1. usheikh

    Matching similar entries between two files

    thanks so much!!! all working now.
  2. usheikh

    Matching similar entries between two files

    thanks guys for your replies. Fish, I have run the program and am now getting output on the screen....great!! However, the list returned shows the numbers that DO have a corresponding R in the other file, rather than those without an R. Is it possible to easily modify? I havn't worked with...
  3. usheikh

    Matching similar entries between two files

    I dont quite understand this line that you have proposed. Why is it placed inside the while loop for TFILE? The entries containing B are actually inside FILE1. Was this intentional? $hashofTfile{$_."B"}+=1; Just in case I didnt explain myself clearly. There are two files TFILE and FILE1. TFILE...
  4. usheikh

    Matching similar entries between two files

    I've managed to rectify that error, there was a round bracket missing. However, the script runs but all I get is a blank screen and then it returns to the prompt again. Any ideas on why this is happening?
  5. usheikh

    Matching similar entries between two files

    ive tried removing the brackets but no luck. any ideas? thanks in advance! :)
  6. usheikh

    Matching similar entries between two files

    thank you paul. I have tried running but get syntax errors: syntax error at ./redwood3.pl line 39, near "){" line 39: if ( exists ($hashofTfile{$_}){ syntax error at ./redwood3.pl line 42, near "}" line 42: } Cant seem to correct this error.
  7. usheikh

    Matching similar entries between two files

    Hi, I am working on a script that will allow me to read from two files, compare the entries and output invalid entries. TFILE contains entries such as: 11111_ 11112_ 11113_ 11234_ 12342_ FILE1 contains entries such as: 11111_A 11112_A 11113_A 11234_A 12342_A 11111_B 11112_B 11113_B 11234_B...
  8. usheikh

    Partial Pattern Matching

    I have another issue that I have been trying to solve. If numbers.txt contains entries like: 123456_A 123456_B 123444_A 123444_B 123476_A 123476_B So bascially for every number there should be _A and _B entries in the file. If not then this should be printed to the screen. Therefore, this...
  9. usheikh

    Partial Pattern Matching

    works perfectly. thank you so much!
  10. usheikh

    Partial Pattern Matching

    When I run the program, after inputting the number I get a a blank screen. This is what I have so far.: #!/usr/bin/perl -w use strict; my $input = <STDIN>; chop $input; open FILE, "numbers.txt" or die $!; while ( <FILE> ) { if ( $_ =~ m/^($input)*$/ ) { print $_; } } close FILE;
  11. usheikh

    Partial Pattern Matching

    Thanks for the above program. But there is a problem with it as it only returns the number that it matches exactly. For example if I enter 123476 then it will only return this. But if I enter 123 then it does not return anything. Any ideas?
  12. usheikh

    Partial Pattern Matching

    I am trying to write a script that will allow me to do the following: Consider a file called NUMBERS containing entries such as: 123456 123444 123476 345678 345677 The script when run will prompt the user to enter a number. Then it will look in NUMBERS file and display any numbers that...
  13. usheikh

    Counting Current Ongoing Activities at a specific date

    THANKS! thats great. I came up with this and its similar to what you stated: SELECT Count(DCount("ID","tblRequest","[Booking Ref]")) AS [No of Projects] FROM tblRequest WHERE (((tblRequest.[Start Date Requested])<=[forms]![frmForm]![txtDate]) AND ((tblRequest.[End Date...
  14. usheikh

    Counting Current Ongoing Activities at a specific date

    Many thanks ... Good query. It returns the list of activities for a given date and works. However, instead of a list, is it possible to return just the number of activities? So if there were two activites on that day then it would return just 2.

Part and Inventory Search

Back
Top