Re: parsing two column file

2002-10-31 Thread Pedro Antonio Reche
Dear Jose, thanks a lot for your solution. Also after burning my head I found my own solution (shown below). However I if use the switch -w I got a message saying "Use of uninitialized value at ..", I do not why. cheers, Pedro #!/bin/perl -w use strict; my (@array, @array2, %hash, $i, $j, $key); w

RE: parsing two column file

2002-10-31 Thread NYIMI Jose (BMB)
Try this: #!/usr/bin/perl use strict; my $file=$ARGV[0]; open(FH,"$file") || die "can not open file named $file for reading\n"; #Init stuff my $current_line=; my ($from,$prev_key)=split /\s+/,$current_line; my $prev_to=$from; #Go while($current_line=){ my ($current_to,$current_ke