Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: comparing file contents

by Util (Priest)
on Nov 22, 2011 at 23:09 UTC ( [id://939555]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
  2. or download this
    print "reading 'ansvarig_vardenhet_utf8.txt'\n";
    
  3. or download this
    open(WIN, "icd-10-codes.txt");
    
  4. or download this
    while($line = <WIN>) {
    
  5. or download this
    @columns = split(/\t/, $line);
    
  6. or download this
    #print "$columns[1]";
    
  7. or download this
      foreach my $value (@columns) {
        #print "$value\n"
    }
    
  8. or download this
    close(WIN);
    
  9. or download this
    print "reading 'ansvarig_vardenhet_utf8.txt'\n";
    open(IN, "female1.txt");
    while($line = <IN>) {
    
  10. or download this
    %col = split(/ /, $line);
    
  11. or download this
    #print "$columns[1]\n";
    
  12. or download this
    foreach my $val (%col) {
    
  13. or download this
    if($val == $columns[0]){
       $val =~ s/$val/$columns[1]/g;
    
  14. or download this
        print IN ">>$val\n";
    
  15. or download this
    close(IN);
    
  16. or download this
    I am a beginner in PERL.
    
  17. or download this
    #!/usr/bin/perl
    use strict;
    ...
    close $out_fh
        or warn "Cannot close '$out_path': $!\nSome data may not have been
    + written.";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://939555]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-04-25 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found