in reply to Re^3: finding the right corresponding element
in thread finding the right corresponding element

Thanks tooic for your quick reply

No, the input file size is not an issue at all

The idea was to look at each element of the first column, and for each of these elements, to browse through the whole elements of the second column

Are you saying that @MY_ELEMNTS = <INFILE> could work ?

  • Comment on Re^4: finding the right corresponding element

Replies are listed 'Best First'.
Re^5: finding the right corresponding element
by toolic (Bishop) on Aug 13, 2007 at 15:57 UTC
    I would probably create a different array variable, then do this:
    #!/usr/bin/env perl use warnings; use strict; my $file = "$ARGV[0]"; my @input_data; open INFILE_1, '<', $file or die "Can't open '$file' : $!\n"; @input_data = <INFILE_1>; close INFILE_1; # Just to show you that the @input_data array contains the same # content as the input $file, including all newlines (\n). print for (@input_data);