Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^7: difficulty in matching 2 fields of a same line

by muba (Priest)
on Jun 27, 2012 at 19:09 UTC ( [id://978749]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    
  2. or download this
    print "\n Enter the file name :>";
    chomp( my $filename1 = <STDIN> );
    
  3. or download this
    my @lines = ();
    
  4. or download this
    open my $fh, '<', $filename1 or die "Cannot find the file $filename1: 
    +$!";
    
  5. or download this
    while (<$fh>)
    {
        push @lines, $_;
    
    }
    
  6. or download this
    close $fh;
    
  7. or download this
    open my $w, '>', 'Result.txt' or die "Cannot open the file Result.txt:
    + $!";
    
  8. or download this
    foreach my $line (@lines)
    {
    ...
        }
    }
    close $w;
    

Log In?
Username:
Password:

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

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

    No recent polls found