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...
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...
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?
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.
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...
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...
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;
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?
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...
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...
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.