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 rafiu

  1. rafiu

    Pattern Matching

    Is there anyway to better match a line that started with a dot from the begining to the end of the close parenthesis?Below is a sample from the file: .upper_house3({located in east valley}) \\good neigbourhood .upper_house1({located in east valley}) \\good neigbourhood .upper_house2({located in...
  2. rafiu

    counting opened files

    use strict; foreach $file_path (@file_path) { print "$file_path\n" #this has the full path to each file my $count = 0 ; while ( $count >= 0 ) { $count++ ; $FH = "FILE" . "$count" ; open $$FH , "$file_path" or last ; } print "\n...
  3. rafiu

    counting opened files

    i'm using a file handle to open multiple files but I'm not getting the actual results - not knowing how many files that are opened. do you guys know any little code I can use? Below is what I'm using but its giving me a bogus answer. use strict; my $count = 0 ; while ( $count >= 0 )...
  4. rafiu

    Pattern matching a group of lines that are commented out

    Its close but not quite right. I will like to exclude any data inside the comments and pattern match the rest of the data. Thanks
  5. rafiu

    Pattern matching a group of lines that are commented out

    do anyone know the best way to capture pattern match and capture the data from the begining of a delimeter to the end of the delimeter. see sample data below /* its a marvelous day and the weather is warm now is the time to settle our differences and embrace each other with one love */ I...
  6. rafiu

    progrem using pattern matching

    do anyone know the best way to capture pattern match and capture the data from the begining of a delimeter to the end of the delimeter. see sample data below /* its a marvelous day and the weather is warm now is the time to settle our differences and embrace each other with one love */ I...
  7. rafiu

    progrem using pattern matching

    use strict; my %hash = (); open (DATA, "c:\\sample.txt") or "can't"; while (<DATA>) { next if ! /^(\.\w*)\s*(\(.*\))/;; #print "$_\n"; #the next 2 lines is for taken out whitespace from the data $data = $_; $data =~ s/\s+//; $data =~ s/^\s+$//...
  8. rafiu

    progrem using pattern matching

    actually, I did not use Miller's pattern matching, I use a different one that works for what I need it for. the only problem now is to split each line into two and store them in hash. I was able to split the lines spaces in them with this code but not the line that does not have space in...
  9. rafiu

    progrem using pattern matching

    I was able to pattern match what i want but when I tried to put the data into the hash table I did not get the result that I wanted. below is the original file. the result I will like to have is to save the first half of the data as the key and the other half as the value. But some of the...
  10. rafiu

    progrem using pattern matching

    thank you and I will try it out.
  11. rafiu

    progrem using pattern matching

    sofar below is what I have open (FILE, $filename) or die " can't"; while (<FILE>) { if ( /(.raf | .licoln)_group*\)/) #pattern matching each line from the begining to the closing parenthesis $new_info = $_; $key_info= (split '', $new_info)[1]; #trying to split the each line into two so that...
  12. rafiu

    progrem using pattern matching

    I'm working on a data mining script that will be used to save some pattern in an hash table. Below is the information on a sample file that I'm working on .raf_group(first line); .licoln_group(second line); .start_raf_group(fitth line); //templated wired .raf_group_firm ({help me...
  13. rafiu

    working with &quot;Shell command&quot;

    I tried the step you gave me but when I tried to run the process, I got this error "system cannot find the file specified". I save the perl script in my "c:" drive and it should be able to find it. Below is my code maybe you will have any help you can render. Private Sub Form1_Load(ByVal...
  14. rafiu

    working with &quot;Shell command&quot;

    im using "shell" command in a Form to run a process which was created in Perl. I will like to stop any user from exiting from the form unless the process is done running. what code can I use. Thank you in advance param1_folderLoc = Convert.ToString(totalSelected.Item(index)) procID =...

Part and Inventory Search

Back
Top