- or download this
while (<RESULT>){
@my_data=<RESULT>;
print "@my_data\n"
}
- or download this
@my_data = <RESULT>;
- or download this
<RESULT>; # reads a line from RESULT
@my_data = <RESULT>; # reads rest into @my_data
- or download this
while (<DATA>) {
chomp;
...
for (@cells) { s/^"(.*)"$/$1/ }
...
}
- or download this
File A:
ALABAMA AL
...
Florida Tallahassee
Georgia Atlanta
...
- or download this
my %data;
open(A, '<', 'fileA');
...
$data{lc($cells[0])} = [ @cells ];
}
close(A);
- or download this
open(B, '<', 'fileB');
while (<B>) {
...
my $data_from_a = $data{lc($cells[0]} || [];
print join("\t", @cells, @$data_from_a), "\n";
}
- or download this
Alabama Montgomery ALABAMA AL
Alaska Juneau ALASKA AK
...
California Sacramento CALIFORNIA CA
Colorado Denver COLORADO CO
...